|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.tb.AbstractDecorator
org.eclipse.graphiti.tb.TextDecorator
public class 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
.
Field Summary | |
---|---|
private IColorConstant |
backgroundColor
|
private static int |
DEFAULT_LOCATION
|
private String |
fontName
|
private int |
fontSize
|
private IColorConstant |
foregroundColor
|
private String |
text
|
private int |
x
|
private int |
y
|
Constructor Summary | |
---|---|
TextDecorator(String text)
Creates a new text decorator that decorates a shape with the given text. |
Method Summary | |
---|---|
IColorConstant |
getBackgroundColor()
Returns the color that will be used for painting the background of the shape to decorate. |
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. |
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(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(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. |
Methods inherited from class org.eclipse.graphiti.tb.AbstractDecorator |
---|
getMessage, setMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.graphiti.tb.IDecorator |
---|
getMessage, setMessage |
Field Detail |
---|
private static final int DEFAULT_LOCATION
private String text
private String fontName
private int fontSize
private int y
private int x
private IColorConstant foregroundColor
private IColorConstant backgroundColor
Constructor Detail |
---|
public TextDecorator(String text)
text
- a String
providing the textMethod Detail |
---|
public int getX()
ILocation
getX
in interface ILocation
public int getY()
ILocation
getY
in interface ILocation
public void setX(int x)
ILocation
setX
in interface ILocation
x
- the new x coordinatepublic void setY(int y)
ILocation
setY
in interface ILocation
y
- the new y coordinatepublic String getText()
ITextDecorator
getText
in interface ITextDecorator
String
containing the textpublic void setText(String text)
ITextDecorator
setText
in interface ITextDecorator
text
- A String
containing the textpublic String getFontName()
ITextDecorator
getFontName
in interface ITextDecorator
String
containing the name of the font.public void setFontName(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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |