FreeHEP API
Version v1.2

org.freehep.postscript
Class PSPanelArtist

java.lang.Object
  |
  +--org.freehep.swing.graphics.AbstractPanelArtist
        |
        +--org.freehep.postscript.PSPanelArtist
All Implemented Interfaces:
EventListener, GraphicalSelectionListener, PanelArtist

public class PSPanelArtist
extends AbstractPanelArtist

PostScript Panel Artist for PostScript Processor,

Version:
$Id: PSPanelArtist.java,v 1.3 2001/06/19 09:39:25 duns Exp $
Author:
Mark Donszelmann

Field Summary
protected  PSObject data
           
protected  boolean debug
           
protected static String PANEL_NAME
           
protected  PSPanel psPanel
           
protected  StackedPanel stackedPanel
           
 
Constructor Summary
PSPanelArtist(StackedPanel panel, boolean debug)
           
 
Method Summary
 void abortDraw()
          This method aborts any drawing which is being done in another thread.
 boolean drawPanel()
          This method draws the graphics onto the StackedPanel.
 JComponent getControlPanel()
          This method returns a JComponent which contains controls for the given PanelArtist.
 String getDescription()
          This returns a descriptive string for this PanelArtist.
 Object getEventData()
          This method returns the data sample which is currently being used.
 StackedPanel getStackedPanel()
          Return the StackedPanel which is being controlled.
 void graphicalSelectionMade(GraphicalSelectionEvent event)
          Called when the user makes a graphical selection.
 void panelResized()
          This method is called when the size of the StackedPanel has changed.
 void setEventData(Object data)
          This method sets which data sample should be used.
 void setStackedPanel(StackedPanel panel)
          Set the StackedPanel that this PanelArtist will control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PANEL_NAME

protected static final String PANEL_NAME
See Also:
Constant Field Values

data

protected PSObject data

stackedPanel

protected StackedPanel stackedPanel

debug

protected boolean debug

psPanel

protected PSPanel psPanel
Constructor Detail

PSPanelArtist

public PSPanelArtist(StackedPanel panel,
                     boolean debug)
Method Detail

getDescription

public String getDescription()
Description copied from interface: PanelArtist
This returns a descriptive string for this PanelArtist.

Returns:
a String describing this PanelArtist

drawPanel

public boolean drawPanel()
Description copied from interface: PanelArtist
This method draws the graphics onto the StackedPanel. Usually this is called only when the content has changed, simple repaints are handled by the StackedPanel's buffering. The class which implements this interface has the option of doing the drawing in a background thread. In such a case, the method should return immediately after starting the thread and return false indicating that the drawing has not completed. After the drawing has completed, this method should call the drawComplete() method of the StackedPanel.

Returns:
boolean indicating whether the drawing has completed

setEventData

public void setEventData(Object data)
Description copied from interface: PanelArtist
This method sets which data sample should be used.

Parameters:
data - data sample to use

getEventData

public Object getEventData()
Description copied from interface: PanelArtist
This method returns the data sample which is currently being used.

Returns:
the event data currently being used.

setStackedPanel

public void setStackedPanel(StackedPanel panel)
Description copied from interface: PanelArtist
Set the StackedPanel that this PanelArtist will control.

Parameters:
panel - StackedPanel to control

getStackedPanel

public StackedPanel getStackedPanel()
Description copied from interface: PanelArtist
Return the StackedPanel which is being controlled.

Returns:
the StackedPanel which is being controlled

abortDraw

public void abortDraw()
Description copied from interface: PanelArtist
This method aborts any drawing which is being done in another thread. This method should NOT return until the drawing has been stopped.


panelResized

public void panelResized()
Description copied from interface: PanelArtist
This method is called when the size of the StackedPanel has changed. This gives the implementing class the opportunity to change transformation matricies, flag that a redraw is needed, etc.


getControlPanel

public JComponent getControlPanel()
Description copied from interface: PanelArtist
This method returns a JComponent which contains controls for the given PanelArtist. The implementing class may return null if no controls are relevant.

Returns:
JComponent containing controls for the Panel Artist

graphicalSelectionMade

public void graphicalSelectionMade(GraphicalSelectionEvent event)
Description copied from interface: GraphicalSelectionListener
Called when the user makes a graphical selection. The graphical selection is an abstract idea which should be make specific by subclasses of the GraphicalSelectionEvent and of GraphicalSelectionPanel.


FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.