1
2 package hep.wired.services;
3
4 import java.awt.Cursor;
5 import java.awt.Shape;
6 import javax.swing.event.ChangeListener;
7 import javax.swing.undo.UndoableEditSupport;
8
9 import org.freehep.swing.undo.UndoableEditProcessor;
10
11 /***
12 * Defines a single event display plot.
13 *
14 * @author Mark Donszelmann
15 * @version $Id: RecordPlot.java 1925 2005-06-15 16:51:13Z duns $
16 */
17 public interface RecordPlot extends UndoableEditProcessor {
18
19 /***
20 * Adds a change listener
21 */
22 public void addChangeListener(ChangeListener listener);
23
24 /***
25 * Removbes a change listener
26 */
27 public void removeChangeListener(ChangeListener listener);
28
29 /***
30 * Returns a copy of this plot, attached to the given objects, from the given parameters.
31 */
32 public RecordPlot copy(String name, Object record, boolean supportUndo);
33
34 /***
35 * Returns the undo support object, or null if undo was not switched on.
36 */
37 public UndoableEditSupport getUndoableEditSupport();
38
39 /***
40 * Returns the name of the plot.
41 */
42 public String getName();
43
44 /***
45 * Returns the associated Graphics Panel.
46 */
47 public GraphicsPanel getGraphicsPanel();
48
49 /***
50 * Called when this plot is selected/unselected.
51 */
52 public void setSelected(boolean selected);
53
54 /***
55 * Returns true if this plot (and its projection) supports the given interactionHandler.
56 */
57 public boolean supports(InteractionHandler interactionHandler);
58
59 /***
60 * Sets the interaction handler on the plot.
61 */
62 public void setInteractionHandler(InteractionHandler interactionHandler);
63
64 /***
65 * Return the current interaction handler.
66 */
67 public InteractionHandler getInteractionHandler();
68
69 /***
70 * Sets the plot to use this Object.
71 */
72 public void setRecord(Object record);
73
74 /***
75 * Returns the current Object.
76 */
77 public Object getRecord();
78
79 /***
80 * Draws the shape for feedback/interactivity purposes
81 */
82 public void drawShape(Shape shape);
83
84
85
86 /***
87 * Returns X of plot.
88 */
89 public int getX();
90
91 /***
92 * Returns Y of plot.
93 */
94 public int getY();
95
96 /***
97 * Returns width of plot.
98 */
99 public int getWidth();
100
101 /***
102 * Returns height of plot.
103 */
104 public int getHeight();
105
106 /***
107 * Sets the cursor of plot
108 */
109 public void setCursor(Cursor c);
110
111 /***
112 * Requests focus in plot
113 */
114 public boolean requestFocusInWindow();
115
116 /***
117 * Repaint the plot
118 */
119 public void repaint();
120 }