|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.param.AbstractParamEditor
public abstract class AbstractParamEditor
The AbstractParamEditor acts as a base class for implementations of ParamEditor interface
by providing some default method implementations and several utility methods for common editors.
ParamEditor,
ParamValidator,
ParamExceptionHandler| Constructor Summary | |
|---|---|
protected |
AbstractParamEditor(Parameter parameter,
boolean useDefaultVerifier)
Creates the object with a given parameter. |
| Method Summary | |
|---|---|
protected boolean |
checkParameterValue(JTextComponent textComponent)
Checks whether or not the given text component provides a valid value for this parameter. |
JComponent |
getComponent()
Simply returns ParamEditor.getEditorComponent(). |
protected ActionListener |
getDefaultActionListener()
|
protected InputVerifier |
getDefaultInputVerifier()
|
ParamExceptionHandler |
getExceptionHandler()
Returns an optional error handler for this editor. |
JLabel |
getLabelComponent()
Gets the label component. |
Parameter |
getParameter()
Gets the parameter to which this editor belongs to. |
JLabel |
getPhysUnitLabelComponent()
Gets the physical unit label component. |
boolean |
handleParamException(ParamException e)
Implements the default behaviour for _parameter errors: A message box is shown for the given message string. |
protected void |
initUI()
Initialized the UI of this editor. |
boolean |
isEnabled()
Checks whether or not the editor is enabled, |
protected void |
nameComponent(JComponent component,
String suffix)
|
protected void |
nameEditorComponent(JComponent component)
|
protected void |
nameLabelComponent(JComponent component)
|
protected void |
nameUnitComponent(JComponent component)
|
void |
reconfigureUI()
Tells the UI component to reconfigure itself, since the parameter's properties have changed. |
protected void |
setDefaultLabelComponent(boolean ensureTrailingColon)
|
protected void |
setDefaultPhysUnitLabelComponent(boolean ensureLeadingSpace)
|
void |
setEnabled(boolean enabled)
Enables/disables this editor. |
void |
setLabelComponent(JLabel labelComponent)
Sets the label component. |
protected boolean |
setParameterValue(JTextComponent textComponent)
|
void |
setPhysUnitLabelComponent(JLabel labelComponent)
Sets the physical unit component. |
void |
updateUI()
Tells the UI to update it's state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.esa.beam.framework.param.ParamEditor |
|---|
getEditorComponent |
| Constructor Detail |
|---|
protected AbstractParamEditor(Parameter parameter,
boolean useDefaultVerifier)
parameter - the Parameter to be edited.useDefaultVerifier - true if a default verifier should be used| Method Detail |
|---|
public Parameter getParameter()
getParameter in interface ParamEditorpublic JLabel getLabelComponent()
getLabelComponent in interface ParamEditorpublic void setLabelComponent(JLabel labelComponent)
setLabelComponent in interface ParamEditorpublic JLabel getPhysUnitLabelComponent()
getPhysUnitLabelComponent in interface ParamEditorpublic void setPhysUnitLabelComponent(JLabel labelComponent)
setPhysUnitLabelComponent in interface ParamEditorprotected void setDefaultLabelComponent(boolean ensureTrailingColon)
protected void setDefaultPhysUnitLabelComponent(boolean ensureLeadingSpace)
public boolean isEnabled()
isEnabled in interface ParamEditorpublic void setEnabled(boolean enabled)
setEnabled in interface ParamEditorprotected void initUI()
The default implementation creates a label component for the parameter's "label" and "physicalUnit" properties.
public void updateUI()
Note: If you override this method, you should call this base class version first.
updateUI in interface ParamEditorpublic void reconfigureUI()
The default implementation simply calls the updateUI method.
reconfigureUI in interface ParamEditorpublic boolean handleParamException(ParamException e)
handleParamException in interface ParamExceptionHandlere - the exception
true if the exception was handled successfully, false otherwiseprotected InputVerifier getDefaultInputVerifier()
protected ActionListener getDefaultActionListener()
protected boolean setParameterValue(JTextComponent textComponent)
protected boolean checkParameterValue(JTextComponent textComponent)
textComponent - the text component which provides the parameter value.
true if sopublic ParamExceptionHandler getExceptionHandler()
this
instance.
getExceptionHandler in interface ParamEditorpublic JComponent getComponent()
ParamEditor.getEditorComponent().
getComponent in interface ParamEditorParamEditor.getEditorComponent()protected void nameLabelComponent(JComponent component)
protected void nameEditorComponent(JComponent component)
protected void nameUnitComponent(JComponent component)
protected void nameComponent(JComponent component,
String suffix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||