public class ShapeNode extends java.lang.Object implements ShapeType, java.lang.Cloneable
DIAMOND, ELLIPSE, FATARROW, FATARROW2, HEXAGON, OCTAGON, PARALLELOGRAM, PARALLELOGRAM2, RECTANGLE, RECTANGLE3D, ROUNDRECTANGLE, TRIANGLE, TRIANGLE2
Constructor and Description |
---|
ShapeNode() |
ShapeNode(AbstractGraphMLNode node)
Constructor.
|
ShapeNode(short type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
autosize()
Autosize this node geometry if it is autosized.
|
ShapeNode |
clone() |
void |
copy(ShapeNode template)
Copy a template.
|
LineStyle |
getBorderStyle()
Return the border style.
|
DropShadow |
getDropShadow()
Return the shape node drop shadow.
|
java.lang.String |
getFillColor()
Return the fill color.
|
Geometry |
getGeometry()
Return the shape geometry.
|
int |
getHeightPadding()
Return the height padding for the default autosized property.
|
NodeLabel |
getLabel()
Return the label.
|
AbstractGraphMLNode |
getParentNode()
Return the parent node.
|
short |
getType()
Return the shape type.
|
java.lang.String |
getTypeAsString()
Return the shape node type as a String.
|
int |
getWidthPadding()
Return the width padding for the default autosized property.
|
boolean |
hasBorderColor()
Return true if the Shape has a border color.
|
boolean |
hasDropShadow()
Return true if the shape node has a drop shadow.
|
boolean |
hasFillColor()
Return true if the Shape has a fill color.
|
boolean |
hasLabel()
Return true if the shape has a label.
|
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 border style.
|
void |
setDropShadow(DropShadow dropShadow)
Set the shape 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 |
setHasBorderColor(boolean hasBorderColor)
Set if the Shape has a border color.
|
void |
setHasFillColor(boolean hasFillColor)
Set if the Shape has a fill color.
|
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 |
setType(short type)
Set the shape type.
|
void |
setWidthPadding(int padding)
Set the width padding for the default autosized property.
|
public ShapeNode()
public ShapeNode(AbstractGraphMLNode node)
node
- the parent nodepublic ShapeNode(short type)
type
- the typepublic AbstractGraphMLNode getParentNode()
public void copy(ShapeNode template)
template
- the templatepublic void setDropShadow(DropShadow dropShadow)
setDropShadow
in interface ShapeType
dropShadow
- the shape node drop shadowpublic DropShadow getDropShadow()
public boolean hasDropShadow()
public void setType(short type)
public ShapeNode clone()
clone
in class java.lang.Object
public void setLabel(NodeLabel nodeLabel)
public NodeLabel setLabel(java.lang.String text)
public boolean hasLabel()
public NodeLabel getLabel()
public void setWidthPadding(int padding)
setWidthPadding
in interface ShapeType
padding
- the paddingpublic int getWidthPadding()
public void setHeightPadding(int padding)
setHeightPadding
in interface ShapeType
padding
- the paddingpublic int getHeightPadding()
public void setAutosized(boolean autosized)
setAutosized
in interface ShapeType
autosized
- true if the node is autosizedpublic void autosize()
public boolean isAutosized()
public boolean setFillColor(java.awt.Color fillColor)
setFillColor
in interface ShapeType
fillColor
- the colorpublic boolean setFillColor(java.lang.String fillColor)
setFillColor
in interface ShapeType
fillColor
- the colorpublic void setHasFillColor(boolean hasFillColor)
setHasFillColor
in interface ShapeType
hasFillColor
- true if the Shape has a fill colorpublic boolean hasFillColor()
hasFillColor
in interface ShapeType
public java.lang.String getFillColor()
public void setHasBorderColor(boolean hasBorderColor)
setHasBorderColor
in interface ShapeType
hasBorderColor
- true if the Shape has a border colorpublic boolean hasBorderColor()
hasBorderColor
in interface ShapeType
public boolean setBorderColor(java.lang.String borderColor)
setBorderColor
in interface ShapeType
borderColor
- the colorpublic void setBorderStyle(LineStyle borderStyle)
setBorderStyle
in interface ShapeType
borderStyle
- the border stylepublic LineStyle getBorderStyle()
public void setGeometry(Geometry geometry)
setGeometry
in interface ShapeType
geometry
- the geometrypublic Geometry getGeometry()
public short getType()
public java.lang.String getTypeAsString()
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence