edu.stanford.hci.dtools.deviceeditor.components
Class DeviceDiagramModel

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

public class DeviceDiagramModel
extends ModelElement

This software is distributed under the BSD License.

This code is partially based on code that is copyright (c) 2004 Elias Volanakis. See License.txt

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

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.
 
Constructor Summary
DeviceDiagramModel()
          listens to incoming OSC messages
 
Method Summary
 boolean addChild(DeviceModel d)
          For use with the device editor -- adds a DeviceModel to this diagram Always places the Rectangular base device in the back!
 boolean addChild(IOComponent s)
          For use with the device editor -- adds all IO components.
 void executeCommand(org.eclipse.gef.commands.Command cmd)
           
 void export()
           
 void export(java.util.Map<StateModel,java.util.List<ComponentConnectionModel>> map)
           
 void fixOscListeners()
           
 java.util.List<ModelElement> getChildren()
          Return a List of Shapes in this diagram.
 DeviceEditor getDeviceEditor()
           
 boolean removeChild(DeviceModel s)
           
 boolean removeChild(IOComponent s)
           
 void setDeviceEditor(DeviceEditor editor)
           
 void setHardwareConnection(boolean b)
          set the hardwareconnectionstatus of all iocomponent children and export
 
Methods inherited from class edu.stanford.hci.dtools.statechart.model.ModelElement
addPropertyChangeListener, getEditableValue, getPropertyDescriptors, getPropertyValue, isPropertySet, removePropertyChangeListener, resetPropertyValue, setPropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHILD_ADDED_PROP

public static final java.lang.String CHILD_ADDED_PROP
Property ID to use when a child is added to this diagram.

See Also:
Constant Field Values

CHILD_REMOVED_PROP

public static final java.lang.String CHILD_REMOVED_PROP
Property ID to use when a child is removed from this diagram.

See Also:
Constant Field Values
Constructor Detail

DeviceDiagramModel

public DeviceDiagramModel()
listens to incoming OSC messages

Method Detail

addChild

public boolean addChild(DeviceModel d)
For use with the device editor -- adds a DeviceModel to this diagram Always places the Rectangular base device in the back!


addChild

public boolean addChild(IOComponent s)
For use with the device editor -- adds all IO components.

Parameters:
s -
Returns:

getChildren

public java.util.List<ModelElement> getChildren()
Return a List of Shapes in this diagram. The returned List should not be modified.


removeChild

public boolean removeChild(IOComponent s)

removeChild

public boolean removeChild(DeviceModel s)

setDeviceEditor

public void setDeviceEditor(DeviceEditor editor)

getDeviceEditor

public DeviceEditor getDeviceEditor()

export

public void export(java.util.Map<StateModel,java.util.List<ComponentConnectionModel>> map)

export

public void export()

executeCommand

public void executeCommand(org.eclipse.gef.commands.Command cmd)

setHardwareConnection

public void setHardwareConnection(boolean b)
set the hardwareconnectionstatus of all iocomponent children and export


fixOscListeners

public void fixOscListeners()