Package adams.gui.goe
Class DefaultGenericObjectEditorHandler
- java.lang.Object
-
- adams.gui.goe.AbstractGenericObjectEditorHandler
-
- adams.gui.goe.DefaultGenericObjectEditorHandler
-
- All Implemented Interfaces:
Serializable
public class DefaultGenericObjectEditorHandler extends AbstractGenericObjectEditorHandler
Dummy handler.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
METHOD_CUSTOMPANEL
the method name for custom panel suppliers.-
Fields inherited from class adams.gui.goe.AbstractGenericObjectEditorHandler
m_Cache, m_HandlerClasses, m_Handlers
-
-
Constructor Summary
Constructors Constructor Description DefaultGenericObjectEditorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getCanChangeClassInDialog(PropertyEditor editor)
Returns whether the class can be changed in the dialog.Class
getClassType(PropertyEditor editor)
Returns the class type currently in use.JPanel
getCustomPanel(PropertyEditor editor)
Returns the custom panel of the editor.Object
getValue(PropertyEditor editor)
Returns the value currently being edited.boolean
handles(Class cls)
Checks whether the given class can be processed.boolean
hasCustomPanel(PropertyEditor editor)
Checks whether the editor supplies its own panel.boolean
setCanChangeClassInDialog(PropertyEditor editor, boolean canChange)
Sets whether the class can be changed in the dialog.boolean
setClassType(PropertyEditor editor, Class cls)
Sets the class type to use.boolean
setValue(PropertyEditor editor, Object value)
Sets the editor value.-
Methods inherited from class adams.gui.goe.AbstractGenericObjectEditorHandler
getHandler, getHandler, getHandlers, handles, initHandlers
-
-
-
-
Field Detail
-
METHOD_CUSTOMPANEL
public static final String METHOD_CUSTOMPANEL
the method name for custom panel suppliers.- See Also:
- Constant Field Values
-
-
Method Detail
-
setClassType
public boolean setClassType(PropertyEditor editor, Class cls)
Sets the class type to use.- Specified by:
setClassType
in classAbstractGenericObjectEditorHandler
- Parameters:
editor
- the editor to updatecls
- the class to set -- ignored- Returns:
- always true
-
getClassType
public Class getClassType(PropertyEditor editor)
Returns the class type currently in use.- Specified by:
getClassType
in classAbstractGenericObjectEditorHandler
- 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:
setCanChangeClassInDialog
in classAbstractGenericObjectEditorHandler
- Parameters:
editor
- the editor to updatecanChange
- if true the class can be changed in the dialog -- ignored- Returns:
- always true
-
getCanChangeClassInDialog
public boolean getCanChangeClassInDialog(PropertyEditor editor)
Returns whether the class can be changed in the dialog.- Specified by:
getCanChangeClassInDialog
in classAbstractGenericObjectEditorHandler
- Parameters:
editor
- the editor to query- Returns:
- always false
-
setValue
public boolean setValue(PropertyEditor editor, Object value)
Sets the editor value.- Specified by:
setValue
in classAbstractGenericObjectEditorHandler
- Parameters:
editor
- the editor to updatevalue
- the object to set- Returns:
- always true
-
getValue
public Object getValue(PropertyEditor editor)
Returns the value currently being edited.- Specified by:
getValue
in classAbstractGenericObjectEditorHandler
- Parameters:
editor
- the editor to query- Returns:
- the object
-
handles
public boolean handles(Class cls)
Checks whether the given class can be processed.- Specified by:
handles
in classAbstractGenericObjectEditorHandler
- 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:
hasCustomPanel
in classAbstractGenericObjectEditorHandler
- 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:
getCustomPanel
in classAbstractGenericObjectEditorHandler
- Parameters:
editor
- the editor to obtain the panel from- Returns:
- the custom panel, null if none available
-
-