|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.upb.swt.epctools.model.Node
public abstract class Node
This is an important EPC model class representing an EPC node
| Field Summary | |
|---|---|
private int |
m_color
|
protected java.lang.String |
m_description
|
private EPC |
m_epc
|
private int |
m_height
|
private byte |
m_highlighted
|
private int |
m_id
|
private java.util.Vector<Arc> |
m_incoming_arcs
|
private ModelListenerList |
m_listener
|
protected java.lang.String |
m_name
|
private java.util.Vector<Arc> |
m_outgoing_arcs
|
private int |
m_pos_x
|
private int |
m_pos_y
|
private int |
m_type
|
private int |
m_width
|
NodePart |
part
|
static byte |
STATE_FALSE
|
static byte |
STATE_TRUE
|
static byte |
STATE_UNKNOWN
|
static int |
TYPE_AND
|
static int |
TYPE_EVENT
|
static int |
TYPE_FUNCTION
|
static int |
TYPE_NONE
Note: This is a complete list of all Node types. |
static int |
TYPE_OBJECT
|
static int |
TYPE_OR
|
static int |
TYPE_RANGE
|
static int |
TYPE_ROLE
|
static int |
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 | |
|---|---|
Node(EPC parent_epc)
Initialization |
|
| Method Summary | |
|---|---|
void |
addListener(ModelListener obj)
... |
abstract void |
computeNextState()
This function must be overwritten by derived classes; it computes the resulting state when process folders are processed to outgoing Arcs. |
static Node |
createNode(EPC parent_epc,
int type)
Returns a new Node of given type. |
void |
forwardMessage(int message)
Forwards a message to all listener objects. |
int |
getColor()
Returns the current color |
java.lang.String |
getDescription()
Returns the description of "this" Node. |
Node |
getDistantParent()
This function scans parent Nodes and return a Node as far as possible from "this" Therefore a random path is traversed starting at "this". |
EPC |
getEPC()
Returns the parent EPC. |
int |
getHeight()
Returns the height. |
int |
getId()
Returns the id of "this" Node. |
java.util.Vector<Arc> |
getIncomingArcs()
Returns all incoming Arcs. |
ModelListenerList |
getListeners()
Returns a list of all listeners. |
void |
getMessage(int msg_id)
This function is the listener callback function |
java.lang.String |
getName()
Returns the name of "this" Node. |
java.util.Vector<Arc> |
getOutgoingArcs()
Returns all outgoing Arcs. |
int |
getPosX()
Returns the x position. |
int |
getPosY()
Returns the y position. |
int |
getType()
Returns the type of "this" Node |
static java.util.Vector |
getTypes()
Returns a new Vector with all types. |
static java.lang.String |
getTypeString(int type)
Returns a string corresponding to the parameter type. |
int |
getWidth()
Returns the width of "this" Node. |
boolean |
hasLocalSemantics()
Returns true if the semantics of "this" Node can be computed with local information. |
byte |
isEnabled()
This function should be overwritten by derived classes to return whether the concerned Node may process folders to the Outgoing Arcs. |
byte |
isHighlighted()
Returns whether the Node should be highlighted or not in the graphical editor. |
byte |
isInContact()
Returns true if the Node is in a contact situation in the actual state. |
void |
removeListener(ModelListener obj)
... |
void |
sendRefreshMessage()
This method sends a refresh message to the NodePart. |
void |
setColor(int color)
Sets the color of "this". |
void |
setConstraint(int x,
int y,
int w,
int h)
This function can be used instead of setWidth(...), setHeight(...) etc. |
void |
setDescription(java.lang.String description)
This function sets the description of "this" Node. |
void |
setHeight(int height)
... |
void |
setHighlighted(byte enabled)
This function sets the state of this Node; it will influence the displayed graphics in the editor only. |
void |
setId(int id)
This function sets the id of "this" Node. |
void |
setName(java.lang.String name)
This function sets the name of "this" Node. |
void |
setPosition(int x,
int y)
|
void |
setType(int type)
Sets the type of "this" Node, but only if it is not already defined. |
void |
setWidth(int width)
... |
protected byte |
simpleIsEnabled()
Returns a positive result (it can be used by derived classes to define isEnabled()) iff all incoming arcs have at least 1 folder. |
byte |
simpleIsInContact()
This function is a default function for computeContactFormula() |
protected void |
simpleNextStateComputation()
This function computes the following changes to the state of process folders: All incoming folders are removed and the number of folders at outgoing arcs is increased by one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int m_id
protected java.lang.String m_name
protected java.lang.String m_description
private int m_pos_x
private int m_pos_y
private int m_width
private int m_height
private java.util.Vector<Arc> m_outgoing_arcs
private java.util.Vector<Arc> m_incoming_arcs
private EPC m_epc
private int m_color
private int m_type
private ModelListenerList m_listener
public NodePart part
private byte m_highlighted
public static final byte STATE_FALSE
public static final byte STATE_TRUE
public static final byte STATE_UNKNOWN
public static final int TYPE_NONE
public static final int TYPE_EVENT
public static final int TYPE_FUNCTION
public static final int TYPE_ROLE
public static final int TYPE_OBJECT
public static final int TYPE_OR
public static final int TYPE_AND
public static final int TYPE_XOR
public static final int TYPE_RANGE
| Constructor Detail |
|---|
public Node(EPC parent_epc)
| Method Detail |
|---|
public EPC getEPC()
public ModelListenerList getListeners()
public int getId()
public void setId(int id)
public void setHighlighted(byte enabled)
public void sendRefreshMessage()
public byte isHighlighted()
public byte isInContact()
public byte isEnabled()
public abstract void computeNextState()
public byte simpleIsInContact()
protected void simpleNextStateComputation()
protected byte simpleIsEnabled()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public int getPosX()
public int getPosY()
public int getWidth()
public int getHeight()
public void setWidth(int width)
public void setHeight(int height)
public void setPosition(int x,
int y)
public void setConstraint(int x,
int y,
int w,
int h)
public void addListener(ModelListener obj)
public void removeListener(ModelListener obj)
public void forwardMessage(int message)
public java.util.Vector<Arc> getOutgoingArcs()
public java.util.Vector<Arc> getIncomingArcs()
public Node getDistantParent()
public void setColor(int color)
public int getColor()
public int getType()
public void setType(int type)
public boolean hasLocalSemantics()
public static Node createNode(EPC parent_epc,
int type)
public static java.util.Vector getTypes()
public static java.lang.String getTypeString(int type)
public void getMessage(int msg_id)
ModelListener
getMessage in interface ModelListenermsg_id - Message id
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||