|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.visual.backward.ModelElement
pl.edu.agh.cast.model.visual.backward.ConnectionGroup
public class ConnectionGroup
Stores list of all connections between two nodes.
Field Summary | |
---|---|
static String |
CONNECTION_COUNT_CHANGED
Name of the Connection count changed event. |
static String |
DOUBLE_CONNECTION_SOURCE_LABEL
Name of the Connection double line source-to-target label changed event. |
static String |
DOUBLE_CONNECTION_TARGET_LABEL
Name of the Connection double line target-to-source label changed event. |
static String |
LINE_COLOR
Name of the Line color changed event. |
static String |
LINE_THICKNESS
Name of the Line thickness changed event. |
static String |
SINGLE_CONNECTION_LABEL
Name of the Connection single line label changed event. |
static String |
VARIABLE_THICKNESS_CONNECTION_LABEL
Name of the Variable thickness line label changed event. |
Fields inherited from class pl.edu.agh.cast.model.visual.backward.ModelElement |
---|
ATTRIBUTE_CHANGE, attributeValues |
Constructor Summary | |
---|---|
ConnectionGroup(Node left,
Node right,
ConnectionGroupAttributeManager attributeManager)
Creates a connection group. |
Method Summary | |
---|---|
void |
addConnection(Connection connection)
Adds new Connection to this group. |
void |
addConnectionGroupToNodes()
Adds this connection group to both nodes. |
void |
addLeftConnection(Connection connection)
Adds a new Connection originating from left node. |
void |
addRightConnection(Connection connection)
Adds a new Connection originating from right node. |
void |
copyTo(ConnectionGroup that)
Copies all fields of this ConnectionGroup instance to that instance. |
boolean |
equals(Object obj)
Two ConnectionGroup s are equal if their sources and targets are equal. |
List<Connection> |
getAllConnections()
Returns the list of all Connection s in this group. |
AttributeManager |
getAttributeManager()
Returns attribute manager for this container. |
int |
getConnectionCount()
|
List<Connection> |
getLeftConnections()
Deprecated. Use getSourceConnectionsFor(Node) |
ConnectionGroupAttributeManager |
getPropertyManager()
|
List<Connection> |
getRightConnections()
Deprecated. Use getTargetConnectionsFor(Node) |
Node |
getSource()
|
int |
getSourceConnectionCountFor(Node node)
Returns the number of connections from source to target for given Node . |
List<Connection> |
getSourceConnectionsFor(Node node)
Returns a list of source Connection s for node . |
Node |
getTarget()
|
int |
getTargetConnectionCountFor(Node node)
Returns the number of connections from target to source for given Node . |
List<Connection> |
getTargetConnectionsFor(Node node)
Returns a list of target Connection s for node . |
int |
hashCode()
|
boolean |
isBetween(Node node1,
Node node2)
Checks if this connection group is between two given nodes. |
void |
removeConnection(Connection connection)
Removes Connection to this group. |
void |
removeConnectionGroupFromNodes()
Removes this connection group from both nodes - counterpart of addConnectionGroupToNodes() . |
void |
removeLeftConnection(Connection connection)
Removes a Connection originating from left node. |
void |
removeRightConnection(Connection connection)
Removes a Connection originating from right node. |
void |
setSource(Node node)
Sets source node of this connection group. |
void |
setTarget(Node node)
Sets target node of this connection group. |
String |
toString()
|
Methods inherited from class pl.edu.agh.cast.model.visual.backward.ModelElement |
---|
addPropertyChangeListener, bindToAttributeManager, copyAttributes, copyAttributeValues, firePropertyChange, getAllValues, getAttributeValue, getMid, isAttributeEditable, isAttributeSettable, isSaved, propertyChange, readResolve, removePropertyChangeListener, removePropertyValue, setAttributeValue, setAttributeValue, setMid, setSaved |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONNECTION_COUNT_CHANGED
public static final String SINGLE_CONNECTION_LABEL
public static final String DOUBLE_CONNECTION_SOURCE_LABEL
public static final String DOUBLE_CONNECTION_TARGET_LABEL
public static final String VARIABLE_THICKNESS_CONNECTION_LABEL
public static final String LINE_THICKNESS
public static final String LINE_COLOR
Constructor Detail |
---|
public ConnectionGroup(Node left, Node right, ConnectionGroupAttributeManager attributeManager)
left
- left side node; may not be nullright
- right side node; may not be nullattributeManager
- AttributeManager
for this ConnectionGroup
Method Detail |
---|
public int getConnectionCount()
public int getTargetConnectionCountFor(Node node)
Node
.
node
- the node to count connections for
public int getSourceConnectionCountFor(Node node)
Node
.
node
- the node to count connections for
@Deprecated public List<Connection> getLeftConnections()
getSourceConnectionsFor(Node)
@Deprecated public List<Connection> getRightConnections()
getTargetConnectionsFor(Node)
public List<Connection> getSourceConnectionsFor(Node node)
Connection
s for node
.
node
- Node
to get source Connection
s for
node
public List<Connection> getTargetConnectionsFor(Node node)
Connection
s for node
.
node
- Node
to get target Connection
s for
node
public List<Connection> getAllConnections()
Connection
s in this group.
Connection
s in this grouppublic Node getSource()
public void setSource(Node node)
node
- source node; may not be null
IllegalArgumentException
- if node is nullpublic Node getTarget()
public void setTarget(Node node)
node
- target node; may not be null
IllegalArgumentException
- if node is nullpublic void addLeftConnection(Connection connection)
Connection
originating from left node.
connection
- new Connection
originating from left nodepublic void addRightConnection(Connection connection)
Connection
originating from right node.
connection
- new Connection
originating from right nodepublic void removeLeftConnection(Connection connection)
Connection
originating from left node.
connection
- Connection
originating from left nodepublic void removeRightConnection(Connection connection)
Connection
originating from right node.
connection
- Connection
originating from right nodepublic void addConnectionGroupToNodes()
public void removeConnectionGroupFromNodes()
addConnectionGroupToNodes()
.
public boolean isBetween(Node node1, Node node2)
node1
- first nodenode2
- second node
true
if this connection group is between two given nodespublic void addConnection(Connection connection)
Connection
to this group.
connection
- new Connection
public void removeConnection(Connection connection)
Connection
to this group.
connection
- Connection
to removepublic String toString()
toString
in class Object
Object.toString()
public ConnectionGroupAttributeManager getPropertyManager()
public boolean equals(Object obj)
ConnectionGroup
s are equal if their sources and targets are equal.
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void copyTo(ConnectionGroup that)
ConnectionGroup
instance to that
instance.
that
- instance of ConnectionGroup
to copy this instance topublic AttributeManager getAttributeManager()
getAttributeManager
in interface AttributeValueContainer
getAttributeManager
in class ModelElement
ModelElement.getAttributeManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |