|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swt.icon.SwtIcon
com.tensegrity.gui.swt.repository.VisualGraphObjectSwtIcon
A VisualGraphObjectSwtIcon is a SwtIcon which
is used to represent any given VisualGraphObject.
Two constructors are available. While one lets the caller define the width and
height of the VisualGraphObjectSwtIcon, the other one uses
predefined values ( and DEFAULT_WIDTH).
DEFAULT_HEIGHT
This class internally performs the drawing of its associated
onto an
image which can be accessed by means of the
VisualGraphObject method.
For information, the drawing is delegated to the
SwtIcon.getIcon()
method.
BaseComposite.draw(Renderer, Device, Transform2D)
Use the dispose() method once instances of this class
are no longer necessary. This ensures that resources internally held are freed.
| Field Summary | |
static int |
DEFAULT_HEIGHT
constant defining the size of the icon |
static int |
DEFAULT_WIDTH
constant defining the size of the icon |
| Constructor Summary | |
VisualGraphObjectSwtIcon(org.eclipse.swt.graphics.Device device,
VisualGraphObject vgo,
double textscalefactor,
CoordinateSystem coordSystem,
int width,
int height)
This constructor creates instances of VisualGraphObjectSwtIcon based on the given
VisualGraphObject with a width and height respectively of
width and height.
|
|
VisualGraphObjectSwtIcon(org.eclipse.swt.graphics.Device device,
VisualGraphObject vgo,
double textscalefactor,
CoordinateSystem coordSystem,
Raster raster,
int width,
int height)
This constructor creates instances of VisualGraphObjectSwtIcon based on the given
VisualGraphObject with a width and height respectively of
width and height.
|
|
VisualGraphObjectSwtIcon(org.eclipse.swt.graphics.Device device,
VisualGraphObject vgoIcon,
int width,
int height)
|
|
| Method Summary | |
org.eclipse.swt.graphics.Color |
getBackgroundColor()
Returns the background color of this VisualGraphObjectSwtIcon.
|
Renderer |
getRenderer()
Returns the renderer that is used to draw the icon |
void |
setBackgroundColor(org.eclipse.swt.graphics.Color color)
Sets the background color for this Icon. |
void |
setRenderer(Renderer renderer)
Sets the renderer that should be used to draw the icon |
| Methods inherited from class com.tensegrity.gui.swt.icon.SwtIcon |
dispose, getDevice, getHeight, getIcon, getSize, getWidth, setIcon, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
| Constructor Detail |
public VisualGraphObjectSwtIcon(org.eclipse.swt.graphics.Device device,
VisualGraphObject vgo,
double textscalefactor,
CoordinateSystem coordSystem,
int width,
int height)
This constructor creates instances of
VisualGraphObjectSwtIcon based on the given
VisualGraphObject with a width and height respectively of
width and height.
device - a Device used to create the actual
Image that renders the iconvgo - the VisualGraphObject which this icon
representstextscalefactor - a factor to scale the text (if any)coordSystem - the underlying CoordinateSystem for this Iconwidth - the icon widthheight - the icon height
public VisualGraphObjectSwtIcon(org.eclipse.swt.graphics.Device device,
VisualGraphObject vgo,
double textscalefactor,
CoordinateSystem coordSystem,
Raster raster,
int width,
int height)
This constructor creates instances of
VisualGraphObjectSwtIcon based on the given
VisualGraphObject with a width and height respectively of
width and height.
device - a Device used to create the actual
Image that renders the iconvgo - the VisualGraphObject which this icon
representstextscalefactor - a factor to scale the text (if any)coordSystem - the underlying CoordinateSystem for this Iconraster - the Raster used for this Iconwidth - the icon widthheight - the icon height
public VisualGraphObjectSwtIcon(org.eclipse.swt.graphics.Device device,
VisualGraphObject vgoIcon,
int width,
int height)
| Method Detail |
public void setBackgroundColor(org.eclipse.swt.graphics.Color color)
Sets the background color for this Icon.
color - the background colorpublic org.eclipse.swt.graphics.Color getBackgroundColor()
Returns the background color of this
VisualGraphObjectSwtIcon.
VisualGraphObjectSwtIcon.public Renderer getRenderer()
public void setRenderer(Renderer renderer)
renderer - the renderer that should be used to draw the icon
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||