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