edu.iu.iv.common.util.algorithmview
Class IntComponent

java.lang.Object
  |
  +--edu.iu.iv.common.util.algorithmview.IntComponent
All Implemented Interfaces:
AlgorithmViewComponent

public class IntComponent
extends java.lang.Object
implements AlgorithmViewComponent

An algorithm view component for editing native ints.

Author:
Team IVC

Constructor Summary
IntComponent()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntComponent

public IntComponent()
Method Detail

getEditableClass

public java.lang.Class getEditableClass()
Description copied from interface: AlgorithmViewComponent
get the type that this component can be used to edit.

Specified by:
getEditableClass in interface AlgorithmViewComponent
Returns:
the editable type supported by this component.
See Also:
AlgorithmViewComponent.getEditableClass()

isValid

public boolean isValid()
Specified by:
isValid in interface AlgorithmViewComponent
Returns:
if the data held in the swing component is valid.
See Also:
Component.isValid()

getValue

public java.lang.Object getValue()
Description copied from interface: AlgorithmViewComponent
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).

Specified by:
getValue in interface AlgorithmViewComponent
Returns:
the value this component is holding.
See Also:
AlgorithmViewComponent.getValue()

setValue

public void setValue(java.lang.Object object)
Description copied from interface: AlgorithmViewComponent
Sets the value in the swing component.

Specified by:
setValue in interface AlgorithmViewComponent
Parameters:
object - the value to set it at.
See Also:
AlgorithmViewComponent.setValue(java.lang.Object)

getComponent

public java.awt.Component getComponent()
Description copied from interface: AlgorithmViewComponent
grab the raw swing component associated w/ this component.

Specified by:
getComponent in interface AlgorithmViewComponent
Returns:
the swing component for data entry.
See Also:
AlgorithmViewComponent.getComponent()