| Handle.java |
1 /*
2 * Copyright (c) 1998-2004, The University of Sheffield.
3 *
4 * This file is part of GATE (see http://gate.ac.uk/), and is free
5 * software, licenced under the GNU Library General Public License,
6 * Version 2, June 1991 (in the distribution as file licence.html,
7 * and also available at http://gate.ac.uk/gate/licence.html).
8 *
9 * Valentin Tablan 09/03/2001
10 *
11 * $Id: Handle.java,v 1.4 2004/07/21 17:10:07 akshay Exp $
12 *
13 */
14 package gate.gui;
15
16
17 import java.awt.Window;
18
19 import javax.swing.*;
20
21 import gate.event.ProgressListener;
22 import gate.event.StatusListener;
23
24 /**
25 * Interface for classes used to store the information about an open resource.
26 * Such information will include icon to be used for tree components,
27 * popup menu for right click events, etc.
28 */
29 public interface Handle extends ProgressListener, StatusListener {
30
31 public Icon getIcon();
32
33 public String getTitle();
34
35 /**
36 * Returns a GUI component to be used as a small viewer/editor, e.g. below
37 * the main tree in the Gate GUI for the selected resource
38 */
39 public JComponent getSmallView();
40
41 /**
42 * Returns the large view for this resource. This view will go into the main
43 * display area.
44 */
45 public JComponent getLargeView();
46
47 public JPopupMenu getPopup();
48
49 public String getTooltipText();
50
51 public Object getTarget();
52
53 /**
54 * Returns the top level GUI component that is a parent to all other GUI
55 * components
56 */
57 public Window getWindow();
58 }