gate.gui.teamware
Class AnnotationSetNameComboEditor

java.lang.Object
  extended by gate.gui.teamware.AnnotationSetNameComboEditor
All Implemented Interfaces:
FocusListener, EventListener, ComboBoxEditor

 class AnnotationSetNameComboEditor
extends Object
implements ComboBoxEditor, FocusListener

Combo box editor for annotation set names. When the text field is empty, it displays the text "<Default annotation set>" in italics. Other than that, it delegates to the underlying default editor.


Field Summary
static String DEFAULT_SET_TEXT
           
private  boolean isEmpty
           
private  Font italicFont
           
private  Font normalFont
           
private  ComboBoxEditor realEditor
           
 
Constructor Summary
AnnotationSetNameComboEditor(ComboBoxEditor realEditor)
           
 
Method Summary
 void addActionListener(ActionListener l)
           
 void focusGained(FocusEvent e)
           
 void focusLost(FocusEvent e)
           
 Component getEditorComponent()
           
 Object getItem()
           
 void removeActionListener(ActionListener l)
           
 void selectAll()
           
 void setItem(Object item)
           
private  void setItem(Object item, boolean updateFocus)
          Set the current item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SET_TEXT

public static final String DEFAULT_SET_TEXT
See Also:
Constant Field Values

realEditor

private ComboBoxEditor realEditor

normalFont

private Font normalFont

italicFont

private Font italicFont

isEmpty

private boolean isEmpty
Constructor Detail

AnnotationSetNameComboEditor

AnnotationSetNameComboEditor(ComboBoxEditor realEditor)
Method Detail

addActionListener

public void addActionListener(ActionListener l)
Specified by:
addActionListener in interface ComboBoxEditor

getEditorComponent

public Component getEditorComponent()
Specified by:
getEditorComponent in interface ComboBoxEditor

getItem

public Object getItem()
Specified by:
getItem in interface ComboBoxEditor

removeActionListener

public void removeActionListener(ActionListener l)
Specified by:
removeActionListener in interface ComboBoxEditor

selectAll

public void selectAll()
Specified by:
selectAll in interface ComboBoxEditor

setItem

public void setItem(Object item)
Specified by:
setItem in interface ComboBoxEditor

setItem

private void setItem(Object item,
                     boolean updateFocus)
Set the current item. If updateFocus is true, call the relevant FocusListener method.


focusGained

public void focusGained(FocusEvent e)
Specified by:
focusGained in interface FocusListener

focusLost

public void focusLost(FocusEvent e)
Specified by:
focusLost in interface FocusListener