gate.gui.annedit
Class SchemaFeaturesEditor.FeatureEditor

java.lang.Object
  extended by gate.gui.annedit.SchemaFeaturesEditor.FeatureEditor
Enclosing class:
SchemaFeaturesEditor

protected class SchemaFeaturesEditor.FeatureEditor
extends Object


Field Summary
protected  JCheckBox checkbox
           
protected  Border defaultBorder
           
protected  String defaultValue
          Default value as string.
protected  String featureName
          The name of the feature
protected  JComponent gui
          The GUI used for editing the feature.
protected  Border highlightBorder
           
protected  JChoice jchoice
           
protected  boolean required
          Is this feature required
protected  ActionListener sharedActionListener
          The action listener that acts upon UI actions on nay of the widgets.
protected  JNullableTextField textField
           
protected  SchemaFeaturesEditor.FeatureType type
          The type of the feature.
protected  String value
          The value of the feature
protected  String[] values
          Permitted values for nominal features.
 
Constructor Summary
SchemaFeaturesEditor.FeatureEditor(String featureName, Boolean defaultValue)
          Constructor for boolean features
SchemaFeaturesEditor.FeatureEditor(String featureName, String defaultValue)
          Constructor for plain text features
SchemaFeaturesEditor.FeatureEditor(String featureName, String[] values, String defaultValue)
          Constructor for nominal features
 
Method Summary
protected  void buildGui()
          Builds the GUI according to the internally stored values.
 String getDefaultValue()
           
 String getFeatureName()
           
 JComponent getGui()
           
 SchemaFeaturesEditor.FeatureType getType()
           
 Object getValue()
           
 String[] getValues()
           
 boolean isRequired()
           
 void setDefaultValue(String defaultValue)
           
 void setFeatureName(String featureName)
           
 void setRequired(boolean required)
           
 void setType(SchemaFeaturesEditor.FeatureType type)
           
 void setValue(String value)
           
 void setValues(String[] values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textField

protected JNullableTextField textField

checkbox

protected JCheckBox checkbox

jchoice

protected JChoice jchoice

defaultBorder

protected Border defaultBorder

highlightBorder

protected Border highlightBorder

type

protected SchemaFeaturesEditor.FeatureType type
The type of the feature.


featureName

protected String featureName
The name of the feature


gui

protected JComponent gui
The GUI used for editing the feature.


values

protected String[] values
Permitted values for nominal features.


required

protected boolean required
Is this feature required


sharedActionListener

protected ActionListener sharedActionListener
The action listener that acts upon UI actions on nay of the widgets.


defaultValue

protected String defaultValue
Default value as string.


value

protected String value
The value of the feature

Constructor Detail

SchemaFeaturesEditor.FeatureEditor

public SchemaFeaturesEditor.FeatureEditor(String featureName,
                                          String[] values,
                                          String defaultValue)
Constructor for nominal features

Parameters:
featureName -
values -
defaultValue -

SchemaFeaturesEditor.FeatureEditor

public SchemaFeaturesEditor.FeatureEditor(String featureName,
                                          Boolean defaultValue)
Constructor for boolean features

Parameters:
featureName -
defaultValue -

SchemaFeaturesEditor.FeatureEditor

public SchemaFeaturesEditor.FeatureEditor(String featureName,
                                          String defaultValue)
Constructor for plain text features

Parameters:
featureName -
defaultValue -
Method Detail

buildGui

protected void buildGui()
Builds the GUI according to the internally stored values.


getType

public SchemaFeaturesEditor.FeatureType getType()
Returns:
the type

setType

public void setType(SchemaFeaturesEditor.FeatureType type)
Parameters:
type - the type to set

getValues

public String[] getValues()
Returns:
the values

setValues

public void setValues(String[] values)
Parameters:
values - the values to set

getDefaultValue

public String getDefaultValue()
Returns:
the defaultValue

setDefaultValue

public void setDefaultValue(String defaultValue)
Parameters:
defaultValue - the defaultValue to set

setValue

public void setValue(String value)
Parameters:
value -

getValue

public Object getValue()

getFeatureName

public String getFeatureName()
Returns:
the featureName

setFeatureName

public void setFeatureName(String featureName)
Parameters:
featureName - the featureName to set

getGui

public JComponent getGui()
Returns:
the gui

isRequired

public boolean isRequired()
Returns:
the required

setRequired

public void setRequired(boolean required)
Parameters:
required - the required to set