|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> gui >> [ combobox overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.gui.combobox
Class GComboBox

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JComboBox
org.greenstone.gatherer.gui.combobox.GComboBox
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, javax.swing.event.ListDataListener, java.awt.MenuContainer, java.io.Serializable
- public class GComboBox
- extends javax.swing.JComboBox
In order for a JComboBox to perform the way Gatherer requires, ie firing a DocumentEvent of some form whenever the user edits the content of the currently selected item, we need to subclass JComboBox and build a version which adds a DocumentListener to the JTextField within the combobox not to the combobox itself. The same deal applies for KeyListeners.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JComboBox |
javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private javax.swing.JTextField |
text
|
| Fields inherited from class javax.swing.JComboBox |
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
GComboBox()
|
|
GComboBox(javax.swing.ComboBoxModel model)
|
|
| Method Summary | |
void |
addDocumentListener(javax.swing.event.DocumentListener listener)
|
void |
addKeyListener(java.awt.event.KeyListener listener)
Adds the specified listener to this component. |
java.lang.String |
getText()
|
void |
removeDocumentListener(javax.swing.event.DocumentListener listener)
|
void |
removeKeyListener(java.awt.event.KeyListener listener)
Removes the specified listener from the component. |
void |
setText(java.lang.String value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
text
private javax.swing.JTextField text
| Constructor Detail |
GComboBox
public GComboBox()
GComboBox
public GComboBox(javax.swing.ComboBoxModel model)
| Method Detail |
addDocumentListener
public void addDocumentListener(javax.swing.event.DocumentListener listener)
addKeyListener
public void addKeyListener(java.awt.event.KeyListener listener)
- Description copied from class:
java.awt.Component - Adds the specified listener to this component. This is harmless if the
listener is null, but if the listener has already been registered, it
will now be registered twice.
getText
public java.lang.String getText()
setText
public void setText(java.lang.String value)
removeDocumentListener
public void removeDocumentListener(javax.swing.event.DocumentListener listener)
removeKeyListener
public void removeKeyListener(java.awt.event.KeyListener listener)
- Description copied from class:
java.awt.Component - Removes the specified listener from the component. This is harmless if
the listener was not previously registered.
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> gui >> [ combobox overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC