org.apache.pivot.wtk.media
Class Drawing

java.lang.Object
  extended by org.apache.pivot.wtk.media.Image
      extended by org.apache.pivot.wtk.media.Drawing
All Implemented Interfaces:
Visual

public class Drawing
extends Image

Image representing a vector drawing.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.media.Image
Image.ImageListenerList, Image.LoadTask
 
Field Summary
 
Fields inherited from class org.apache.pivot.wtk.media.Image
imageListeners
 
Constructor Summary
Drawing()
           
Drawing(Canvas canvas)
           
 
Method Summary
 Paint getBackground()
           
 Canvas getCanvas()
           
 ListenerList<DrawingListener> getDrawingListeners()
           
 int getHeight()
          Returns the visual's height.
 int getWidth()
          Returns the visual's width.
 void paint(Graphics2D graphics)
          Paints the visual.
 void setBackground(Paint background)
           
 void setBackground(String background)
           
 void setCanvas(Canvas canvas)
           
 void setHeight(int height)
           
 void setSize(int width, int height)
           
 void setWidth(int width)
           
 
Methods inherited from class org.apache.pivot.wtk.media.Image
getImageListeners, getSize, load, load
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Drawing

public Drawing()

Drawing

public Drawing(Canvas canvas)
Method Detail

getCanvas

public Canvas getCanvas()

setCanvas

public void setCanvas(Canvas canvas)

getWidth

public int getWidth()
Description copied from interface: Visual
Returns the visual's width.


setWidth

public void setWidth(int width)

getHeight

public int getHeight()
Description copied from interface: Visual
Returns the visual's height.


setHeight

public void setHeight(int height)

setSize

public void setSize(int width,
                    int height)

getBackground

public Paint getBackground()

setBackground

public void setBackground(Paint background)

setBackground

public final void setBackground(String background)

paint

public void paint(Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Parameters:
graphics - The graphics context in which to paint the visual.

getDrawingListeners

public ListenerList<DrawingListener> getDrawingListeners()