Package adams.gui.goe
Class MekaGenericObjectEditorHandler
- java.lang.Object
-
- adams.gui.goe.AbstractGenericObjectEditorHandler
-
- adams.gui.goe.MekaGenericObjectEditorHandler
-
- All Implemented Interfaces:
Serializable
public class MekaGenericObjectEditorHandler extends adams.gui.goe.AbstractGenericObjectEditorHandlerHandler for the MEKA GenericObjectEditor.- Version:
- $Revision: 4584 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MekaGenericObjectEditorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCanChangeClassInDialog(PropertyEditor editor)Returns whether the class can be changed in the dialog.ClassgetClassType(PropertyEditor editor)Returns the class type currently in use.JPanelgetCustomPanel(PropertyEditor editor)Returns the custom panel of the editor.ObjectgetValue(PropertyEditor editor)Returns the value currently being edited.booleanhandles(Class cls)Checks whether the given class can be processed.booleanhasCustomPanel(PropertyEditor editor)Checks whether the editor supplies its own panel.booleansetCanChangeClassInDialog(PropertyEditor editor, boolean canChange)Sets whether the class can be changed in the dialog.booleansetClassType(PropertyEditor editor, Class cls)Sets the class type to use.booleansetValue(PropertyEditor editor, Object value)Sets the editor value.
-
-
-
Method Detail
-
setClassType
public boolean setClassType(PropertyEditor editor, Class cls)
Sets the class type to use.- Specified by:
setClassTypein classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to updatecls- the class to set- Returns:
- true if successfully set
-
getClassType
public Class getClassType(PropertyEditor editor)
Returns the class type currently in use.- Specified by:
getClassTypein classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to query- Returns:
- always Object.class
-
setCanChangeClassInDialog
public boolean setCanChangeClassInDialog(PropertyEditor editor, boolean canChange)
Sets whether the class can be changed in the dialog.- Specified by:
setCanChangeClassInDialogin classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to updatecanChange- if true the class can be changed in the dialog- Returns:
- true if successfully set
-
getCanChangeClassInDialog
public boolean getCanChangeClassInDialog(PropertyEditor editor)
Returns whether the class can be changed in the dialog.- Specified by:
getCanChangeClassInDialogin classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to query- Returns:
- true if the class can be changed in the dialog
-
setValue
public boolean setValue(PropertyEditor editor, Object value)
Sets the editor value.- Specified by:
setValuein classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to updatevalue- the object to set- Returns:
- true if successfully set
-
getValue
public Object getValue(PropertyEditor editor)
Returns the value currently being edited.- Specified by:
getValuein classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to query- Returns:
- the current editor value
-
handles
public boolean handles(Class cls)
Checks whether the given class can be processed.- Specified by:
handlesin classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
cls- the class to inspect- Returns:
- always true
-
hasCustomPanel
public boolean hasCustomPanel(PropertyEditor editor)
Checks whether the editor supplies its own panel.- Specified by:
hasCustomPanelin classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to check- Returns:
- true if the editor provides a panel
-
getCustomPanel
public JPanel getCustomPanel(PropertyEditor editor)
Returns the custom panel of the editor.- Specified by:
getCustomPanelin classadams.gui.goe.AbstractGenericObjectEditorHandler- Parameters:
editor- the editor to obtain the panel from- Returns:
- the custom panel, null if none available
-
-