Package org.eclipse.graphiti.tb
Interface ITextDecorator
- All Superinterfaces:
IDecorator,ILocation
- All Known Implementing Classes:
TextDecorator
Text decorators can be used to add a text to the visualization of a shape
without modifying the dirty state of the displaying editor, see
IDecorator.- Since:
- 0.10
-
Method Summary
Modifier and TypeMethodDescriptionReturns the color that will be used for painting the background of the shape to decorate.Gets the name of the font used in the decorator.intGets the size of the font used in the decorator.Returns the color that will be used for painting the foreground of the shape to decorate.getText()Returns the text of the decorator.voidsetBackgroundColor(IColorConstant backgroundColor) Sets the color that will be used for painting the background of the text.voidsetFontName(String fontName) Sets the name of the font used in the decorator.voidsetFontSize(int fontSize) Sets the size of the font used in the decorator.voidsetForegroundColor(IColorConstant foregroundColor) Sets the color that will be used for painting the foreground of the text.voidSets the text or the decorator.Methods inherited from interface org.eclipse.graphiti.tb.IDecorator
getMessage, setMessage
-
Method Details
-
getText
String getText()Returns the text of the decorator.- Returns:
- A
Stringcontaining the text
-
setText
Sets the text or the decorator.- Parameters:
text- AStringcontaining the text
-
getFontName
String getFontName()Gets the name of the font used in the decorator.- Returns:
- A
Stringcontaining the name of the font.
-
setFontName
Sets the name of the font used in the decorator.- Parameters:
fontName- AStringcontaining the name of the font.
-
getFontSize
int getFontSize()Gets the size of the font used in the decorator.- Returns:
- An integer defining the size of the font.
-
setFontSize
void setFontSize(int fontSize) Sets the size of the font used in the decorator.- Parameters:
fontSize- An integer defining the size of the font.
-
setBackgroundColor
Sets the color that will be used for painting the background of the text. By default (when returningnull) the original background color of the text is kept. -
getBackgroundColor
IColorConstant getBackgroundColor()Returns the color that will be used for painting the background of the shape to decorate. By default (when returningnull) the original background color of the shape is kept.- Returns:
- a
IColorConstantdefining the color
-
setForegroundColor
Sets the color that will be used for painting the foreground of the text. By default (when returningnull) the original foreground color of the text is kept. -
getForegroundColor
IColorConstant getForegroundColor()Returns the color that will be used for painting the foreground of the shape to decorate. By default (when returningnull) the original foreground color of the shape is kept.- Returns:
- a
IColorConstantdefining the color
-