javax.swing.plaf.basic
Class BasicComboBoxEditor

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.basic.BasicComboBoxEditor
All Implemented Interfaces:
FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener , EventListener sample code for java.util.EventListener definition code for java.util.EventListener , ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor
Direct Known Subclasses:
BasicComboBoxEditor.UIResource sample code for javax.swing.plaf.basic.BasicComboBoxEditor.UIResource definition code for javax.swing.plaf.basic.BasicComboBoxEditor.UIResource , MetalComboBoxEditor sample code for javax.swing.plaf.metal.MetalComboBoxEditor definition code for javax.swing.plaf.metal.MetalComboBoxEditor

public class BasicComboBoxEditor
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor , FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener

The default editor for editable combo boxes. The editor is implemented as a JTextField.


Nested Class Summary
static class BasicComboBoxEditor.UIResource sample code for javax.swing.plaf.basic.BasicComboBoxEditor.UIResource definition code for javax.swing.plaf.basic.BasicComboBoxEditor.UIResource
          A subclass of BasicComboBoxEditor that implements UIResource.
 
Field Summary
protected  JTextField sample code for javax.swing.JTextField definition code for javax.swing.JTextField editor sample code for javax.swing.plaf.basic.BasicComboBoxEditor.editor definition code for javax.swing.plaf.basic.BasicComboBoxEditor.editor
           
 
Constructor Summary
BasicComboBoxEditor sample code for javax.swing.plaf.basic.BasicComboBoxEditor.BasicComboBoxEditor() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.BasicComboBoxEditor() ()
           
 
Method Summary
 void addActionListener sample code for javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener(java.awt.event.ActionListener) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener(java.awt.event.ActionListener) (ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
          Add an ActionListener.
 void focusGained sample code for javax.swing.plaf.basic.BasicComboBoxEditor.focusGained(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.focusGained(java.awt.event.FocusEvent) (FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
          Invoked when a component gains the keyboard focus.
 void focusLost sample code for javax.swing.plaf.basic.BasicComboBoxEditor.focusLost(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.focusLost(java.awt.event.FocusEvent) (FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
          Invoked when a component loses the keyboard focus.
 Component sample code for java.awt.Component definition code for java.awt.Component getEditorComponent sample code for javax.swing.plaf.basic.BasicComboBoxEditor.getEditorComponent() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.getEditorComponent() ()
          Return the component that should be added to the tree hierarchy for this editor
 Object sample code for java.lang.Object definition code for java.lang.Object getItem sample code for javax.swing.plaf.basic.BasicComboBoxEditor.getItem() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.getItem() ()
          Return the edited item
 void removeActionListener sample code for javax.swing.plaf.basic.BasicComboBoxEditor.removeActionListener(java.awt.event.ActionListener) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.removeActionListener(java.awt.event.ActionListener) (ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
          Remove an ActionListener
 void selectAll sample code for javax.swing.plaf.basic.BasicComboBoxEditor.selectAll() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.selectAll() ()
          Ask the editor to start editing and to select everything
 void setItem sample code for javax.swing.plaf.basic.BasicComboBoxEditor.setItem(java.lang.Object) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.setItem(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
          Sets the item that should be edited.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

editor sample code for javax.swing.plaf.basic.BasicComboBoxEditor.editor

protected JTextField sample code for javax.swing.JTextField definition code for javax.swing.JTextField  editor
Constructor Detail

BasicComboBoxEditor sample code for javax.swing.plaf.basic.BasicComboBoxEditor() definition code for javax.swing.plaf.basic.BasicComboBoxEditor()

public BasicComboBoxEditor()
Method Detail

getEditorComponent sample code for javax.swing.plaf.basic.BasicComboBoxEditor.getEditorComponent() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.getEditorComponent()

public Component sample code for java.awt.Component definition code for java.awt.Component  getEditorComponent()
Description copied from interface: ComboBoxEditor sample code for javax.swing.ComboBoxEditor.getEditorComponent() definition code for javax.swing.ComboBoxEditor.getEditorComponent()
Return the component that should be added to the tree hierarchy for this editor

Specified by:
getEditorComponent sample code for javax.swing.ComboBoxEditor.getEditorComponent() definition code for javax.swing.ComboBoxEditor.getEditorComponent() in interface ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor

setItem sample code for javax.swing.plaf.basic.BasicComboBoxEditor.setItem(java.lang.Object) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.setItem(java.lang.Object)

public void setItem(Object sample code for java.lang.Object definition code for java.lang.Object  anObject)
Sets the item that should be edited.

Specified by:
setItem sample code for javax.swing.ComboBoxEditor.setItem(java.lang.Object) definition code for javax.swing.ComboBoxEditor.setItem(java.lang.Object) in interface ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor
Parameters:
anObject - the displayed value of the editor

getItem sample code for javax.swing.plaf.basic.BasicComboBoxEditor.getItem() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.getItem()

public Object sample code for java.lang.Object definition code for java.lang.Object  getItem()
Description copied from interface: ComboBoxEditor sample code for javax.swing.ComboBoxEditor.getItem() definition code for javax.swing.ComboBoxEditor.getItem()
Return the edited item

Specified by:
getItem sample code for javax.swing.ComboBoxEditor.getItem() definition code for javax.swing.ComboBoxEditor.getItem() in interface ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor

selectAll sample code for javax.swing.plaf.basic.BasicComboBoxEditor.selectAll() definition code for javax.swing.plaf.basic.BasicComboBoxEditor.selectAll()

public void selectAll()
Description copied from interface: ComboBoxEditor sample code for javax.swing.ComboBoxEditor.selectAll() definition code for javax.swing.ComboBoxEditor.selectAll()
Ask the editor to start editing and to select everything

Specified by:
selectAll sample code for javax.swing.ComboBoxEditor.selectAll() definition code for javax.swing.ComboBoxEditor.selectAll() in interface ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor

focusGained sample code for javax.swing.plaf.basic.BasicComboBoxEditor.focusGained(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.focusGained(java.awt.event.FocusEvent)

public void focusGained(FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
Description copied from interface: FocusListener sample code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent)
Invoked when a component gains the keyboard focus.

Specified by:
focusGained sample code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusGained(java.awt.event.FocusEvent) in interface FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener

focusLost sample code for javax.swing.plaf.basic.BasicComboBoxEditor.focusLost(java.awt.event.FocusEvent) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.focusLost(java.awt.event.FocusEvent)

public void focusLost(FocusEvent sample code for java.awt.event.FocusEvent definition code for java.awt.event.FocusEvent  e)
Description copied from interface: FocusListener sample code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent)
Invoked when a component loses the keyboard focus.

Specified by:
focusLost sample code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent) definition code for java.awt.event.FocusListener.focusLost(java.awt.event.FocusEvent) in interface FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener

addActionListener sample code for javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener(java.awt.event.ActionListener) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.addActionListener(java.awt.event.ActionListener)

public void addActionListener(ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
Description copied from interface: ComboBoxEditor sample code for javax.swing.ComboBoxEditor.addActionListener(java.awt.event.ActionListener) definition code for javax.swing.ComboBoxEditor.addActionListener(java.awt.event.ActionListener)
Add an ActionListener. An action event is generated when the edited item changes

Specified by:
addActionListener sample code for javax.swing.ComboBoxEditor.addActionListener(java.awt.event.ActionListener) definition code for javax.swing.ComboBoxEditor.addActionListener(java.awt.event.ActionListener) in interface ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor

removeActionListener sample code for javax.swing.plaf.basic.BasicComboBoxEditor.removeActionListener(java.awt.event.ActionListener) definition code for javax.swing.plaf.basic.BasicComboBoxEditor.removeActionListener(java.awt.event.ActionListener)

public void removeActionListener(ActionListener sample code for java.awt.event.ActionListener definition code for java.awt.event.ActionListener  l)
Description copied from interface: ComboBoxEditor sample code for javax.swing.ComboBoxEditor.removeActionListener(java.awt.event.ActionListener) definition code for javax.swing.ComboBoxEditor.removeActionListener(java.awt.event.ActionListener)
Remove an ActionListener

Specified by:
removeActionListener sample code for javax.swing.ComboBoxEditor.removeActionListener(java.awt.event.ActionListener) definition code for javax.swing.ComboBoxEditor.removeActionListener(java.awt.event.ActionListener) in interface ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor