skip to main content
Diagrammer > Developing with design tools > Using the Designer > Next steps after the Designer > Assigning one specific value to a specific text element of an IlvDiagrammer object
 
Assigning one specific value to a specific text element of an IlvDiagrammer object
This section describes how to set a different value for the base text direction of a specific text element in an IlvDiagrammer object by using a parameter-based method. The example is based on a link style rule, but the principle is the same for any object contained in the diagram.
Important Each text element has a graphic property called baseTextDirection. The value of this property should correspond to one of the existing constants defined for base text direction. By default, the baseTextDirection property is Inherited. It is mapped to the baseTextDirection style of the top-level IlvDiagrammer component. It cannot be changed in the Designer, but can be set programmatically at run time. All Text elements that are contained in the current IlvDiagrammer object can inherit this property. The keyword baseTextDirection cannot be used as a name of a parameter.
1. In Style Rules, under link, define a new parameter for link:selected that will define the link subject to the dynamic change of base text direction at run time.
In this example, the parameter is named myBaseTextDir; make sure that your parameter name is different from the graphic property name baseTextDirection.
2. In the Styling Customizer, select Label.
3. Right-click in the Base Text Direction field and select Enter an Expression.
4. Associate the new parameter with Base Text Direction by entering it as an expression: @myBaseTextDir.
Creating a reference for setting base text direction dynamically at run time
The value of the parameter can be set dynamically at run time by the Java API. See Dynamically assigning one specific base text direction value to a specific text element for how to do this.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.