org.indi.objects
Class Switch

java.lang.Object
  extended by org.indi.objects.Object<Object>
      extended by org.indi.objects.Element
          extended by org.indi.objects.Switch
All Implemented Interfaces:
java.io.Serializable

public class Switch
extends Element

An object representing a single indi switch

Author:
dirk
See Also:
Serialized Form

Nested Class Summary
static class Switch.State
          the state of the switch
 
Field Summary
 
Fields inherited from class org.indi.objects.Element
label, name, value
 
Fields inherited from class org.indi.objects.Object
children, message, transferType
 
Constructor Summary
Switch(java.lang.String name, java.lang.String value)
           
Switch(java.lang.String name, java.lang.String label, java.lang.String value)
          class constructor
Switch(java.lang.String name, java.lang.String label, Switch.State state)
          class constructor
 
Method Summary
 Switch.State getState()
           
protected  java.lang.String getType()
           
 void setState(Switch.State state)
          set the state of the switch
 
Methods inherited from class org.indi.objects.Element
getEndTag, getName, getStartTag, getValue, getXML, hashCode, oEquals, setValue
 
Methods inherited from class org.indi.objects.Object
equals, getChildren, getMessage, getTransferType, getXML, setTransferType, treeEquals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Switch

public Switch(java.lang.String name,
              java.lang.String label,
              Switch.State state)
class constructor

Parameters:
name - the name of the Switch
label - the label of the Switch (to be used for display in the GUI)
state - the state of the Switch

Switch

public Switch(java.lang.String name,
              java.lang.String value)
Parameters:
name - the name of the Switch
value - the value of the switch may be either On or Off

Switch

public Switch(java.lang.String name,
              java.lang.String label,
              java.lang.String value)
class constructor

Parameters:
name - the name of the Switch
label - the label of the Switch (to be used for display in the GUI)
value - the value of the Switch (either On of Off)
Method Detail

setState

public void setState(Switch.State state)
set the state of the switch

Parameters:
state - the new state of the switch

getState

public Switch.State getState()
Returns:
the state of the switch

getType

protected java.lang.String getType()
Specified by:
getType in class Element
Returns:
the type of the indi element


Copyright © 2008. All Rights Reserved.