/** Returns true if the combo box is editable */ @Override public boolean supportsTextEntry() { return isEditable(); }
/** Returns true if the combo box is editable */ public boolean supportsTextEntry() { return isEditable(); }
/** Returns true if the combo box is editable */ public boolean supportsTextEntry() { return isEditable(); }
public Object getValue() { if (isEditable()) { return getEditor().getItem(); } else { return getSelectedItem(); } }
public Object getValue() { if (isEditable()) { return getEditor().getItem(); } else { return getSelectedItem(); } }
/** Overridden to add a listener to the editor if necessary, since the * UI won't do that for us without a focus listener */ public void addNotify() { super.addNotify(); if (isEditable() && getClass() == ComboInplaceEditor.class) { getEditor().getEditorComponent().addFocusListener(this); } getLayout().layoutContainer(this); }
/** Overridden to add a listener to the editor if necessary, since the * UI won't do that for us without a focus listener */ public void addNotify() { super.addNotify(); if (isEditable() && getClass() == ComboInplaceEditor.class) { getEditor().getEditorComponent().addFocusListener(this); } getLayout().layoutContainer(this); }
/** Overridden to add a listener to the editor if necessary, since the * UI won't do that for us without a focus listener */ @Override public void addNotify() { super.addNotify(); if (isEditable() && (getClass() == ComboInplaceEditor.class)) { getEditor().getEditorComponent().addFocusListener(this); } getLayout().layoutContainer(this); }
@Override public void run() { Window w = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); //in Java 1.5+ KeyboardFocusManager.getActiveWindow() may return null if (null != w && w.isAncestorOf(ComboInplaceEditor.this)) { if (isShowing() && !isPopupVisible()) { log("Popup checker ensuring editor prepared or popup visible"); if (isEditable()) { prepareEditor(); } showPopup(); } checker = null; } } }
public void run() { Window w = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); if (w.isAncestorOf(ComboInplaceEditor.this)) { if (isShowing() && !isPopupVisible()) { log ("Popup checker ensuring editor prepared or popup visible"); if (isEditable()) { prepareEditor(); } else { showPopup(); } } checker = null; } } }
public void run() { Window w = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); if (w.isAncestorOf(ComboInplaceEditor.this)) { if (isShowing() && !isPopupVisible()) { log ("Popup checker ensuring editor prepared or popup visible"); if (isEditable()) { prepareEditor(); } else { showPopup(); } } checker = null; } } }
/** Overridden to ensure the editor gets focus if editable */ @Override public void firePopupMenuCanceled() { super.firePopupMenuCanceled(); if (isEditable()) { Component focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (isDisplayable() && (focus == this)) { log("combo editor popup menu canceled. Requesting focus on editor component"); getEditor().getEditorComponent().requestFocus(); } } }
@Override public Object getValue() { if (isEditable()) { if( isAutoComplete ) { Object editorItem = getEditor().getItem(); if( null != editorItem ) { int selItem = ComboBoxAutoCompleteSupport.findMatch( this, editorItem.toString() ); if( selItem >= 0 && selItem < getItemCount() ) return getItemAt( selItem ); if( strictAutoCompleteMatching ) return getSelectedItem(); } } return getEditor().getItem(); } else { return getSelectedItem(); } }
/** Overridden to ensure the editor gets focus if editable */ public void firePopupMenuCanceled() { super.firePopupMenuCanceled(); if (isEditable()) { Component focus = KeyboardFocusManager. getCurrentKeyboardFocusManager().getFocusOwner(); if (isDisplayable() && focus == this) { log ("combo editor popup menu canceled. Requesting focus on editor component"); getEditor().getEditorComponent().requestFocus(); } } }
/** Overridden to ensure the editor gets focus if editable */ public void firePopupMenuCanceled() { super.firePopupMenuCanceled(); if (isEditable()) { Component focus = KeyboardFocusManager. getCurrentKeyboardFocusManager().getFocusOwner(); if (isDisplayable() && focus == this) { log ("combo editor popup menu canceled. Requesting focus on editor component"); getEditor().getEditorComponent().requestFocus(); } } }
if (isEditable()) { prepareEditor();
if (isEditable()) { prepareEditor();
if (isEditable()) { prepareEditor();