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 / ScriptingUIManager.java @ 478
History | View | Annotate | Download (6.01 KB)
1 |
package org.gvsig.scripting.swing.api; |
---|---|
2 |
|
3 |
import java.net.URL; |
4 |
|
5 |
import javax.swing.ImageIcon; |
6 |
import javax.swing.JPanel; |
7 |
|
8 |
import org.gvsig.about.AboutManager; |
9 |
import org.gvsig.scripting.ScriptingDialog; |
10 |
import org.gvsig.scripting.ScriptingFolder; |
11 |
import org.gvsig.scripting.ScriptingManager; |
12 |
import org.gvsig.scripting.ScriptingScript; |
13 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
14 |
|
15 |
/**
|
16 |
* There are two top level management roles within ScriptingFramework: logical
|
17 |
* and User's Interface (UI) management.
|
18 |
*
|
19 |
* This class is responsible of the UI management role. It provides all the
|
20 |
* components shown in the ScriptingFramework.
|
21 |
*
|
22 |
* @see ScriptingManager
|
23 |
*
|
24 |
*/
|
25 |
public interface ScriptingUIManager { |
26 |
|
27 |
// public void setMainFrame(JFrame mainFrame);
|
28 |
/**
|
29 |
* Creates a new {@link JScriptingLauncher} component.
|
30 |
*
|
31 |
* @return a new {@link JScriptingLauncher}.
|
32 |
*
|
33 |
* @see JScriptingLauncher
|
34 |
*/
|
35 |
public JScriptingLauncher createLauncher();
|
36 |
|
37 |
/**
|
38 |
* Creates a new {@link JScriptingComposer} component.
|
39 |
*
|
40 |
* @return a new {@link JScriptingComposer}.
|
41 |
*
|
42 |
* @see JScriptingComposer
|
43 |
*/
|
44 |
public JScriptingComposer createComposer();
|
45 |
|
46 |
/**
|
47 |
* Creates a new {@link JScriptingBrowser} component.
|
48 |
*
|
49 |
* @param uimanager {@link ScriptingUIManager} that identificates the
|
50 |
* image.
|
51 |
* @param root {@link ScriptingFolder} that identificates the image.
|
52 |
* @param foldersOnly boolean to indicate if only will be shown folders (if
|
53 |
* it's true) or it will be shown the ScriptingBaseScript files too (false
|
54 |
* value). By default, false
|
55 |
*
|
56 |
* @return a new {@link JScriptingBrowser}.
|
57 |
*
|
58 |
* @see JScriptingBrowser
|
59 |
*/
|
60 |
public JScriptingBrowser createBrowser(ScriptingUIManager uimanager, ScriptingFolder root, boolean foldersOnly); |
61 |
|
62 |
/**
|
63 |
* Creates a new {@link JScriptingBrowser} component.
|
64 |
*
|
65 |
* @param uimanager {@link ScriptingUIManager} that identificates the
|
66 |
* image.
|
67 |
* @param root {@link ScriptingFolder} that identificates the image.
|
68 |
*
|
69 |
* @return a new {@link JScriptingBrowser}.
|
70 |
*
|
71 |
* @see JScriptingBrowser
|
72 |
*/
|
73 |
public JScriptingBrowser createBrowser(ScriptingUIManager uimanager, ScriptingFolder root);
|
74 |
|
75 |
/**
|
76 |
* Creates a new {@link JScriptingInstaller} component.
|
77 |
*
|
78 |
* @return a new {@link JScriptingInstaller}.
|
79 |
*
|
80 |
* @see JScriptingInstaller
|
81 |
*/
|
82 |
public JPanel createInstaller(); |
83 |
|
84 |
/**
|
85 |
* Creates a new JEditorPane component with syntax highlight.
|
86 |
*
|
87 |
* @return a new {@link JEditorPaneSyntaxHighlighting}.
|
88 |
*
|
89 |
* @see JEditorPaneSyntaxHighlighting
|
90 |
*/
|
91 |
public SyntaxtHighlightTextComponent createSyntaxHighlightingPanel();
|
92 |
|
93 |
/**
|
94 |
* Creates a new {@link JCodeEditor} component.
|
95 |
*
|
96 |
* @param uimanager
|
97 |
* @param script
|
98 |
* @return a new {@link JCodeEditor}.
|
99 |
*
|
100 |
* @see JCodeEditor
|
101 |
*/
|
102 |
public JCodeEditor createJCodeEditor(ScriptingUIManager uimanager, ScriptingScript script);
|
103 |
|
104 |
/**
|
105 |
* Creates a new {@link JDialogEditor} component.
|
106 |
*
|
107 |
* @param uimanager
|
108 |
* @param script
|
109 |
* @return a new {@link JDialogEditor}.
|
110 |
*
|
111 |
* @see JDialogEditor
|
112 |
*/
|
113 |
public JDialogEditor createJDialogEditor(ScriptingUIManager uimanager, ScriptingDialog script);
|
114 |
|
115 |
/**
|
116 |
* Creates a new {@link JThinlet} component.
|
117 |
*
|
118 |
* @return a new {@link JThinlet}.
|
119 |
*
|
120 |
* @see JThinlet
|
121 |
*/
|
122 |
public JThinlet createJThinlet();
|
123 |
|
124 |
/**
|
125 |
* Creates a new {@link JThinG} component.
|
126 |
*
|
127 |
* @return a new {@link JThinG}.
|
128 |
*
|
129 |
* @see JThinG
|
130 |
*/
|
131 |
public JThinG createJThinG();
|
132 |
|
133 |
/**
|
134 |
* Returns a ImageIcon associated with the name.
|
135 |
*
|
136 |
* @param name String that identificates the image.
|
137 |
*
|
138 |
* @return the ImageIcon identified by the String name.
|
139 |
*/
|
140 |
public ImageIcon getIcon(String name); |
141 |
|
142 |
/**
|
143 |
* Returns a ImageIcon associated with the name.
|
144 |
*
|
145 |
* @param name String that identificates the image.
|
146 |
* @param size String to specify if the size of the icon would be "small",
|
147 |
* "medium" or "big" (default value: "small").
|
148 |
*
|
149 |
* @return the ImageIcon identified by the String name.
|
150 |
*/
|
151 |
public ImageIcon getIcon(String name, String size); |
152 |
|
153 |
/**
|
154 |
* Returns the {@link ScriptingManager} of the ScriptingFramework.
|
155 |
*
|
156 |
* @return {@link ScriptingManager}
|
157 |
*/
|
158 |
public ScriptingManager getManager();
|
159 |
|
160 |
/**
|
161 |
* Returns the {@link AboutManager} to provide services of the 'About Us'
|
162 |
* information of the ScriptingFramework.
|
163 |
*
|
164 |
* @return the {@link AboutManager}
|
165 |
*
|
166 |
* @see AboutManager
|
167 |
*/
|
168 |
public AboutManager getAboutManager();
|
169 |
|
170 |
/**
|
171 |
* Returns a help panel.
|
172 |
*
|
173 |
* @return a JPanel with the JavaDocs registered in the application
|
174 |
*/
|
175 |
public JPanel getHelp(); |
176 |
|
177 |
/**
|
178 |
* Returns a help panel.
|
179 |
*
|
180 |
* @return a JPanel with the User's help of the application
|
181 |
*/
|
182 |
public JPanel getUserHelp(); |
183 |
|
184 |
public void addUserHelp(String langName, URL resource); |
185 |
|
186 |
/**
|
187 |
* Shows a JPanel in a dialog window with it's own characteristics
|
188 |
*
|
189 |
* @param panel JPanel included in the dialog's content
|
190 |
* @param title String with the dialog's title
|
191 |
*
|
192 |
*/
|
193 |
public void showDialog(JPanel panel, String title); |
194 |
|
195 |
/**
|
196 |
* Shows a JPanel in a window with it's own characteristics
|
197 |
*
|
198 |
* @param panel JPanel included in the window's content
|
199 |
* @param title String with the window's title
|
200 |
*
|
201 |
*/
|
202 |
public void showWindow(JPanel panel, String title); |
203 |
|
204 |
/**
|
205 |
* Shows a JPanel in a tool window with it's own characteristics
|
206 |
*
|
207 |
* @param panel JPanel included in the tool's content
|
208 |
* @param title String with the tool's title
|
209 |
*
|
210 |
*/
|
211 |
public void showTool(JPanel panel, String title); |
212 |
|
213 |
public String getTranslation(String key); |
214 |
|
215 |
public void setWindowManager(WindowManager windowsManager); |
216 |
|
217 |
public WindowManager getWindowManager();
|
218 |
|
219 |
public JScriptingConsole createJScriptingConsole();
|
220 |
|
221 |
} |