01: package org.columba.api.gui.frame;
02:
03: import java.util.Iterator;
04:
05: import javax.swing.JComponent;
06: import javax.swing.JPopupMenu;
07:
08: /**
09: * A <code>IFrameMediator</code> supporting docking should also implement this
10: * interface, describing the dockable views residing in this frame mediator
11: * workspace.
12: *
13: * @author fdietz
14: */
15: public interface IDock {
16:
17: enum REGION {
18: CENTER, NORTH, SOUTH, EAST, WEST
19: }
20:
21: public static final String DOCKING_VIEW_SEARCH = "search_panel";
22: public static final String DOCKING_VIEW_CONTEXTUAL_PANEL = "contextual_panel";
23:
24: /**
25: * Return iterator of dockables.
26: *
27: * @return dockable iterator of <code>IDockable</code>
28: */
29: public Iterator<IDockable> getDockableIterator();
30:
31: /**
32: * Register new dockable at this docking container.
33: *
34: * @param dockable
35: */
36: public void registerDockable(IDockable dockable);
37:
38: /**
39: * Register new dockable at this docking container.
40: *
41: * @param id
42: * dockable id
43: * @param name
44: * dockable human-readable name (used in menu item)
45: * @param comp
46: * dockable view
47: * @param popup
48: * popup menu, can be <code>null</code>
49: */
50: public IDockable registerDockable(String id, String name,
51: JComponent comp, JPopupMenu popup);
52:
53: public void dock(IDockable dockable, REGION region);
54:
55: public void dock(IDockable dockable, REGION region, float percentage);
56:
57: public void dock(IDockable dockable, IDockable parentDockable,
58: REGION region, float percentage);
59:
60: public void setSplitProportion(IDockable dockable, float percentage);
61:
62: public void showDockable(String id);
63: }
|