org.rosuda.ibase.toolkit
Class AWTGraphicsDevice
java.lang.Object
org.rosuda.ibase.toolkit.AWTGraphicsDevice
- All Implemented Interfaces:
- GraphicsDevice
- Direct Known Subclasses:
- AwtQueryPopup
public class AWTGraphicsDevice
- extends Object
- implements GraphicsDevice
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AWTGraphicsDevice
public AWTGraphicsDevice(int _layers)
AWTGraphicsDevice
public AWTGraphicsDevice()
setUpdateRoot
public void setUpdateRoot(int ur)
- set update root layer, i.e. the first layer that has to be updated via
paintLayer(java.awt.Graphics, int).
Note that after resize full repaint of all layers is done but updateRoot is not changed.
It is safe (and sensible) to set the update root higher than the last layer; this will cause full repaint only
on resize. such behavior is useful when the underlying paint doesn't change except for resizes.
common practice is to the update root to # of layers at the end of the paintLayer function and use
setUpdateRoot in the remaining program only where content of the painted are has to be explicitely changed.
also note that changing update root during the update itself has no effect on the current update.
- Specified by:
setUpdateRoot in interface GraphicsDevice
- Parameters:
ur - root layer, i.e. the layer to start repaining from
restoreUpdateRoot
public void restoreUpdateRoot()
- restore update root to previous setting. usual procedure is to used following sequence: setUpdateRoot; repaint; restoreUpdateRoot;
paintLayer
public void paintLayer(Graphics g,
int layer)
paintLayer
public void paintLayer(int layer)
- Specified by:
paintLayer in interface GraphicsDevice
repaint
public void repaint()
- Specified by:
repaint in interface GraphicsDevice
paint
public void paint(Graphics g)
- Specified by:
paint in interface GraphicsDevice
update
public void update(Graphics g)
- Specified by:
update in interface GraphicsDevice
setPCOwner
public void setPCOwner(PlotComponent pc)
- Specified by:
setPCOwner in interface GraphicsDevice
getGrDevID
public int getGrDevID()
- Specified by:
getGrDevID in interface GraphicsDevice
getComponent
public Component getComponent()
- Specified by:
getComponent in interface GraphicsDevice
getBounds
public Rectangle getBounds()
- Specified by:
getBounds in interface GraphicsDevice
setSize
public void setSize(int w,
int h)
- Specified by:
setSize in interface GraphicsDevice
getSize
public Dimension getSize()
- Specified by:
getSize in interface GraphicsDevice
setBackground
public void setBackground(Color c)
- Specified by:
setBackground in interface GraphicsDevice
addMouseListener
public void addMouseListener(MouseListener l)
- Specified by:
addMouseListener in interface GraphicsDevice
addMouseMotionListener
public void addMouseMotionListener(MouseMotionListener l)
- Specified by:
addMouseMotionListener in interface GraphicsDevice
addKeyListener
public void addKeyListener(KeyListener l)
- Specified by:
addKeyListener in interface GraphicsDevice
getLocation
public Point getLocation()
- Specified by:
getLocation in interface GraphicsDevice
setCursor
public void setCursor(Cursor c)
- Specified by:
setCursor in interface GraphicsDevice
setSize
public void setSize(Dimension d)
- Specified by:
setSize in interface GraphicsDevice
getWidth
public int getWidth()
- Specified by:
getWidth in interface GraphicsDevice
getHeight
public int getHeight()
- Specified by:
getHeight in interface GraphicsDevice
getParent
public Container getParent()
- Specified by:
getParent in interface GraphicsDevice