Package org.apache.uima.tools.cpm
Class ConfigField
- java.lang.Object
-
- org.apache.uima.tools.cpm.ConfigField
-
public class ConfigField extends java.lang.Object
Configuration Field class used for representation of resource parameters in dynamically created MetaDataPanels.- See Also:
MetaDataPanel
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
classString
The class string.private javax.swing.JComponent
fieldComponent
The field component.private boolean
isMultiValued
The is multi valued.private java.lang.Object
lastSavedValue
The last saved value.private java.lang.Object
originalValue
The original value.private java.lang.String
parameterName
The parameter name.
-
Constructor Summary
Constructors Constructor Description ConfigField(java.lang.String pn, java.lang.String cs, boolean mv, javax.swing.JComponent c)
Instantiates a new config field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearDirty()
To be called when the CPE descriptor is saved.java.lang.String
getClassString()
Gets the class string.javax.swing.JComponent
getFieldComponent()
Gets the field component.java.lang.Object
getFieldValue()
Gets the field value.java.lang.String
getParameterName()
Gets the parameter name.boolean
isDirty()
Returns whether this field has been modified since the last time the CPE descriptor was saved.boolean
isModified()
Returns whether this field has been modified from its original value.boolean
isMultiValued()
Checks if is multi valued.void
setFieldValue(java.lang.Object fieldValue)
Sets the field value.
-
-
-
Field Detail
-
parameterName
private java.lang.String parameterName
The parameter name.
-
classString
private java.lang.String classString
The class string.
-
isMultiValued
private boolean isMultiValued
The is multi valued.
-
fieldComponent
private javax.swing.JComponent fieldComponent
The field component.
-
originalValue
private java.lang.Object originalValue
The original value.
-
lastSavedValue
private java.lang.Object lastSavedValue
The last saved value.
-
-
Constructor Detail
-
ConfigField
public ConfigField(java.lang.String pn, java.lang.String cs, boolean mv, javax.swing.JComponent c)
Instantiates a new config field.- Parameters:
pn
- Resource parameter name e.g. outputDircs
- String value of Java type used for value e.g. Integermv
- true if the value is a multi-value arrayc
- Component used to represent field - Could be JTextField, JCheckBox, FileSelector or ListSelector
-
-
Method Detail
-
getParameterName
public java.lang.String getParameterName()
Gets the parameter name.- Returns:
- the parameter name
-
getClassString
public java.lang.String getClassString()
Gets the class string.- Returns:
- the class string
-
getFieldComponent
public javax.swing.JComponent getFieldComponent()
Gets the field component.- Returns:
- the field component
-
isMultiValued
public boolean isMultiValued()
Checks if is multi valued.- Returns:
- true, if is multi valued
-
getFieldValue
public java.lang.Object getFieldValue()
Gets the field value.- Returns:
- the field value
-
setFieldValue
public void setFieldValue(java.lang.Object fieldValue)
Sets the field value.- Parameters:
fieldValue
- the new field value
-
isModified
public boolean isModified()
Returns whether this field has been modified from its original value. This is not affected by whether the user has saved the new value; for that use isDirty().- Returns:
- true, if is modified
-
isDirty
public boolean isDirty()
Returns whether this field has been modified since the last time the CPE descriptor was saved.- Returns:
- true, if is dirty
-
clearDirty
public void clearDirty()
To be called when the CPE descriptor is saved. Sets this field to be not dirty, until it is next modified.
-
-