|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.device.AbstractDevice
com.tensegrity.graphics.device.AWTDevice
com.tensegrity.graphics.device.SWTDevice
This is a TEMPORARY version of the SWT-based
implementation of Device.
At this stage of development (and in order to provide an Eclipse Plug-in
with the maximum available functionality), this class extends
class AWTDevice.
The method has also been
temporarily added in order to provide the ability to switch easily between
the AWT-dependent version of the setSWTDeviceFile(String)SWTDevice and the
non-AWT-dependent one, for which the development is currently in
progress.
This implementation has been inspired by the sample code provided by Andy Smith and Christophe Avare in the Eclipse Newsgroups.
| Field Summary |
| Fields inherited from class com.tensegrity.graphics.device.AWTDevice |
fontCache, gfx, gfx2D, USE_FONT_CACHING, USE_TEXTURE_BITMAP_CACHING |
| Fields inherited from class com.tensegrity.graphics.device.AbstractDevice |
fontFormat, fontFormatData, paintFormat, paintFormatData, strokeFormat, strokeFormatData, visibleFont, visiblePaint, visibleStroke |
| Fields inherited from interface com.tensegrity.graphics.device.Device |
DRAW_FILL, DRAW_OUTLINE |
| Method Summary | |
void |
dispose()
This method retrieves the SWT image (see ) and draws it
onto the on-screen GC. |
static Device |
getDevice(org.eclipse.swt.graphics.Device swtdevice,
org.eclipse.swt.graphics.GC gc,
int x,
int y,
int width,
int height)
This method creates, initializes and returns a new instance of this class. |
static void |
setSWTDeviceFile(java.lang.String SWTDeviceFile)
Important: This method will be removed once the non-AWT dependent version of the SWTDevice will be fully implemented. |
| Methods inherited from class com.tensegrity.graphics.device.AWTDevice |
clearClip, clearRect, clipRect, createAWTPaint, createAWTPaint, createAWTStroke, createAWTStroke, createAWTStroke, drawArc, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, getClipBounds, getClipBounds, getDevice, getDeviceStatistics, getGraphics, getTransform, hitClip, initiate, isAntialiasing, isInhibitLT2RBFlip, isInhibitYFlip, isPrinting, lookupAWTFont, lookupAWTFont, setAntialiasing, setClip, setClipBounds, setFontFormat, setFontFormatData, setInhibitLT2RBFlip, setInhibitYFlip, setIsPrinting, setPaintFormat, setPaintFormatData, setPaintMode, setStrokeFormat, setStrokeFormatData, setTransform, setXORMode, translate |
| Methods inherited from class com.tensegrity.graphics.device.AbstractDevice |
getFontFormat, getPaintFormat, getStrokeFormat |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.tensegrity.graphics.device.Device |
clearClip, clearRect, clipRect, drawArc, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, getClipBounds, getClipBounds, getFontFormat, getPaintFormat, getStrokeFormat, getTransform, hitClip, initiate, isAntialiasing, isInhibitLT2RBFlip, isInhibitYFlip, isPrinting, setAntialiasing, setClip, setClipBounds, setFontFormat, setFontFormatData, setInhibitLT2RBFlip, setInhibitYFlip, setIsPrinting, setPaintFormat, setPaintFormatData, setPaintMode, setStrokeFormat, setStrokeFormatData, setTransform, setXORMode, translate |
| Method Detail |
public static final void setSWTDeviceFile(java.lang.String SWTDeviceFile)
Important: This method will be removed once the non-AWT dependent
version of the SWTDevice will be fully implemented.
The passed SWTDeviceFile should be "com.tensegrity.graphics.device.SWTDeviceNonAWTDependent" or
"com.tensegrity.graphics.device.SWTDevice", the latter being the default value.
SWTDeviceFile - the servicefile to use.
public static Device getDevice(org.eclipse.swt.graphics.Device swtdevice,
org.eclipse.swt.graphics.GC gc,
int x,
int y,
int width,
int height)
This method creates, initializes and returns a new instance of this
class.
Please note that the method
is called in order to simplify clients code.
Also note that the SWTDeviceB#initiate() method
will not dispose the passed parameters and it is the caller's
responsability to ensure that the resources it allocated are disposed.
dispose()
swtdevice - the "SWT" Device
associated to the returned SWTDevice.gc - the graphical context for the returned SWTDevicex - the on screen X position of the drawing areay - the on screen Y position of the drawing areawidth - the on screen width of the drawing areaheight - the on screen height of the drawing area
SWTDevice instancepublic void dispose()
#getSWTImage(int, int, int, int)) and draws it
onto the on-screen GC. Finally it releases all resources
which were kept in this instance.
dispose in interface Devicedispose in class AWTDeviceDevice.dispose()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||