445446447448449450451452453454455
this.selectionStart = selectionStart; this.selectionEnd = selectionEnd; TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { peer.select(selectionStart, selectionEnd); } } /** * Selects all the text in this text component.
460461462463464465466467468469470
this.selectionStart = 0; this.selectionEnd = getText().length(); TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { peer.select(selectionStart, selectionEnd); } } /** * Sets the position of the text insertion caret.
474475476477478479480481482483484
462463464465466467468469470471472
476477478479480481482483484485486
448449450451452453454455456457458
this.selectionStart = selectionStart; this.selectionEnd = selectionEnd; TextComponentPeer tcp = (TextComponentPeer) getPeer(); if (tcp != null) tcp.select(selectionStart, selectionEnd); } /** * Selects all of the text in the component. */