Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.common.definition.editors
Class DefaultAttributeEditor

java.lang.Object
  extended by eu.esdihumboldt.hale.ui.common.editors.AbstractEditor<Object>
      extended by eu.esdihumboldt.hale.ui.common.definition.editors.DefaultAttributeEditor
All Implemented Interfaces:
Editor<Object>

public class DefaultAttributeEditor
extends AbstractEditor<Object>

A default attribute editor using binding, enumeration and validation constraints.

Author:
Kai Schwierczek

Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.ui.common.Editor
IS_VALID, VALUE
 
Constructor Summary
DefaultAttributeEditor(org.eclipse.swt.widgets.Composite parent, PropertyDefinition property)
          Creates an attribute editor for the given type.
 
Method Summary
 String getAsText()
          Get the editor value as text
 org.eclipse.swt.widgets.Control getControl()
          Get the editor control
 Object getValue()
          Get the editor value
 boolean isValid()
          Determines if the user has entered a valid value
 void setAsText(String text)
          Set the editor value as text
 void setValue(Object value)
          Set the editor value
 
Methods inherited from class eu.esdihumboldt.hale.ui.common.editors.AbstractEditor
fireStateChanged, fireValueChanged, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAttributeEditor

public DefaultAttributeEditor(org.eclipse.swt.widgets.Composite parent,
                              PropertyDefinition property)
Creates an attribute editor for the given type.

Parameters:
parent - the parent composite
property - the property
Method Detail

getControl

public org.eclipse.swt.widgets.Control getControl()
Description copied from interface: Editor
Get the editor control

Returns:
the editor control
See Also:
Editor.getControl()

setValue

public void setValue(Object value)
Description copied from interface: Editor
Set the editor value

Parameters:
value - the value
See Also:
Editor.setValue(java.lang.Object)

getValue

public Object getValue()
Description copied from interface: Editor
Get the editor value

Returns:
the editor value
Throws:
IllegalStateException - if the current input is not valid
See Also:
Editor.getValue()

setAsText

public void setAsText(String text)
Description copied from interface: Editor
Set the editor value as text

Parameters:
text - the value to set as text
See Also:
Editor.setAsText(java.lang.String)

getAsText

public String getAsText()
Description copied from interface: Editor
Get the editor value as text

Returns:
the text representation of the editor value
Throws:
IllegalStateException - if the current input is not valid
See Also:
Editor.getAsText()

isValid

public boolean isValid()
Description copied from interface: Editor
Determines if the user has entered a valid value

Returns:
if the value is valid
See Also:
Editor.isValid()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d