edu.iu.iv.common.util.algorithmview
Interface AlgorithmViewComponent

All Known Implementing Classes:
BooleanComponent, DoubleComponent, IntComponent, StringComponent

public interface AlgorithmViewComponent

A component used by the algorithm view. Each of AlgorithmViewComponent is used to create a swing component for user entry and also provides some low level validation to ensure the data is at least of proper type.

Author:
Team IVC

Method Summary
 java.awt.Component getComponent()
          grab the raw swing component associated w/ this component.
 java.lang.Class getEditableClass()
          get the type that this component can be used to edit.
 java.lang.Object getValue()
          get the value held the swing component.
 boolean isValid()
           
 void setValue(java.lang.Object object)
          Sets the value in the swing component.
 

Method Detail

getEditableClass

public java.lang.Class getEditableClass()
get the type that this component can be used to edit.

Returns:
the editable type supported by this component.

isValid

public boolean isValid()
Returns:
if the data held in the swing component is valid.

getValue

public java.lang.Object getValue()
get the value held the swing component. Note this should be of the same type that this class can edit (The only exception are for native types. For example int's should be returned as Integers).

Returns:
the value this component is holding.

setValue

public void setValue(java.lang.Object object)
Sets the value in the swing component.

Parameters:
object - the value to set it at.

getComponent

public java.awt.Component getComponent()
grab the raw swing component associated w/ this component.

Returns:
the swing component for data entry.