|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.dtools.statechart.model.ModelElement edu.stanford.hci.dtools.statechart.model.ShapeModel edu.stanford.hci.dtools.statechart.model.StateModel
public class StateModel
This software is distributed under the BSD License.
Field Summary | |
---|---|
static java.lang.String |
CHILD_ADDED_PROP
Property ID to use when a child is added to this diagram. |
static java.lang.String |
CHILD_REMOVED_PROP
Property ID to use when a child is removed from this diagram. |
static java.lang.String |
CURRENT_RUN_MODE_STATE
Property ID to use when the state becomes the current state in Run Mode |
static java.lang.String |
DEVICE_CONFIG_PROP
Property ID to use when the device config has been changed and we have new children |
static java.lang.String |
HAS_SOURCE_CODE_PROP
|
static java.lang.String |
START_RUN_MODE_STATE
Property ID to use when the state is the start state for Run Mode |
static java.lang.String |
STATENAME_CHANGED_PROP
|
static java.lang.String |
STATENAME_PROP
Property ID to use when a child is added to this diagram. |
Fields inherited from class edu.stanford.hci.dtools.statechart.model.ShapeModel |
---|
DIAGRAM_PROP, LOCATION_PROP, SIZE_PROP, SOURCE_CONNECTIONS_PROP, TARGET_CONNECTIONS_PROP |
Constructor Summary | |
---|---|
StateModel()
|
Method Summary | |
---|---|
boolean |
addChild(IOModel s)
Add a component to this diagram. |
java.util.List<IOModel> |
getChildren()
Return a List of IOmodels in this diagram. |
java.lang.Boolean |
getCurrentState()
|
org.eclipse.swt.graphics.Image |
getIcon()
Return a pictogram (small icon) describing this model element. |
java.lang.String |
getJavaClassName()
|
java.lang.String |
getJavaFileName()
|
java.lang.Object |
getPropertyValue(java.lang.Object propertyId)
Return the property value for the given propertyId, or null. |
java.lang.Boolean |
getStartState()
|
java.lang.String |
getStateName()
|
boolean |
hasCode()
|
void |
realizeStateInHardware()
Tells all its children to realize themselves (if they're capable of doing so) |
boolean |
removeAllChildren()
|
boolean |
removeChild(IOModel s)
Remove a shape from this diagram. |
void |
setCurrentState(java.lang.Boolean isCurrentState)
Tell this state it is (or is not) the current state in run mode |
void |
setDiagramModel(DiagramModel newDiagram)
Tells this state which diagram model it's associated with |
void |
setHasCode(boolean b)
|
void |
setLocation(org.eclipse.draw2d.geometry.Point newLoc)
Set the Location of this shape. |
void |
setPropertyValue(java.lang.Object propertyId,
java.lang.Object value)
Set the property value for the given property id. |
void |
setStartState(java.lang.Boolean isStartState)
Tell this state it is the start state for Run Mode |
void |
setStateName(java.lang.String s)
|
java.lang.String |
toString()
|
void |
updateBoundsForDeviceConfig(DeviceConfiguration deviceConfig)
Resizes the state based on the new device size |
void |
updateDeviceConfiguration(DeviceConfiguration deviceConfig,
IOComponentHashMap deviceMapping,
java.util.Map<StateModel,java.util.List<ComponentConnectionModel>> componentConnectionMap)
Sets the state up with whatever the current device configuaration is. |
Methods inherited from class edu.stanford.hci.dtools.statechart.model.ShapeModel |
---|
createImage, getDiagramModel, getLocation, getPropertyDescriptors, getSize, getSourceConnections, getTargetConnections, setSize |
Methods inherited from class edu.stanford.hci.dtools.statechart.model.ModelElement |
---|
addPropertyChangeListener, getEditableValue, isPropertySet, removePropertyChangeListener, resetPropertyValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CHILD_ADDED_PROP
public static final java.lang.String CHILD_REMOVED_PROP
public static final java.lang.String CURRENT_RUN_MODE_STATE
public static final java.lang.String START_RUN_MODE_STATE
public static final java.lang.String DEVICE_CONFIG_PROP
public static final java.lang.String STATENAME_PROP
public static final java.lang.String STATENAME_CHANGED_PROP
public static final java.lang.String HAS_SOURCE_CODE_PROP
Constructor Detail |
---|
public StateModel()
Method Detail |
---|
public void updateDeviceConfiguration(DeviceConfiguration deviceConfig, IOComponentHashMap deviceMapping, java.util.Map<StateModel,java.util.List<ComponentConnectionModel>> componentConnectionMap)
public void updateBoundsForDeviceConfig(DeviceConfiguration deviceConfig)
deviceConfig
- public org.eclipse.swt.graphics.Image getIcon()
ShapeModel
getIcon
in class ShapeModel
public void setCurrentState(java.lang.Boolean isCurrentState)
isCurrentState
- public java.lang.Boolean getCurrentState()
public void setStartState(java.lang.Boolean isStartState)
isStartState
- public java.lang.Boolean getStartState()
public void setLocation(org.eclipse.draw2d.geometry.Point newLoc)
ShapeModel
setLocation
in class ShapeModel
newLoc
- a non-null Point instancepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getPropertyValue(java.lang.Object propertyId)
ShapeModel
The property view uses the IDs from the IPropertyDescriptors array to obtain the value of the corresponding properties.
getPropertyValue
in interface org.eclipse.ui.views.properties.IPropertySource
getPropertyValue
in class ShapeModel
ShapeModel.descriptors
,
ShapeModel.getPropertyDescriptors()
public void setDiagramModel(DiagramModel newDiagram)
setDiagramModel
in class ShapeModel
public void setPropertyValue(java.lang.Object propertyId, java.lang.Object value)
ShapeModel
The property view uses the IDs from the IPropertyDescriptors array to set the values of the corresponding properties.
setPropertyValue
in interface org.eclipse.ui.views.properties.IPropertySource
setPropertyValue
in class ShapeModel
ShapeModel.descriptors
,
ShapeModel.getPropertyDescriptors()
public void realizeStateInHardware()
public boolean addChild(IOModel s)
s
- a non-null shape instance
public java.util.List<IOModel> getChildren()
public boolean removeChild(IOModel s)
s
- a non-null shape instance;
public boolean removeAllChildren()
public java.lang.String getStateName()
public void setStateName(java.lang.String s)
public boolean hasCode()
public java.lang.String getJavaFileName()
public java.lang.String getJavaClassName()
public void setHasCode(boolean b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |