|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cs.piccolo.PNode
edu.umd.cs.piccolox.swt.PSWTImage
public class PSWTImage
PSWTImage is a wrapper around a org.eclipse.swt.graphics.Image.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode |
|---|
PNode.PSceneGraphDelegate |
| Field Summary |
|---|
| Fields inherited from interface java.awt.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
|---|---|
PSWTImage(PSWTCanvas canvas)
Constructs a PSWTImage attached to the provided canvas and with a null image. |
|
PSWTImage(PSWTCanvas canvas,
org.eclipse.swt.graphics.Image image)
Constructs a PSWTImage wrapping the provided image. |
|
PSWTImage(PSWTCanvas canvas,
String fileName)
Constructs a PSWTImage wrapping the provided image after loading it from the file. |
|
| Method Summary | |
|---|---|
protected void |
disposeImage()
Subclasses may override this method to provide different image dispose behavior. |
org.eclipse.swt.graphics.Image |
getImage()
Returns the image that is shown by this node, may be null. |
protected void |
paint(PPaintContext paintContext)
Paint this node behind any of its children nodes. |
void |
setImage(org.eclipse.swt.graphics.Image newImage)
Set the image that is wrapped by this PImage node. |
void |
setImage(String filePath)
Set the image that is wrapped by this PImage node. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PSWTImage(PSWTCanvas canvas)
canvas - canvas to associate with the image node
public PSWTImage(PSWTCanvas canvas,
org.eclipse.swt.graphics.Image image)
canvas - canvas to associate with the image nodeimage - image to be wrapped by this PSWTImage
public PSWTImage(PSWTCanvas canvas,
String fileName)
canvas - canvas to associate with the image nodefileName - path to the image, will be loaded and converted to an
Image internally| Method Detail |
|---|
public org.eclipse.swt.graphics.Image getImage()
public void setImage(String filePath)
filePath - path to the file to load as an imagepublic void setImage(org.eclipse.swt.graphics.Image newImage)
newImage - the image that should replace the current oneprotected void disposeImage()
protected void paint(PPaintContext paintContext)
paint in class PNodepaintContext - the paint context to use for painting the node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||