edu.stanford.hci.dtools.statechart.model
Class StateConnectionModel

java.lang.Object
  extended by edu.stanford.hci.dtools.statechart.model.ModelElement
      extended by edu.stanford.hci.dtools.statechart.model.ConnectionModel
          extended by edu.stanford.hci.dtools.statechart.model.StateConnectionModel
All Implemented Interfaces:
java.io.Serializable, org.eclipse.ui.views.properties.IPropertySource

public class StateConnectionModel
extends ConnectionModel

Model for state-to-state transitions

This software is distributed under the BSD License.

Author:
Bjoern Hartmann ( bjoern(AT)stanford.edu ), Michael Bernstein ( mbernst(AT)stanford.edu )
See Also:
Serialized Form

Nested Class Summary
static class StateConnectionModel.BooleanConnector
           
 
Field Summary
static java.lang.String BOOLEAN_PROP
           
 
Fields inherited from class edu.stanford.hci.dtools.statechart.model.ConnectionModel
DASHED_CONNECTION, INPUT_PROP, LINESTYLE_PROP, SOLID_CONNECTION
 
Constructor Summary
StateConnectionModel(ShapeModel source, ShapeModel target, InputComponent firstComponent, EventConditional firstEvent)
           
 
Method Summary
 void addInputPair(InputComponent c, EventConditional e)
           
 StateConnectionModel.BooleanConnector getBooleanConnector()
           
 java.util.ArrayList<InputPair> getInputPairs()
          Returns the input device responsible for this connection.
 java.lang.Object getPropertyValue(java.lang.Object id)
          Returns the value as String for the Property Sheet
 void removeInputPair(InputComponent c, java.lang.String e)
          remove an input pair matches input components by private name removes if event also matches or if passed event is null
 java.util.List<InputPair> removeInputPairs(InputComponent c)
          remove and return all input pairs matching a passed input component
 void setBooleanConnector(StateConnectionModel.BooleanConnector booleanConnector)
           
 void setPropertyValue(java.lang.Object id, java.lang.Object value)
          Sets the lineStyle based on the String provided by the PropertySheet
 void updateInputPair(InputPair pair, InputComponent newInput, EventConditional newEvent)
           
 
Methods inherited from class edu.stanford.hci.dtools.statechart.model.ConnectionModel
disconnect, getLineStyle, getPropertyDescriptors, getSource, getTarget, reconnect, reconnect, setLineStyle, setSource, setTarget
 
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, toString, wait, wait, wait
 

Field Detail

BOOLEAN_PROP

public static final java.lang.String BOOLEAN_PROP
See Also:
Constant Field Values
Constructor Detail

StateConnectionModel

public StateConnectionModel(ShapeModel source,
                            ShapeModel target,
                            InputComponent firstComponent,
                            EventConditional firstEvent)
Parameters:
source -
target -
firstComponent -
firstEvent -
Method Detail

getInputPairs

public java.util.ArrayList<InputPair> getInputPairs()
Returns the input device responsible for this connection.

Returns:
a possibly-null InputComponent instance

addInputPair

public void addInputPair(InputComponent c,
                         EventConditional e)

removeInputPair

public void removeInputPair(InputComponent c,
                            java.lang.String e)
remove an input pair matches input components by private name removes if event also matches or if passed event is null

Parameters:
c - input component
e - event for that component

removeInputPairs

public java.util.List<InputPair> removeInputPairs(InputComponent c)
remove and return all input pairs matching a passed input component


updateInputPair

public void updateInputPair(InputPair pair,
                            InputComponent newInput,
                            EventConditional newEvent)

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object id)
Returns the value as String for the Property Sheet

Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyValue in class ModelElement
See Also:
IPropertySource.getPropertyValue(java.lang.Object)

setPropertyValue

public void setPropertyValue(java.lang.Object id,
                             java.lang.Object value)
Sets the lineStyle based on the String provided by the PropertySheet

Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
setPropertyValue in class ModelElement
See Also:
IPropertySource.setPropertyValue(java.lang.Object, java.lang.Object)

getBooleanConnector

public StateConnectionModel.BooleanConnector getBooleanConnector()

setBooleanConnector

public void setBooleanConnector(StateConnectionModel.BooleanConnector booleanConnector)