org.rosuda.javaGD
Interface GDContainer

All Known Implementing Classes:
GDCanvas, JGDBufferedPanel, JGDPanel, PlotBuilder.PlotPanel

public interface GDContainer

GDContainer is the minimal interface that has to be implemented by classes that are used as back-ends for JavaGD. The interface feeds graphics objects to the instance which are then free to use them for any purpose such as display or printing.


Method Summary
 void add(org.rosuda.javaGD.GDObject o)
          add a new plot object to the list
 void closeDisplay()
          close the display associated with this container
 int getDeviceNumber()
          retrieve the current device number
 java.awt.Graphics getGraphics()
          retrieve graphics if this container is backed by some Graphics object.
 org.rosuda.javaGD.GDState getGState()
          retrieve graphics state
 java.awt.Dimension getSize()
          retrieve the size of the container
 boolean prepareLocator(LocatorSync ls)
          this method is called to notify the contained that a locator request is pending; the container must either return false and ignore the ls parameter *or* return true and call @link{LocatorSync.triggerAction} method at some point in the future (which may well be after returning from this method)
 void reset()
          reset the plot- remove all objects
 void setDeviceNumber(int dn)
          set the device number of this container
 void syncDisplay(boolean finish)
          synchronize display with the graphics objects
 

Method Detail

add

void add(org.rosuda.javaGD.GDObject o)
add a new plot object to the list

Parameters:
o - plot object

reset

void reset()
reset the plot- remove all objects


getGState

org.rosuda.javaGD.GDState getGState()
retrieve graphics state

Returns:
current graphics state

getGraphics

java.awt.Graphics getGraphics()
retrieve graphics if this container is backed by some Graphics object.

Returns:
current graphics object or null if this container is not associated with any

prepareLocator

boolean prepareLocator(LocatorSync ls)
this method is called to notify the contained that a locator request is pending; the container must either return false and ignore the ls parameter *or* return true and call @link{LocatorSync.triggerAction} method at some point in the future (which may well be after returning from this method)

Parameters:
ls - locator synchronization object

syncDisplay

void syncDisplay(boolean finish)
synchronize display with the graphics objects

Parameters:
finish - flag denoting whether the synchronization is desired or not (true for a finished batch, false when a batch starts)

setDeviceNumber

void setDeviceNumber(int dn)
set the device number of this container

Parameters:
dn - device number

closeDisplay

void closeDisplay()
close the display associated with this container


getDeviceNumber

int getDeviceNumber()
retrieve the current device number

Returns:
current device number

getSize

java.awt.Dimension getSize()
retrieve the size of the container

Returns:
size of the container