Package org.eclipse.graphiti.util
Class TextBuilder.TextBuilderRegion
- java.lang.Object
-
- org.eclipse.graphiti.util.TextBuilder.TextBuilderRegion
-
- Enclosing class:
- TextBuilder
public static class TextBuilder.TextBuilderRegion extends java.lang.ObjectInner class for storing the partial region styles.
-
-
Constructor Summary
Constructors Constructor Description TextBuilderRegion()Constructor of theTextBuilder.TextBuilderRegionclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetStart()Get start offset of the region in the text.TextStylegetStyle()Get the text style of the region in the text.TextBuilder.TextBuilderRegionsetBackground(Color col)Set the background color of the text for the region.TextBuilder.TextBuilderRegionsetFont(Font font)Set the font for the region.TextBuilder.TextBuilderRegionsetForeground(Color col)Set the foreground color of the text for the region.TextBuilder.TextBuilderRegionsetStart(int start)Assign a start to the partial region style.TextBuilder.TextBuilderRegionsetStrikeOut(boolean value, Color col)Set strikeout for the region.TextBuilder.TextBuilderRegionsetStyle(TextStyle style)Assign a style to the region of text.TextBuilder.TextBuilderRegionsetUnderline(Color col)Set the underline color for the region.TextBuilder.TextBuilderRegionsetUnderline(UnderlineStyle uStyle, Color col)Set the underline style for the region.
-
-
-
Constructor Detail
-
TextBuilderRegion
public TextBuilderRegion()
Constructor of theTextBuilder.TextBuilderRegionclass.
-
-
Method Detail
-
getStart
public int getStart()
Get start offset of the region in the text.- Returns:
- The start offset of the region.
-
getStyle
public TextStyle getStyle()
Get the text style of the region in the text.- Returns:
- The text style, or
nullfor the default style.
-
setStyle
public TextBuilder.TextBuilderRegion setStyle(TextStyle style)
Assign a style to the region of text.- Parameters:
style- Style to assign.- Returns:
- The updated partial region style.
-
setStart
public TextBuilder.TextBuilderRegion setStart(int start)
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
public TextBuilder.TextBuilderRegion setUnderline(UnderlineStyle uStyle, Color col)
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
public TextBuilder.TextBuilderRegion setUnderline(Color col)
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
public TextBuilder.TextBuilderRegion setStrikeOut(boolean value, Color col)
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
public TextBuilder.TextBuilderRegion setForeground(Color col)
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
public TextBuilder.TextBuilderRegion setBackground(Color col)
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
public TextBuilder.TextBuilderRegion setFont(Font font)
Set the font for the region.- Parameters:
font- Font to set.- Returns:
- The updated partial region style.
-
-