org.indi.objects
Class Switch
java.lang.Object
org.indi.objects.Object<Object>
org.indi.objects.Element
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 |
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 |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Switch
public Switch(java.lang.String name,
java.lang.String label,
Switch.State state)
- class constructor
- Parameters:
name
- the name of the Switchlabel
- 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 Switchvalue
- 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 Switchlabel
- the label of the Switch (to be used for display in the
GUI)value
- the value of the Switch (either On of Off)
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.