public class TextDecorator extends AbstractDecorator implements ITextDecorator
IDecorator.| Constructor and Description |
|---|
TextDecorator(java.lang.String text)
Creates a new text decorator that decorates a shape with the given text.
|
| Modifier and Type | Method and 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.
|
int |
getX()
Gets the x value.
|
int |
getY()
Gets the y value.
|
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.
|
void |
setX(int x)
Sets the x coordinate of this location.
|
void |
setY(int y)
Sets the y coordinate of this location.
|
getMessage, setMessageequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMessage, setMessagepublic TextDecorator(java.lang.String text)
text - a String providing the textpublic int getX()
ILocationpublic int getY()
ILocationpublic void setX(int x)
ILocationpublic void setY(int y)
ILocationpublic java.lang.String getText()
ITextDecoratorgetText in interface ITextDecoratorString containing the textpublic void setText(java.lang.String text)
ITextDecoratorsetText in interface ITextDecoratortext - A String containing the textpublic java.lang.String getFontName()
ITextDecoratorgetFontName in interface ITextDecoratorString containing the name of the font.public void setFontName(java.lang.String fontName)
ITextDecoratorsetFontName in interface ITextDecoratorfontName - A String containing the name of the font.public int getFontSize()
ITextDecoratorgetFontSize in interface ITextDecoratorpublic void setFontSize(int fontSize)
ITextDecoratorsetFontSize in interface ITextDecoratorfontSize - An integer defining the size of the font.public IColorConstant getForegroundColor()
ITextDecoratornull) the
original foreground color of the shape is kept.getForegroundColor in interface ITextDecoratorIColorConstant defining the colorpublic void setForegroundColor(IColorConstant foregroundColor)
ITextDecoratornull) the original foreground
color of the text is kept.setForegroundColor in interface ITextDecoratorpublic IColorConstant getBackgroundColor()
ITextDecoratornull) the
original background color of the shape is kept.getBackgroundColor in interface ITextDecoratorIColorConstant defining the colorpublic void setBackgroundColor(IColorConstant backgroundColor)
ITextDecoratornull) the original background
color of the text is kept.setBackgroundColor in interface ITextDecorator