|
||||||||||
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.DeviceModel
public class DeviceModel
The component (=model) for a device in the DeviceEditor
This software is distributed under the BSD License.
Field Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
DeviceModel()
|
|
DeviceModel(DeviceModel copy)
|
Method Summary | |
---|---|
DeviceDiagramModel |
getDiagramComponent()
Retrieve the DiagramModel that this shape is a child of. |
org.eclipse.swt.graphics.Image |
getIcon()
Icon for the tree |
java.lang.String |
getImageFilename()
|
org.eclipse.draw2d.geometry.Point |
getLocation()
|
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()
|
void |
setDiagramComponent(DeviceDiagramModel newDiagram)
Sets the diagram associated with this shape. |
void |
setImageFilename(java.lang.String filename)
Set the image file in the background of the device |
void |
setLocation(org.eclipse.draw2d.geometry.Point newLoc)
Set the location (X,Y) of the device outline |
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 newSize)
Set the Size of this shape. |
java.lang.String |
toString()
|
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 SIZE_PROP
public static final java.lang.String LOCATION_PROP
public static final java.lang.String IMAGE_PROP
Constructor Detail |
---|
public DeviceModel()
public DeviceModel(DeviceModel copy)
Method Detail |
---|
public void setImageFilename(java.lang.String filename)
newFile
- public java.lang.String getImageFilename()
public org.eclipse.swt.graphics.Image getIcon()
public java.lang.String toString()
toString
in class java.lang.Object
public void setSize(org.eclipse.draw2d.geometry.Dimension newSize)
newSize
- a non-null Dimension instance or nullpublic org.eclipse.draw2d.geometry.Dimension getSize()
public org.eclipse.draw2d.geometry.Point getLocation()
public void setLocation(org.eclipse.draw2d.geometry.Point newLoc)
newLoc
- 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |