Package org.eclipse.graphiti.tb
Interface ITextDecorator
-
- All Superinterfaces:
IDecorator
,ILocation
- All Known Implementing Classes:
TextDecorator
public interface ITextDecorator extends IDecorator, ILocation
Text decorators can be used to add a text to the visualization of a shape without modifying the dirty state of the displaying editor, seeIDecorator
.- Since:
- 0.10
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IColorConstant
getBackgroundColor()
Returns the color that will be used for painting the background of the shape to decorate.java.lang.String
getFontName()
Gets the name of the font used in the decorator.int
getFontSize()
Gets the size of the font used in the decorator.IColorConstant
getForegroundColor()
Returns the color that will be used for painting the foreground of the shape to decorate.java.lang.String
getText()
Returns the text of the decorator.void
setBackgroundColor(IColorConstant backgroundColor)
Sets the color that will be used for painting the background of the text.void
setFontName(java.lang.String fontName)
Sets the name of the font used in the decorator.void
setFontSize(int fontSize)
Sets the size of the font used in the decorator.void
setForegroundColor(IColorConstant foregroundColor)
Sets the color that will be used for painting the foreground of the text.void
setText(java.lang.String text)
Sets the text or the decorator.-
Methods inherited from interface org.eclipse.graphiti.tb.IDecorator
getMessage, setMessage
-
-
-
-
Method Detail
-
getText
java.lang.String getText()
Returns the text of the decorator.- Returns:
- A
String
containing the text
-
setText
void setText(java.lang.String text)
Sets the text or the decorator.- Parameters:
text
- AString
containing the text
-
getFontName
java.lang.String getFontName()
Gets the name of the font used in the decorator.- Returns:
- A
String
containing the name of the font.
-
setFontName
void setFontName(java.lang.String fontName)
Sets the name of the font used in the decorator.- Parameters:
fontName
- AString
containing 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
void setBackgroundColor(IColorConstant backgroundColor)
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
IColorConstant
defining the color
-
setForegroundColor
void setForegroundColor(IColorConstant foregroundColor)
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
IColorConstant
defining the color
-
-