|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swt.icon.SwtIcon
A SwtIcon is a simple wrapper around an
and is used for example
in order to create repository items.
Image
When creating an instance of this class an
is internally created and can be accessed through the Image
method.
getIcon()
Call the method once instances of this class
are no longer necessary. This ensures that resources internally held are freed.
dispose()
VisualGraphObjectSwtIcon| Constructor Summary | |
SwtIcon(org.eclipse.swt.graphics.Device device,
int width,
int height)
Creates a SwtIcon of the given width and
height. |
|
| Method Summary | |
void |
dispose()
Use this method in order to dispose the SWT resources held by instance of classes implementing the interface.
|
org.eclipse.swt.graphics.Device |
getDevice()
Returns the device used to create this Icon |
int |
getHeight()
Returns the height of the Icon |
org.eclipse.swt.graphics.Image |
getIcon()
Returns the actual Image representing this icon |
org.eclipse.swt.graphics.Rectangle |
getSize()
Returns the size of this Icon |
int |
getWidth()
Returns the width of this icon |
void |
setIcon(org.eclipse.swt.graphics.Image icon)
Set the Image which actually represents this Icon |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SwtIcon(org.eclipse.swt.graphics.Device device,
int width,
int height)
Creates a SwtIcon of the given width and
height. The passed device is required in
order to create the actual Image that renders the icon.
device - a Device used to create the actual
Image that renders the iconwidth - the icon widthheight - the icon height| Method Detail |
public int getHeight()
public org.eclipse.swt.graphics.Rectangle getSize()
Rectangle representing the size of this iconpublic int getWidth()
public java.lang.String toString()
public org.eclipse.swt.graphics.Device getDevice()
public org.eclipse.swt.graphics.Image getIcon()
public void setIcon(org.eclipse.swt.graphics.Image icon)
Set the Image which actually represents this Icon
icon - the new Image for this iconpublic void dispose()
Disposable
Use this method in order to dispose the SWT resources held by instance of
classes implementing the interface.
Disposable
dispose in interface Disposable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||