de.cau.cs.kieler.sim.kiem.properties
Interface IKiemPropertyType

All Known Implementing Classes:
KiemPropertyType, KiemPropertyTypeBool, KiemPropertyTypeChoice, KiemPropertyTypeEditor, KiemPropertyTypeFile, KiemPropertyTypeInt, KiemPropertyTypeString, KiemPropertyTypeWorkspaceFile

public interface IKiemPropertyType

The Interface IKiemPropertyType. This is the base interface that has to be implemented by new KiemProperty types that also must extend the KiemPropertyType abstract class. KiemProperties have to implement the getValue(KiemProperty) and the setValue(KiemProperty, Object) methods depending on the CellEditor that is used. The standard CellEditor is the TextCellEditor but KiemPropertyTypes may provide their own CellEditors by overriding the method KiemPropertyType.provideCellEditor(org.eclipse.swt.widgets.Composite).

Rating yellow
(2009-01-15)

Method Summary
 Object getValue(KiemProperty property)
          Gets the value of the property type.
 void setValue(KiemProperty property, Object value)
          Sets the value of the property type.
 

Method Detail

getValue

Object getValue(KiemProperty property)
Gets the value of the property type. This method is called by the cell editor and its returned object depends on the latter. It returns the value that the cell editor can handle.
The concrete type of value is determined by the used cell editor and the type it can handle. The task of an implementation of this method is to bridge the property string type and the cell editor type.

Parameters:
property - the KiemProperty that this type operates on
Returns:
the value of the property with the type depending on the cell editor

setValue

void setValue(KiemProperty property,
              Object value)
Sets the value of the property type. This method is called by the cell editor and the object parameter depends on the latter. It gets the value from the cell editor and should store the appropriate string representation in the KIEM property.
The concrete type of value is determined by the used cell editor and the type it can handle. The task of an implementation of this method is to bridge the property string type and the cell editor type.

Parameters:
value - the value of the property with the type depending on the cell editor
property - the KiemProperty that this type operates on