Class NodeTextBlock
java.lang.Object
com.orchestranetworks.addon.dmdv.template.bean.NodeElement
com.orchestranetworks.addon.dmdv.template.bean.NodeTextBlock
Represents a text block that displays a text string in a given font size.
- Since:
- 1.2.0
-
Constructor Summary
ConstructorDescriptionConstructs a newNodeTextBlock
with a font size of 11 units. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the font size of the text.Returns the alignment format in the text block's given space.Returns the text color in hex.void
setBindingText
(NodeValueRenderer action) Sets the text content usingNodeValueRenderer
.void
setBindingText
(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
(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
-
Constructor Details
-
NodeTextBlock
public NodeTextBlock()Constructs a newNodeTextBlock
with a font size of 11 units.
-
-
Method Details
-
getTextColor
Returns the text color in hex. -
setTextColor
Sets the text color in hex.- Parameters:
textColor
- a color in hex.
-
setBindingText
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
Sets the text content usingNodeValueRenderer
.- Parameters:
action
- an implementation of NodeValueRenderer.
-
getTextAlign
Returns the alignment format in the text block's given space. -
setTextAlign
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.
-