|
||||||||||
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.deviceeditor.components.IOComponent
public abstract class IOComponent
Base class for all input & output components
This software is distributed under the BSD License.
Field Summary | |
---|---|
static java.lang.String |
CONNECTION_PROP
ID for hardware connection status |
static float |
CONTINUOUS_RANGE_MAX
|
static float |
CONTINUOUS_RANGE_MIN
|
static java.lang.String |
HARDWARE_PROP
ID for the Hardware property value (used for by the corresponding property descriptor). |
static java.lang.String |
HIGHLIGHT_PROP
|
static java.lang.String |
IMAGE_PROP
ID for the image property value (used for by the corresponding property descriptor). |
static java.lang.String |
LOCATION_PROP
Property ID to use when the location of this shape is modified. |
static java.lang.String |
SIZE_PROP
Property ID to use then the size of this shape is modified. |
static java.lang.String |
SOCKET_PROP
|
Constructor Summary | |
---|---|
IOComponent()
|
|
IOComponent(IOComponent copy)
|
|
IOComponent(java.lang.String name,
java.lang.String image,
org.eclipse.draw2d.geometry.Point location,
org.eclipse.draw2d.geometry.Dimension dimensions,
java.lang.String hardware)
Creates a new type of button input |
Method Summary | |
---|---|
java.util.List<ControlSignalSource> |
getControlSignalSources()
|
java.util.List<ControlSignalTarget> |
getControlSignalTargets()
|
abstract IOComponent |
getCopy()
|
ContinuousControlSignalTarget |
getDefaultContinuousControlSignalTarget()
|
ControlSignalSource |
getDefaultControlSignalSource()
Children that can provide or accept control signals should override to return a default signal handler here. |
DiscreteControlSignalTarget |
getDefaultDiscreteControlSignalTarget()
|
abstract java.lang.String |
getDefaultImage()
Return a string representing the image that should be returned if there is no other image to use |
DeviceConfiguration |
getDeviceConfiguration()
|
DeviceDiagramModel |
getDiagramComponent()
Retrieve the DiagramModel that this shape is a child of. |
java.lang.String |
getHardwareAddress()
Gets the hardware address currently associated with this IOComponent, or null if there is none |
boolean |
getHardwareConnection()
|
java.lang.String |
getHardwareConnectionImage()
|
boolean |
getHighlighted()
|
java.lang.String |
getImageFilename()
Returns an icon representing the button, used for transitions. |
org.eclipse.draw2d.geometry.Point |
getLocation()
Gets the point at which the component lives in a default-sized state |
java.lang.String |
getName()
Returns the name of the button |
java.lang.String |
getPrivateName()
Gets the .toString() name of: 1) This component (in the DeviceEditor) 2) The component this component is descended from (in the StatechartEditor) |
org.eclipse.ui.views.properties.IPropertyDescriptor[] |
getPropertyDescriptors()
Returns an array of IPropertyDescriptors for this shape. |
java.lang.Object |
getPropertyValue(java.lang.Object propertyId)
Return the property value for the given propertyId, or null. |
org.eclipse.draw2d.geometry.Dimension |
getSize()
Returns the dimensions of the component in a default-sized state |
boolean |
getSocket()
|
java.lang.String |
getSocketImage()
|
java.lang.String |
getTypeName()
|
void |
setDeviceConfiguration(DeviceConfiguration dc)
Sets the device configuration this Component is tied to |
void |
setDiagramComponent(DeviceDiagramModel newDiagram)
Sets the diagram associated with this shape. |
void |
setHardwareAddress(java.lang.String address)
Sets the hardware address of this IOComponent |
void |
setHardwareConnection(boolean isConnected)
|
void |
setHighlighted(boolean h)
|
void |
setImageFilename(java.lang.String filename)
Sets the image representing the component, used for transitions |
void |
setLocation(org.eclipse.draw2d.geometry.Point newLoc)
Sets the point at which the component lives in a default-sized state |
void |
setName(java.lang.String newName)
Sets the name representing the component |
void |
setPrivateName(java.lang.String newName)
Sets the .toString() name of: 1) This component (in the DeviceEditor) 2) The component this component is descended from (in the StatechartEditor) |
void |
setPropertyValue(java.lang.Object propertyId,
java.lang.Object value)
Set the property value for the given property id. |
void |
setSize(org.eclipse.draw2d.geometry.Dimension newDim)
Sets the dimensions of the component in a default-sized state |
void |
setSocket(boolean s)
|
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 |
---|
public static final java.lang.String LOCATION_PROP
public static final java.lang.String SIZE_PROP
public static final java.lang.String HARDWARE_PROP
public static final java.lang.String IMAGE_PROP
public static final java.lang.String CONNECTION_PROP
public static final java.lang.String HIGHLIGHT_PROP
public static final java.lang.String SOCKET_PROP
public static final float CONTINUOUS_RANGE_MIN
public static final float CONTINUOUS_RANGE_MAX
Constructor Detail |
---|
public IOComponent(java.lang.String name, java.lang.String image, org.eclipse.draw2d.geometry.Point location, org.eclipse.draw2d.geometry.Dimension dimensions, java.lang.String hardware)
name
- the name of the input (e.g. "play")image
- an iconic image representation of the inputpublic IOComponent()
public IOComponent(IOComponent copy)
Method Detail |
---|
public abstract IOComponent getCopy()
public java.lang.String getName()
public void setName(java.lang.String newName)
newName
- public org.eclipse.draw2d.geometry.Point getLocation()
public void setLocation(org.eclipse.draw2d.geometry.Point newLoc)
newLoc
- public org.eclipse.draw2d.geometry.Dimension getSize()
public void setSize(org.eclipse.draw2d.geometry.Dimension newDim)
public void setDeviceConfiguration(DeviceConfiguration dc)
public DeviceConfiguration getDeviceConfiguration()
public void setHardwareAddress(java.lang.String address)
public java.lang.String getHardwareAddress()
public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
The returned array is used to fill the property view, when the edit-part corresponding to this model element is selected.
getPropertyDescriptors
in interface org.eclipse.ui.views.properties.IPropertySource
getPropertyDescriptors
in class ModelElement
descriptors
,
getPropertyValue(Object)
,
setPropertyValue(Object, Object)
public java.lang.Object getPropertyValue(java.lang.Object propertyId)
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 ModelElement
descriptors
,
getPropertyDescriptors()
public void setPropertyValue(java.lang.Object propertyId, java.lang.Object value)
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 ModelElement
descriptors
,
getPropertyDescriptors()
public DeviceDiagramModel getDiagramComponent()
public void setDiagramComponent(DeviceDiagramModel newDiagram)
public java.lang.String getPrivateName()
public void setPrivateName(java.lang.String newName)
public java.lang.String getImageFilename()
public void setImageFilename(java.lang.String filename)
filename
- public abstract java.lang.String getDefaultImage()
public ControlSignalSource getDefaultControlSignalSource()
public DiscreteControlSignalTarget getDefaultDiscreteControlSignalTarget()
public ContinuousControlSignalTarget getDefaultContinuousControlSignalTarget()
public boolean getHardwareConnection()
public void setHardwareConnection(boolean isConnected)
public java.lang.String getHardwareConnectionImage()
public java.lang.String getSocketImage()
public java.lang.String getTypeName()
public boolean getHighlighted()
public void setHighlighted(boolean h)
public boolean getSocket()
public void setSocket(boolean s)
public java.util.List<ControlSignalSource> getControlSignalSources()
public java.util.List<ControlSignalTarget> getControlSignalTargets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |