public class GraphMLNode extends AbstractGraphMLNode implements LabeledElement, java.lang.Cloneable
diagramidDIAMOND, ELLIPSE, FATARROW, FATARROW2, HEXAGON, OCTAGON, PARALLELOGRAM, PARALLELOGRAM2, RECTANGLE, RECTANGLE3D, ROUNDRECTANGLE, TRIANGLE, TRIANGLE2| Constructor and Description |
|---|
GraphMLNode(AbstractGraphMLDiagram diagram,
java.lang.String id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
GraphMLNode |
clone()
Clone the node.
|
void |
computeSize(float groupNodePadding,
boolean recurse)
Do nothing.
|
void |
computeSize(float groupNodePadding,
boolean realizedState,
boolean recurse)
Compute the size of the node.
|
NodeLabel |
createLabel(boolean createIfExist)
Create the node associated label.
|
float |
getHeight()
Return the height.
|
NodeLabel |
getLabel()
Return the node associated label.
|
java.lang.String |
getLabelText()
Return the element label text.
|
ShapeNode |
getOpenedShapeNode()
Return the shape node.
|
ShapeNode |
getRealizedShapeNode()
Return the shape node.
|
ShapeNode |
getShapeNode()
Return the shape node.
|
float |
getWidth()
Return the width.
|
float |
getX()
Return the x position.
|
float |
getY()
Return the y position.
|
boolean |
hasBorderColor()
Return true if the node has a border color.
|
boolean |
hasFillColor()
Return true if the node has a fill color.
|
boolean |
isAutosized()
Return true if the node is automatically sized depending on the node label.
|
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 |
setBorderStyle(LineStyle borderStyle)
Set the node border style.
|
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 node fill color.
|
void |
setGeometry(Geometry geometry)
Set the shape geometry.
|
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 |
setHeight(float height)
A shortcut to set the height.
|
void |
setHeightPadding(int padding)
Set the height padding for the default autosized property.
|
void |
setLabel(NodeLabel nodeLabel)
Set the label.
|
NodeLabel |
setLabel(java.lang.String text)
Set the element label text.
|
void |
setShapeNode(ShapeNode shape)
Set the shape node.
|
void |
setType(short type)
Set the shape type.
|
void |
setWidth(float width)
A shortcut to set the width.
|
void |
setWidthPadding(int padding)
Set the width padding for the default autosized property.
|
void |
setX(float x)
A shortcut to set the x position.
|
void |
setY(float y)
A shortcut to set the y position.
|
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, waitcreateLabelPlacement, getLabelPlacementgetDescription, getID, getURL, getURLAsString, hasDescription, hasURL, isTemplate, setDescription, setURL, setURLpublic GraphMLNode(AbstractGraphMLDiagram diagram, java.lang.String id)
diagram - the diagramid - the node idpublic void setAutosized(boolean autosized)
setAutosized in interface ShapeTypeautosized - true if the node is autosizedpublic boolean isAutosized()
public GraphMLNode clone()
IGraphMLNodeclone in interface IGraphMLNodeclone in class AbstractGraphMLNodeprotected void setDefaults()
public void setDefaultGeometry()
setDefaultGeometry in interface IGraphMLNodepublic void setType(short type)
public void setShapeNode(ShapeNode shape)
shape - the shape nodepublic 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 ShapeNode getOpenedShapeNode()
getOpenedShapeNode in interface IGraphMLNodepublic ShapeNode getRealizedShapeNode()
getRealizedShapeNode in interface IGraphMLNodepublic ShapeNode getShapeNode()
public void setX(float x)
x - the x positionpublic float getX()
public void setY(float y)
y - the y positionpublic float getY()
public void setWidth(float width)
width - the widthpublic float getWidth()
public void setHeight(float height)
height - the heightpublic float getHeight()
public void setWidthPadding(int padding)
setWidthPadding in interface ShapeTypepadding - the paddingpublic void setHeightPadding(int padding)
setHeightPadding in interface ShapeTypepadding - the paddingpublic void setGeometry(Geometry geometry)
setGeometry in interface ShapeTypegeometry - the geometrypublic void setDropShadow(DropShadow dropShadow)
setDropShadow in interface ShapeTypedropShadow - the node drop shadowpublic void setBorderStyle(LineStyle borderStyle)
setBorderStyle in interface ShapeTypeborderStyle - the node 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 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 NodeLabel getLabel()
getLabel in interface LabeledElementpublic NodeLabel createLabel(boolean createIfExist)
createLabel in interface LabeledElementcreateIfExist - true if a new label will be created even if it already existspublic NodeLabel setLabel(java.lang.String text)
public void setLabel(NodeLabel nodeLabel)
public void updateLabel()
updateLabel in interface IGraphMLNodeupdateLabel in interface LabeledElementpublic java.lang.String getLabelText()
getLabelText in interface LabeledElementCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence