gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.swing / org.gvsig.scripting.swing.api / src / main / java / org / gvsig / scripting / swing / api / JScriptingBrowser.java @ 702
History | View | Annotate | Download (1.54 KB)
1 |
package org.gvsig.scripting.swing.api; |
---|---|
2 |
|
3 |
import java.awt.LayoutManager; |
4 |
import java.awt.event.ActionListener; |
5 |
import javax.swing.tree.TreePath; |
6 |
|
7 |
import org.gvsig.scripting.ScriptingBaseScript; |
8 |
|
9 |
import org.gvsig.scripting.ScriptingFolder; |
10 |
import org.gvsig.scripting.ScriptingManager; |
11 |
import org.gvsig.scripting.ScriptingUnit; |
12 |
import org.gvsig.tools.swing.api.Component; |
13 |
|
14 |
/**
|
15 |
* <code>JScriptingBrowser</code> is a component that shows hierachically a
|
16 |
* system folder. It launch events on selection or double.clic of each
|
17 |
* {@link ScriptingUnit}. In case of {@link ScriptingFolder} a selection will
|
18 |
* load the content lazily, and double-clic will expand it. In case of
|
19 |
* {@link ScriptingBaseScript} will throw a exception to the
|
20 |
* {@link JScriptingLauncher}
|
21 |
*
|
22 |
* @see JScriptingLauncher
|
23 |
*
|
24 |
*/
|
25 |
public interface JScriptingBrowser extends Component { |
26 |
|
27 |
public static final int DEFAULT_ACTION = 1; |
28 |
public static final int SELECTION_ACTION = 2; |
29 |
public static final int DROPDOWN_ACTION = 3; |
30 |
|
31 |
public interface BrowserActionEvent { |
32 |
|
33 |
public Object getSource(); |
34 |
|
35 |
public int getID(); |
36 |
|
37 |
public String getActionCommand(); |
38 |
|
39 |
public ScriptingUnit getUnit();
|
40 |
} |
41 |
|
42 |
public ScriptingManager getManager();
|
43 |
|
44 |
public ScriptingFolder getRoot();
|
45 |
|
46 |
public ScriptingUnit getSelectedNode();
|
47 |
|
48 |
public TreePath getSelectionPath(); |
49 |
|
50 |
public void setSelectionPath(TreePath path); |
51 |
|
52 |
public void addDefaultActionListener(ActionListener listener); |
53 |
|
54 |
public void addSelectionActionListener(ActionListener listener); |
55 |
} |