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
ConstructorsConstructorDescriptionConstructs a newNodeTextBlockwith a font size of 11 units. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the font size of the text.Returns the alignment format in the text block's given space.Returns the text color in hex.voidsetBindingText(NodeValueRenderer action) Sets the text content usingNodeValueRenderer.voidsetBindingText(String text) Sets the text content.voidsetFontSize(int fontSize) Sets the font size for the text.voidsetTextAlign(TextAlignmentType textAlign) Sets the alignment format in the text block's given space.voidsetTextColor(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 newNodeTextBlockwith 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.
-