public class GraphMLGroupNode extends AbstractGraphMLNode implements ShapeType, NodeParent
diagramidDIAMOND, ELLIPSE, FATARROW, FATARROW2, HEXAGON, OCTAGON, PARALLELOGRAM, PARALLELOGRAM2, RECTANGLE, RECTANGLE3D, ROUNDRECTANGLE, TRIANGLE, TRIANGLE2| Constructor and Description |
|---|
GraphMLGroupNode(AbstractGraphMLDiagram diagram,
java.lang.String id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChild(IGraphMLNode node)
Adds a child node to the group.
|
GraphMLGroupNode |
addGroupNode()
Adds a child group node to the parent.
|
GraphMLGroupNode |
addGroupNode(java.lang.String id)
Add a group node with a specified id.
|
GraphMLGroupNode |
addGroupNodeFromTemplate(java.lang.String id)
Adds a child group node to the parent.
|
GraphMLGroupNode |
addGroupNodeFromTemplateWithLabel(java.lang.String id,
java.lang.String text)
Adds a child node to the parent, using a template, and with a specified label.
|
GraphMLGroupNode |
addGroupNodeWithLabel(java.lang.String text)
Adds a group node to the parent, and with a specified label.
|
GraphMLNode |
addNode()
Add a node with an id specified automatically.
|
GraphMLNode |
addNode(java.lang.String id)
Add a node with a specified id.
|
GraphMLNode |
addNodeFromTemplate(java.lang.String id)
Add a node with an id specified automatically.
|
GraphMLNode |
addNodeFromTemplateWithLabel(java.lang.String id,
java.lang.String text)
Adds a child node to the parent, using a template, and with a specified label.
|
GraphMLNode |
addNodeWithLabel(java.lang.String text)
Add a node with an id specified automatically, and with a specified label.
|
GraphMLGroupNode |
clone()
Clone the node.
|
void |
computeSize(float groupNodePadding,
boolean recurse)
Compute the size of the group node.
|
void |
computeSize(float groupNodePadding,
boolean realizedState,
boolean recurse)
Compute the size of the node.
|
int |
countGroupNodes()
Return the number of group nodes.
|
int |
countNodes()
Return the number of children nodes.
|
java.util.SortedMap<java.lang.String,IGraphMLNode> |
getChildren()
Return the children nodes.
|
int |
getClosedHeight()
Return the closed height.
|
GroupStateNode |
getClosedStateNode()
Return the closed state node.
|
int |
getClosedWidth()
Return the closed width.
|
GraphMLGroupDiagram |
getGroupDiagram()
Return the sub-diagram of the group.
|
java.util.SortedMap<java.lang.String,GraphMLGroupNode> |
getGroupNodes()
Return the group nodes.
|
short |
getGroupOpenedNodeSizeType()
Return the type which sets how the size of the node will be computed.
|
ShapeNode |
getOpenedShapeNode()
Return the opened shape node.
|
GroupStateNode |
getOpenedStateNode()
Return the opened state node.
|
ShapeNode |
getRealizedShapeNode()
Return the current realized shape node.
|
GroupStateNode |
getRealizedStateNode()
Return the current realized state node.
|
boolean |
getRealizedStateValue() |
GroupStateNode |
getStateNode(boolean stateValue)
Return a state node.
|
java.util.Map<java.lang.Boolean,GroupStateNode> |
getStateNodes()
Return the state nodes.
|
boolean |
hasBorderColor()
Return true if the node has a border color.
|
boolean |
hasFillColor()
Return true if the node has a fill color.
|
boolean |
hasGroupNodes()
Return true if there are group nodes.
|
void |
setAutosized(boolean autosized)
Set if the node is automatically sized depending on the node label.
|
boolean |
setBorderColor(java.lang.String borderColor)
Set the border color.
|
void |
setBorderInsets(java.awt.Insets insets)
Set the Insets.
|
void |
setBorderInsets(int value)
Set the border Insets.
|
void |
setBorderStyle(LineStyle borderStyle)
Set the border style.
|
void |
setClosedHeight(int closedHeight)
Set the closed height.
|
void |
setClosedWidth(int closedWidth)
Set the closed width.
|
void |
setDefaultGeometry()
Set the default geometry.
|
protected void |
setDefaults()
Set the defaults.
|
void |
setDropShadow(DropShadow dropShadow)
Set the node drop shadow.
|
boolean |
setFillColor(java.awt.Color fillColor)
Set the text color.
|
boolean |
setFillColor(java.lang.String fillColor)
Set the fill color.
|
void |
setGeometry(Geometry geometry)
Set the shape geometry.
|
void |
setGroupOpenedNodeSizeType(short nodeSizeType)
Set the type which sets how the size of the node will be computed.
|
void |
setHasBorderColor(boolean hasBorderColor)
Set if the node has a border color.
|
void |
setHasFillColor(boolean hasFillColor)
Set if the node has a fill color.
|
void |
setHeightPadding(int padding)
Set the height padding for the default autosized property.
|
void |
setInsets(java.awt.Insets insets)
Set the Insets.
|
void |
setInsets(int value)
Set the Insets.
|
void |
setLabel(NodeLabel nodeLabel)
Set the label.
|
NodeLabel |
setLabel(java.lang.String text)
Set the node group label text for both the states.
|
NodeLabel |
setLabel(java.lang.String text,
boolean stateValue)
Set the node group label text for one state.
|
void |
setRealizedStateValue(boolean stateValue) |
void |
setType(short type)
Set the shape type.
|
void |
setWidthPadding(int padding)
Set the width padding for the default autosized property.
|
void |
updateLabel()
Called when the label is updated.
|
addEdgeFrom, addEdgeTo, addFromEdge, addToEdge, computeSize, getDiagram, getFromEdges, getParent, getToEdges, repatriate, repatriate, setFromPortConstraint, setFromPortConstraint, setId, setParent, setToPortConstraint, setToPortConstraintgetDescription, getID, getURL, getURLAsString, hasURL, setDescription, setURL, setURLequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDiagramgetDescription, getID, getURL, getURLAsString, hasDescription, hasURL, isTemplate, setDescription, setURL, setURLpublic GraphMLGroupNode(AbstractGraphMLDiagram diagram, java.lang.String id)
diagram - the diagramid - the node idpublic GraphMLGroupDiagram getGroupDiagram()
public void setClosedWidth(int closedWidth)
closedWidth - the closed widthpublic int getClosedWidth()
public void setClosedHeight(int closedHeight)
closedHeight - the closed heightpublic int getClosedHeight()
public void setDefaultGeometry()
setDefaultGeometry in interface IGraphMLNodepublic void setGroupOpenedNodeSizeType(short nodeSizeType)
nodeSizeType - the type which sets how the size of the node will be computedGroupNodeSizeTypepublic short getGroupOpenedNodeSizeType()
GroupNodeSizeTypepublic void computeSize(float groupNodePadding,
boolean realizedState,
boolean recurse)
computeSize in interface IGraphMLNodegroupNodePadding - the padding between nodes used for computing group node sizesrealizedState - true for the state for which to compute the sizerecurse - recurse on children nodespublic void computeSize(float groupNodePadding,
boolean recurse)
computeSize in interface IGraphMLNodegroupNodePadding - the padding between nodes used for computing group node sizesrecurse - recurse on children nodespublic NodeLabel setLabel(java.lang.String text)
public NodeLabel setLabel(java.lang.String text, boolean stateValue)
text - the label textstateValue - the state valuepublic java.util.Map<java.lang.Boolean,GroupStateNode> getStateNodes()
public GroupStateNode getClosedStateNode()
public GroupStateNode getOpenedStateNode()
public GroupStateNode getStateNode(boolean stateValue)
stateValue - the state valuepublic void setRealizedStateValue(boolean stateValue)
public boolean getRealizedStateValue()
public ShapeNode getRealizedShapeNode()
getRealizedShapeNode in interface IGraphMLNodepublic ShapeNode getOpenedShapeNode()
getOpenedShapeNode in interface IGraphMLNodepublic GroupStateNode getRealizedStateNode()
public GraphMLGroupNode clone()
IGraphMLNodeclone in interface IGraphMLNodeclone in class AbstractGraphMLNodeprotected void setDefaults()
public boolean addChild(IGraphMLNode node)
addChild in interface NodeParentnode - the node to addtrue if the add is successful, and false otherwisepublic GraphMLNode addNode()
addNode in interface NodeParentpublic GraphMLNode addNodeWithLabel(java.lang.String text)
addNodeWithLabel in interface NodeParenttext - the node labelpublic GraphMLNode addNodeFromTemplate(java.lang.String id)
addNodeFromTemplate in interface NodeParentid - tehe template idpublic GraphMLNode addNodeFromTemplateWithLabel(java.lang.String id, java.lang.String text)
addNodeFromTemplateWithLabel in interface NodeParentid - the template idtext - the node labelpublic GraphMLNode addNode(java.lang.String id)
addNode in interface NodeParentid - the node idpublic GraphMLGroupNode addGroupNode()
addGroupNode in interface NodeParentpublic GraphMLGroupNode addGroupNodeWithLabel(java.lang.String text)
addGroupNodeWithLabel in interface NodeParenttext - the group node labelpublic GraphMLGroupNode addGroupNodeFromTemplate(java.lang.String id)
addGroupNodeFromTemplate in interface NodeParentid - the template idpublic GraphMLGroupNode addGroupNodeFromTemplateWithLabel(java.lang.String id, java.lang.String text)
addGroupNodeFromTemplateWithLabel in interface NodeParentid - the template idtext - the node labelpublic GraphMLGroupNode addGroupNode(java.lang.String id)
addGroupNode in interface NodeParentid - the group node idpublic java.util.SortedMap<java.lang.String,IGraphMLNode> getChildren()
getChildren in interface NodeParentpublic java.util.SortedMap<java.lang.String,GraphMLGroupNode> getGroupNodes()
getGroupNodes in interface NodeParentpublic int countNodes()
countNodes in interface NodeParentpublic int countGroupNodes()
countGroupNodes in interface NodeParentpublic boolean hasGroupNodes()
hasGroupNodes in interface NodeParentpublic boolean setFillColor(java.awt.Color fillColor)
setFillColor in interface ShapeTypefillColor - the colorpublic boolean setFillColor(java.lang.String fillColor)
setFillColor in interface ShapeTypefillColor - the colorpublic void setHasFillColor(boolean hasFillColor)
setHasFillColor in interface ShapeTypehasFillColor - true if the node has a fill colorpublic boolean hasFillColor()
hasFillColor in interface ShapeTypepublic void setBorderStyle(LineStyle borderStyle)
setBorderStyle in interface ShapeTypeborderStyle - the border stylepublic boolean setBorderColor(java.lang.String borderColor)
setBorderColor in interface ShapeTypeborderColor - the colorpublic void setHasBorderColor(boolean hasBorderColor)
setHasBorderColor in interface ShapeTypehasBorderColor - true if the node has a border colorpublic boolean hasBorderColor()
hasBorderColor in interface ShapeTypepublic void setInsets(java.awt.Insets insets)
insets - the Insetspublic void setInsets(int value)
value - the value, identical for each insets value (top, bottm, right, left).public void setBorderInsets(java.awt.Insets insets)
insets - the Insetspublic void setBorderInsets(int value)
value - the value, identical for each border insets value (top, bottom, right, left).public void setGeometry(Geometry geometry)
setGeometry in interface ShapeTypegeometry - the geometrypublic void setDropShadow(DropShadow dropShadow)
setDropShadow in interface ShapeTypedropShadow - the node drop shadowpublic void setAutosized(boolean autosized)
setAutosized in interface ShapeTypeautosized - true if the node is autosizedpublic void setWidthPadding(int padding)
setWidthPadding in interface ShapeTypepadding - the paddingpublic void setHeightPadding(int padding)
setHeightPadding in interface ShapeTypepadding - the paddingpublic void setLabel(NodeLabel nodeLabel)
public void updateLabel()
updateLabel in interface IGraphMLNodeCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence