adams.gui.goe
Class MOAClassOptionEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by adams.gui.goe.AbstractPropertyEditorSupport
          extended by adams.gui.goe.MOAClassOptionEditor
All Implemented Interfaces:
PropertyEditor

public class MOAClassOptionEditor
extends AbstractPropertyEditorSupport

An editor for MOA ClassOption objects.

Version:
$Revision: 4943 $
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
ClassOption

Field Summary
protected  Component m_CustomEditor
          the custom editor.
protected  moa.gui.ClassOptionEditComponent m_EditComponent
          the component for editing.
 
Fields inherited from class adams.gui.goe.AbstractPropertyEditorSupport
APPROVE_OPTION, CANCEL_OPTION, m_ChosenOption, m_WindowAdapter
 
Constructor Summary
MOAClassOptionEditor()
           
 
Method Summary
protected  JComponent createCustomEditor()
          Creates the custom editor.
 boolean isPaintable()
          Returns true since this editor is paintable.
static String toString(AbstractOption option, Object object)
          Returns the color as string.
static Object valueOf(AbstractOption option, String str)
          Returns a color generated from the string.
 
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, cleanUp, closeDialog, createPopup, createWindowAdapter, getChosenOption, getCustomEditor, initForDisplay, initialize, resetChosenOption, setValue, supportsCustomEditor
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getJavaInitializationString, getSource, getTags, getValue, paintValue, removePropertyChangeListener, setAsText, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_CustomEditor

protected Component m_CustomEditor
the custom editor.


m_EditComponent

protected moa.gui.ClassOptionEditComponent m_EditComponent
the component for editing.

Constructor Detail

MOAClassOptionEditor

public MOAClassOptionEditor()
Method Detail

isPaintable

public boolean isPaintable()
Returns true since this editor is paintable.

Specified by:
isPaintable in interface PropertyEditor
Overrides:
isPaintable in class AbstractPropertyEditorSupport
Returns:
always true.

createCustomEditor

protected JComponent createCustomEditor()
Creates the custom editor.

Specified by:
createCustomEditor in class AbstractPropertyEditorSupport
Returns:
the editor

toString

public static String toString(AbstractOption option,
                              Object object)
Returns the color as string.

Parameters:
option - the current option
object - the color object to convert
Returns:
the generated string

valueOf

public static Object valueOf(AbstractOption option,
                             String str)
Returns a color generated from the string.

Parameters:
option - the current option
str - the string to convert to a color
Returns:
the generated color


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