|
||||||||||
| 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 text| Method Detail |
|---|
public int getX()
ILocation
getX in interface ILocationpublic int getY()
ILocation
getY in interface ILocationpublic void setX(int x)
ILocation
setX in interface ILocationx - the new x coordinatepublic void setY(int y)
ILocation
setY in interface ILocationy - the new y coordinatepublic String getText()
ITextDecorator
getText in interface ITextDecoratorString containing the textpublic void setText(String text)
ITextDecorator
setText in interface ITextDecoratortext - A String containing the textpublic String getFontName()
ITextDecorator
getFontName in interface ITextDecoratorString containing the name of the font.public void setFontName(String fontName)
ITextDecorator
setFontName in interface ITextDecoratorfontName - A String containing the name of the font.public int getFontSize()
ITextDecorator
getFontSize in interface ITextDecoratorpublic void setFontSize(int fontSize)
ITextDecorator
setFontSize 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||