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 java.lang.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(java.awt.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(java.awt.Graphics g)
- Specified by:
paint
in interface GraphicsDevice
update
public void update(java.awt.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 java.awt.Component getComponent()
- Specified by:
getComponent
in interface GraphicsDevice
getBounds
public java.awt.Rectangle getBounds()
- Specified by:
getBounds
in interface GraphicsDevice
setSize
public void setSize(int w,
int h)
- Specified by:
setSize
in interface GraphicsDevice
getSize
public java.awt.Dimension getSize()
- Specified by:
getSize
in interface GraphicsDevice
setBackground
public void setBackground(java.awt.Color c)
- Specified by:
setBackground
in interface GraphicsDevice
addMouseListener
public void addMouseListener(java.awt.event.MouseListener l)
- Specified by:
addMouseListener
in interface GraphicsDevice
addMouseMotionListener
public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
- Specified by:
addMouseMotionListener
in interface GraphicsDevice
addKeyListener
public void addKeyListener(java.awt.event.KeyListener l)
- Specified by:
addKeyListener
in interface GraphicsDevice
getLocation
public java.awt.Point getLocation()
- Specified by:
getLocation
in interface GraphicsDevice
setCursor
public void setCursor(java.awt.Cursor c)
- Specified by:
setCursor
in interface GraphicsDevice
setSize
public void setSize(java.awt.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 java.awt.Container getParent()
- Specified by:
getParent
in interface GraphicsDevice