Package org.eclipse.graphiti.util
Class TextBuilder.TextBuilderRegion
java.lang.Object
org.eclipse.graphiti.util.TextBuilder.TextBuilderRegion
- Enclosing class:
- TextBuilder
Inner class for storing the partial region styles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetStart()Get start offset of the region in the text.getStyle()Get the text style of the region in the text.setBackground(Color col) Set the background color of the text for the region.Set the font for the region.setForeground(Color col) Set the foreground color of the text for the region.setStart(int start) Assign a start to the partial region style.setStrikeOut(boolean value, Color col) Set strikeout for the region.Assign a style to the region of text.setUnderline(Color col) Set the underline color for the region.setUnderline(UnderlineStyle uStyle, Color col) Set the underline style for the region.
-
Constructor Details
-
TextBuilderRegion
public TextBuilderRegion()Constructor of theTextBuilder.TextBuilderRegionclass.
-
-
Method Details
-
getStart
public int getStart()Get start offset of the region in the text.- Returns:
- The start offset of the region.
-
getStyle
Get the text style of the region in the text.- Returns:
- The text style, or
nullfor the default style.
-
setStyle
Assign a style to the region of text.- Parameters:
style- Style to assign.- Returns:
- The updated partial region style.
-
setStart
Assign a start to the partial region style.- Parameters:
start- New start offset of the region in the text.- Returns:
- The updated partial region style.
-
setUnderline
Set the underline style for the region.- Parameters:
uStyle- Underline style to assign.nullmeans disable underline.col- Color of the underline,nullmeans skip setting the color.- Returns:
- The updated partial region style.
-
setUnderline
Set the underline color for the region.- Parameters:
col- Color of the underline,nullmeans skip setting the color.- Returns:
- The updated partial region style.
-
setStrikeOut
Set strikeout for the region.- Parameters:
value- Enable or disable strikeout.col- Color of the strikeout, if enabled.nullmeans skip setting of the color.- Returns:
- The updated partial region style.
-
setForeground
Set the foreground color of the text for the region.- Parameters:
col- Foreground color to set.nullmeans skip setting of the color.- Returns:
- The updated partial region style.
-
setBackground
Set the background color of the text for the region.- Parameters:
col- Background color to set.nullmeans skip setting of the color.- Returns:
- The updated partial region style.
-
setFont
Set the font for the region.- Parameters:
font- Font to set.- Returns:
- The updated partial region style.
-