de.upb.swt.epctools.model
Class ObjectItem

java.lang.Object
  extended by de.upb.swt.epctools.model.Node
      extended by de.upb.swt.epctools.model.Item
          extended by de.upb.swt.epctools.model.CItem
              extended by de.upb.swt.epctools.model.ObjectItem
All Implemented Interfaces:
ModelListener, java.beans.PropertyChangeListener, java.util.EventListener, org.eclipse.core.runtime.IAdaptable

public class ObjectItem
extends CItem
implements org.eclipse.core.runtime.IAdaptable, java.beans.PropertyChangeListener

This class represents an iEPC object node


Field Summary
(package private)  EditableBooleanProperty configurableProp
           
private  boolean consumed
           
(package private)  EditableComboProperty consumedProp
           
private  java.lang.String coptionality
           
(package private)  EditableComboProperty coptionalityProp
           
private  java.lang.String cusage
           
(package private)  EditableComboProperty cusageProp
           
(package private)  EditableProperty nameProp
           
private  int o_type
           
private  boolean optional
           
(package private)  EditableBooleanProperty optionalProp
           
(package private)  ReadableProperty otypeProp
           
private static java.lang.String PROPERTY_CONFIGURABLE
           
private static java.lang.String PROPERTY_CONSUMED
           
private static java.lang.String PROPERTY_COPTIONALITY
           
private static java.lang.String PROPERTY_CUSAGE
           
private static java.lang.String PROPERTY_NAME
           
private static java.lang.String PROPERTY_OPTIONAL
           
private static java.lang.String PROPERTY_OTYPE
           
(package private)  PropertyManager propertyManager
           
 
Fields inherited from class de.upb.swt.epctools.model.CItem
configurable
 
Fields inherited from class de.upb.swt.epctools.model.Item
C_WIDTH, FE_HEIGHT, FERO_WIDTH, ROC_HEIGHT
 
Fields inherited from class de.upb.swt.epctools.model.Node
m_description, m_name, part, STATE_FALSE, STATE_TRUE, STATE_UNKNOWN, TYPE_AND, TYPE_EVENT, TYPE_FUNCTION, TYPE_NONE, TYPE_OBJECT, TYPE_OR, TYPE_RANGE, TYPE_ROLE, TYPE_XOR
 
Fields inherited from interface de.upb.swt.epctools.model.tools.ModelListener
MSG_ARC_ADDED, MSG_ARC_RECONNECTED, MSG_ARC_REMOVED, MSG_BEND_POINT_CHANGE, MSG_CHANGED_ALGORITHM, MSG_CONSTRAINT_CHANGED, MSG_DESCRIPTION_CHANGED, MSG_FOLDERS_CHANGED, MSG_HIGHLIGHTING_CHANGED, MSG_IN_ARC_ADDED, MSG_IN_ARC_REMOVED, MSG_INFO_CHANGED, MSG_LOCATION_CHANGED, MSG_NAME_CHANGED, MSG_NODE_ADDED, MSG_NODE_REMOVED, MSG_OUT_ARC_ADDED, MSG_OUT_ARC_REMOVED, MSG_SIZE_CHANGED, MSG_SOURCE_CHANGED, MSG_STRUCTURE_CHANGED, MSG_TARGET_CHANGED
 
Constructor Summary
ObjectItem(EPC parent_epc)
           
 
Method Summary
private  void addProperties(PropertyManager manager)
          Adds any properties that should be exposed to the user to the PropertyManager
 java.lang.Object getAdapter(java.lang.Class adapter)
          Return a reference to the PropertyManager, which will handle interaction with the PropertiesView
 java.lang.String getCOptionality()
           
 java.lang.String getCUsage()
           
 int getOType()
           
 PropertyManager getPropertyManager()
           
 boolean isConsumed()
           
 boolean isOptional()
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void setConsumed(boolean consumed)
          Sets consumption to true only if o_type == TYPE_INPUT.
 void setCOptionality(java.lang.String value)
           
 void setCUsage(java.lang.String value)
           
 void setOptional(boolean optional)
           
 void setOType(int o_type)
           
 java.lang.String setOTypeProp()
           
 void updateLineStyle()
           
 
