View Javadoc

1   // Copyright 2003-2004, FreeHEP.
2   package hep.wired.services;
3   
4   import javax.swing.*;
5   
6   /***
7    * Interface for panel to display.
8    *
9    * @author Mark Donszelmann
10   * @version $Id: GraphicsPanel.java 551 2004-11-02 00:34:59Z duns $
11   */
12  
13  public interface GraphicsPanel {
14  
15      /***
16       * Returns a copy of this graphics panel.
17       */
18      public GraphicsPanel copy();
19      
20      /***
21       * Sets the Record to be displayed in this panel.
22       */
23      public void setRecord(Object record);
24     
25      /***
26       * Returns the Record displayed in this panel.
27       */
28      public Object getRecord();
29      
30      /***
31       * Return true if feature is available
32       */
33      public boolean supports(Class featureClass);
34      
35      /***
36       * Returns the feature if available
37       */
38      public Feature getFeature(Class featureClass);    
39      
40      /***
41       * Returns the viewport for this panel.
42       */
43      public ViewPort getViewPort();
44      
45      /***
46       * Allows for modification of the popup menu
47       */
48      public JPopupMenu modifyPopupMenu(JPopupMenu menu, RecordPlot plot);
49      
50      /***
51       * Switches to a fast mode for drawing (optional).
52       */
53      public void setFastMode(boolean fast);
54      
55      /***
56       * Designates the panel as selected.
57       */
58      public void setSelected(RecordPlot plot, boolean selected);
59      
60  }