01: package org.osbl.client.wings.form;
02:
03: import org.osbl.client.wings.shell.Environment;
04: import org.osbl.client.wings.shell.Application;
05:
06: import java.util.List;
07:
08: public interface ObjectViewer extends Application {
09: /**
10: * The environment provided by the editor.
11: */
12: Environment getEnvironment();
13:
14: /**
15: * Show the object list component.
16: */
17: void showList();
18:
19: /**
20: * Show the object details component.
21: */
22: void showForm();
23:
24: /**
25: * Get the object, that is currently shown.
26: * @return the object
27: */
28: Object getObject();
29:
30: /**
31: * Set the object to be shown.
32: * @param object the object to be shown
33: */
34: void setObject(Object object);
35:
36: /**
37: * Set the selection mode.
38: * ObjectLists support single selection and multi selection. Consult the wingS- or Swing- documentation for further
39: * information on selection models.
40: *
41: * @param selectionMode either STable.SINGLE_SELECTION or STable.MULTIPLE_SELECTION
42: */
43: void setSelectionMode(int selectionMode);
44:
45: /**
46: * Set the selected object.
47: * SelectionListeners will be informed of this change!
48: * @param object the object to be selected
49: */
50: void setSelectedObject(Object object);
51:
52: /**
53: * Retrieve the currently selected object.
54: * @return the selected object or null, if nothing is selected. If there are multiple selected objects, return the
55: * first one.
56: */
57: Object getSelectedObject();
58:
59: /**
60: * Set the selected object.
61: * SelectionListeners will be informed of this change!
62: * @param objects the objects to be selected
63: */
64: void setSelectedObjects(List objects);
65:
66: /**
67: * Retrieve a list of the currently selected objects.
68: * @return a list of selected objects.
69: */
70: List getSelectedObjects();
71:
72: Class getType();
73: }
|