Methods inherited from class de.upb.swt.epctools.model.CItem
isConfigurable, setConfigurable
 
Methods inherited from class de.upb.swt.epctools.model.Item
computeNextState, isEnabled, isInContact
 
Methods inherited from class de.upb.swt.epctools.model.Node
addListener, createNode, forwardMessage, getColor, getDescription, getDistantParent, getEPC, getHeight, getId, getIncomingArcs, getListeners, getMessage, getName, getOutgoingArcs, getPosX, getPosY, getType, getTypes, getTypeString, getWidth, hasLocalSemantics, isHighlighted, removeListener, sendRefreshMessage, setColor, setConstraint, setDescription, setHeight, setHighlighted, setId, setName, setPosition, setType, setWidth, simpleIsEnabled, simpleIsInContact, simpleNextStateComputation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

o_type

private int o_type

consumed

private boolean consumed

optional

private boolean optional

cusage

private java.lang.String cusage

coptionality

private java.lang.String coptionality

PROPERTY_NAME

private static final java.lang.String PROPERTY_NAME
See Also:
Constant Field Values

PROPERTY_CONSUMED

private static final java.lang.String PROPERTY_CONSUMED
See Also:
Constant Field Values

PROPERTY_OPTIONAL

private static final java.lang.String PROPERTY_OPTIONAL
See Also:
Constant Field Values

PROPERTY_OTYPE

private static final java.lang.String PROPERTY_OTYPE
See Also:
Constant Field Values

PROPERTY_CONFIGURABLE

private static final java.lang.String PROPERTY_CONFIGURABLE
See Also:
Constant Field Values

PROPERTY_CUSAGE

private static final java.lang.String PROPERTY_CUSAGE
See Also:
Constant Field Values

PROPERTY_COPTIONALITY

private static final java.lang.String PROPERTY_COPTIONALITY
See Also:
Constant Field Values

propertyManager

PropertyManager propertyManager

nameProp

EditableProperty nameProp

consumedProp

EditableComboProperty consumedProp

optionalProp

EditableBooleanProperty optionalProp

otypeProp

ReadableProperty otypeProp

configurableProp

EditableBooleanProperty configurableProp

cusageProp

EditableComboProperty cusageProp

coptionalityProp

EditableComboProperty coptionalityProp
Constructor Detail

ObjectItem

public ObjectItem(EPC parent_epc)
Method Detail

isOptional

public boolean isOptional()

setOptional

public void setOptional(boolean optional)

setOType

public void setOType(int o_type)

getOType

public int getOType()

setCOptionality

public void setCOptionality(java.lang.String value)

getCOptionality

public java.lang.String getCOptionality()

setCUsage

public void setCUsage(java.lang.String value)

getCUsage

public java.lang.String getCUsage()

updateLineStyle

public void updateLineStyle()

isConsumed

public boolean isConsumed()

setConsumed

public void setConsumed(boolean consumed)
Sets consumption to true only if o_type == TYPE_INPUT. This function is not called when the file is loaded, but only when the Object figure already exists on canvas Note that consumption cannot be set if o_type==-1 (unset), which refers to a situation in which the Object hasn't any incoming/outgoing arc yet


getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Return a reference to the PropertyManager, which will handle interaction with the PropertiesView

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

getPropertyManager

public PropertyManager getPropertyManager()
Returns:
the property manager. If it has not already been created, create it now and add the properties to it

addProperties

private void addProperties(PropertyManager manager)
Adds any properties that should be exposed to the user to the PropertyManager

Parameters:
manager - The PropertyManager to which the properties should be added.

setOTypeProp

public java.lang.String setOTypeProp()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener