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, setMessage
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessage, setMessage
public TextDecorator(java.lang.String text)
text
- a String
providing the textpublic int getX()
ILocation
public int getY()
ILocation
public void setX(int x)
ILocation
public void setY(int y)
ILocation
public java.lang.String getText()
ITextDecorator
getText
in interface ITextDecorator
String
containing the textpublic void setText(java.lang.String text)
ITextDecorator
setText
in interface ITextDecorator
text
- A String
containing the textpublic java.lang.String getFontName()
ITextDecorator
getFontName
in interface ITextDecorator
String
containing the name of the font.public void setFontName(java.lang.String fontName)
ITextDecorator
setFontName
in interface ITextDecorator
fontName
- A String
containing the name of the font.public int getFontSize()
ITextDecorator
getFontSize
in interface ITextDecorator
public void setFontSize(int fontSize)
ITextDecorator
setFontSize
in interface ITextDecorator
fontSize
- An integer defining the size of the font.public IColorConstant getForegroundColor()
ITextDecorator
null
) the
original foreground color of the shape is kept.getForegroundColor
in interface ITextDecorator
IColorConstant
defining the colorpublic void setForegroundColor(IColorConstant foregroundColor)
ITextDecorator
null
) the original foreground
color of the text is kept.setForegroundColor
in interface ITextDecorator
public IColorConstant getBackgroundColor()
ITextDecorator
null
) the
original background color of the shape is kept.getBackgroundColor
in interface ITextDecorator
IColorConstant
defining the colorpublic void setBackgroundColor(IColorConstant backgroundColor)
ITextDecorator
null
) the original background
color of the text is kept.setBackgroundColor
in interface ITextDecorator