private void handleInitialInputEvent(InputEvent e) { //issue 35296, select all the text String txt = getText(); if (txt.length() > 0) { setSelectionStart(0); setSelectionEnd(getText().length()); } }
private void handleInitialInputEvent(InputEvent e) { //issue 35296, select all the text String txt = getText(); if (txt.length() > 0) { setSelectionStart(0); setSelectionEnd(getText().length()); } }
private void handleInitialInputEvent(InputEvent e) { //issue 35296, select all the text String txt = getText(); if (txt.length() > 0) { setSelectionStart(0); setSelectionEnd(getText().length()); } }
setText(txt); valFromTextField = getText(); setSelectionStart (0); setSelectionEnd(txt.length());
@Override public void reset() { String txt; txt = editor.getAsText(); //don't want an editor with the text "different values" in it //NOI18N if (editor instanceof PropUtils.DifferentValuesEditor) { txt = ""; //NOI18N } valFromEditor = txt; //issue 26367, form editor needs ability to set a custom value //when editing is initiated (event handler combos, part of them //cleaning up their EnhancedPropertyEditors). if ((getClass() == StringInplaceEditor.class) && (env != null) && (env.getFeatureDescriptor() != null)) { String initialEditValue = (String) env.getFeatureDescriptor().getValue("initialEditValue"); //NOI18N if (initialEditValue != null) { txt = initialEditValue; valFromEditor = txt; } } if (txt == null) { txt = ""; } setText(txt); valFromTextField = getText(); setSelectionStart(0); setSelectionEnd(txt.length()); }
setText(txt); valFromTextField = getText(); setSelectionStart (0); setSelectionEnd(txt.length());