public class HolonSwitch extends AbstractCpsObject
Constructor and Description |
---|
HolonSwitch(AbstractCpsObject obj)
Create a copy of an existing HolonSwitch.
|
HolonSwitch(java.lang.String objName)
Create a new HolonSwitch with the default name ("Switch"), a default
value of automatic handle and active status.
|
Modifier and Type | Method and Description |
---|---|
boolean[] |
getActiveAt()
All values of the graph for the selected Switch (only auto-Mode) get the
activeAt Array.
|
boolean |
getActiveManual()
Returns the ManualState.
|
java.util.LinkedList<java.awt.Point> |
getGraphPoints()
For automatic use only (throught the graph).
|
boolean |
getManualMode()
Get manualmode state.
|
boolean |
getState()
Overall status of the switch (manual or automatic mode).
|
boolean |
getState(int timeStep)
Getter for the status of the Switch at a given timestep.
|
void |
setActiveAt(boolean active)
Set the value of the Switch.
|
void |
setAutoState(boolean state)
Set the state of the Switch to automatic.
|
void |
setGraphPoints(java.util.LinkedList<java.awt.Point> points)
Set the values of the switch in the graph (auto. mode only).
|
void |
setManualMode(boolean mode)
Set the overall value of the Switch (manual mode).
|
void |
setManualState(boolean state)
Change the state of the Switch to manual.
|
void |
switchState()
Calculates the state of the Switch.
|
addConnection, addPseudoTag, addTag, getBorderColor, getConnectedTo, getConnections, getID, getImage, getName, getObjName, getPosition, getPseudoTags, getSav, getTag, resetTags, setBorderColor, setConnections, setID, setImage, setName, setObjName, setPosition, setPosition, setPseudoTags, setSav, setTags
public HolonSwitch(java.lang.String objName)
objName
- Stringpublic HolonSwitch(AbstractCpsObject obj)
obj
- the Object to copypublic void switchState()
public boolean getState(int timeStep)
timeStep
- intpublic boolean getState()
public void setManualState(boolean state)
state
- the Statepublic void setAutoState(boolean state)
state
- the Statepublic java.util.LinkedList<java.awt.Point> getGraphPoints()
public void setGraphPoints(java.util.LinkedList<java.awt.Point> points)
points
- the Graph pointspublic boolean[] getActiveAt()
public boolean getActiveManual()
public void setActiveAt(boolean active)
active
- the default valuepublic void setManualMode(boolean mode)
mode
- the mode (boolean)public boolean getManualMode()