public abstract class NodeElement extends Object
| Constructor and Description |
|---|
NodeElement() |
| Modifier and Type | Method and Description |
|---|---|
AlignmentType |
getAlignment()
Returns this element's alignment used in Panel layouts.
|
String |
getBackgroundColor()
Returns the background color in hex.
|
NodeElementType |
getElementType()
Returns the element type of this element.
|
int |
getHeight()
Returns this element's height in local coordinates.
|
int[] |
getMargin()
Returns the margin around this element in the following order: top, right, bottom, left.
|
int |
getMargin(MarginType marginType)
Returns the margin around this element.
|
String |
getName()
Returns the element name.
|
int |
getWidth()
Returns this element's width in local coordinates.
|
void |
setAlignment(AlignmentType alignment)
Sets this element's alignment used in Panel layouts.
|
void |
setBackgroundColor(String backgroundColor)
Sets the background color in hex.
|
void |
setHeight(int height)
Sets this element's height in local coordinates.
|
void |
setMargin(MarginType marginType,
int value)
Sets the empty area around this element.
|
void |
setName(String name)
Sets the element name.
|
void |
setWidth(int width)
Sets this element's width in local coordinates.
|
public String getName()
public void setName(String name)
name - name of element.public int[] getMargin()
public int getMargin(MarginType marginType)
marginType - the side of the element.public void setMargin(MarginType marginType, int value)
marginType - the side to set.value - the value for this side.public String getBackgroundColor()
public void setBackgroundColor(String backgroundColor)
backgroundColor - a color in hex.public AlignmentType getAlignment()
public void setAlignment(AlignmentType alignment)
alignment - alignment type enumeration.public int getWidth()
public void setWidth(int width)
width - a positive integer for width of element.public int getHeight()
public void setHeight(int height)
height - a positive integer for height of element.public NodeElementType getElementType()