adams.gui.goe
Class WekaGenericObjectEditorHandler

java.lang.Object
  extended by adams.gui.goe.AbstractGenericObjectEditorHandler
      extended by adams.gui.goe.WekaGenericObjectEditorHandler
All Implemented Interfaces:
Serializable

public class WekaGenericObjectEditorHandler
extends AbstractGenericObjectEditorHandler

Handler for the WEKA GenericObjectEditor.

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class adams.gui.goe.AbstractGenericObjectEditorHandler
m_Cache, m_HandlerClasses, m_Handlers
 
Constructor Summary
WekaGenericObjectEditorHandler()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WekaGenericObjectEditorHandler

public WekaGenericObjectEditorHandler()
Method Detail

setClassType

public boolean setClassType(PropertyEditor editor,
                            Class cls)
Sets the class type to use.

Specified by:
setClassType in class AbstractGenericObjectEditorHandler
Parameters:
editor - the editor to update
cls - the class to set
Returns:
true if successfully set

getClassType

public Class getClassType(PropertyEditor editor)
Returns the class type currently in use.

Specified by:
getClassType in class 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:
setCanChangeClassInDialog in class AbstractGenericObjectEditorHandler
Parameters:
editor - the editor to update
canChange - 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:
getCanChangeClassInDialog in class 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:
setValue in class AbstractGenericObjectEditorHandler
Parameters:
editor - the editor to update
value - the object to set
Returns:
true if successfully set

getValue

public Object getValue(PropertyEditor editor)
Returns the value currently being edited.

Specified by:
getValue in class 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:
handles in class 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:
hasCustomPanel in class 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:
getCustomPanel in class AbstractGenericObjectEditorHandler
Parameters:
editor - the editor to obtain the panel from
Returns:
the custom panel, null if none available


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.