Class NodeTextBlock
- java.lang.Object
-
- com.orchestranetworks.addon.dmdv.template.bean.NodeElement
-
- com.orchestranetworks.addon.dmdv.template.bean.NodeTextBlock
-
public final class NodeTextBlock extends NodeElement
Represents a text block that displays a text string in a given font size.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description NodeTextBlock()
Constructs a newNodeTextBlock
with a font size of 11 units.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFontSize()
Returns the font size of the text.TextAlignmentType
getTextAlign()
Returns the alignment format in the text block's given space.java.lang.String
getTextColor()
Returns the text color in hex.void
setBindingText(NodeValueRenderer action)
Sets the text content usingNodeValueRenderer
.void
setBindingText(java.lang.String text)
Sets the text content.void
setFontSize(int fontSize)
Sets the font size for the text.void
setTextAlign(TextAlignmentType textAlign)
Sets the alignment format in the text block's given space.void
setTextColor(java.lang.String textColor)
Sets the text color in hex.-
Methods inherited from class com.orchestranetworks.addon.dmdv.template.bean.NodeElement
getAlignment, getBackgroundColor, getBindingValuesPublic, getElementType, getHeight, getMargin, getMargin, getName, getWidth, setAlignment, setBackgroundColor, setHeight, setMargin, setName, setWidth
-
-
-
-
Method Detail
-
getTextColor
public java.lang.String getTextColor()
Returns the text color in hex.
-
setTextColor
public void setTextColor(java.lang.String textColor)
Sets the text color in hex.- Parameters:
textColor
- a color in hex.
-
setBindingText
public void setBindingText(java.lang.String text)
Sets the text content. This can be a string, a field path, or combination of the two. A field path must use the following pattern: ${fieldPath} not including table path. Example: - A fixed string: "Name". - A field path: "${/group1/label}". - Combination of string and field path: "Name: ${/group1/label}"- Parameters:
text
- the content for this text block.
-
setBindingText
public void setBindingText(NodeValueRenderer action)
Sets the text content usingNodeValueRenderer
.- Parameters:
action
- an implementation of NodeValueRenderer.
-
getTextAlign
public TextAlignmentType getTextAlign()
Returns the alignment format in the text block's given space.
-
setTextAlign
public void setTextAlign(TextAlignmentType textAlign)
Sets the alignment format in the text block's given space. This is only relevant when the width is set for theTextBlock
.- Parameters:
textAlign
- an alignment type for text block.
-
getFontSize
public int getFontSize()
Returns the font size of the text.
-
setFontSize
public void setFontSize(int fontSize)
Sets the font size for the text.- Parameters:
fontSize
- the integer for font size.
-
-