Statistics
| Revision:

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 @ 457

History | View | Annotate | Download (5.6 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

    
15
/**
16
 * There are two top level management roles within ScriptingFramework: logical and User's Interface (UI) management.
17
 *
18
 * This class is responsible of the UI management role. It provides all the components shown in the ScriptingFramework. 
19
 *
20
 * @see ScriptingManager
21
 *
22
 */
23
public interface ScriptingUIManager {
24
        
25
//        public void setMainFrame(JFrame mainFrame);
26
        /**
27
         * Creates a new {@link JScriptingLauncher} component.
28
         * 
29
         * @return a new {@link JScriptingLauncher}.
30
         * 
31
         * @see JScriptingLauncher
32
         */
33
        public JScriptingLauncher createLauncher();
34
        
35
        /**
36
         * Creates a new {@link JScriptingComposer} component.
37
         * 
38
         * @return a new {@link JScriptingComposer}.
39
         * 
40
         * @see JScriptingComposer
41
         */
42
        public JScriptingComposer createComposer();
43
        
44
        /**
45
         * Creates a new {@link  JScriptingBrowser} component.
46
         *
47
         * @params uimanager {@link  ScriptingUIManager} that identificates the image.
48
         * @params root {@link  ScriptingFolder} that identificates the image.
49
         * @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
50
         * 
51
         * @return a new {@link  JScriptingBrowser}.
52
         * 
53
         * @see  JScriptingBrowser
54
         */
55
        public JScriptingBrowser createBrowser(ScriptingUIManager uimanager, ScriptingFolder root, boolean foldersOnly);
56
        
57
        /**
58
         * Creates a new {@link  JScriptingBrowser} component.
59
         *
60
         * @params uimanager {@link  ScriptingUIManager} that identificates the image.
61
         * @params root {@link  ScriptingFolder} that identificates the image.
62
         * 
63
         * @return a new {@link  JScriptingBrowser}.
64
         * 
65
         * @see  JScriptingBrowser
66
         */
67
        public JScriptingBrowser createBrowser(ScriptingUIManager uimanager, ScriptingFolder root);
68
        
69
        /**
70
         * Creates a new {@link  JScriptingInstaller} component.
71
         * 
72
         * @return a new {@link  JScriptingInstaller}.
73
         * 
74
         * @see  JScriptingInstaller
75
         */
76
        public JPanel createInstaller();
77

    
78
        /**
79
         * Creates a new JEditorPane component with syntax highlight.
80
         * 
81
         * @return a new {@link JEditorPaneSyntaxHighlighting}.
82
         * 
83
         * @see  JEditorPaneSyntaxHighlighting
84
         */
85
        public SyntaxtHighlightTextComponent createSyntaxHighlightingPanel();
86
        
87
        /**
88
         * Creates a new {@link JCodeEditor} component.
89
         * 
90
         * @return a new {@link JCodeEditor}.
91
         * 
92
         * @see  JCodeEditor
93
         */
94
        public JCodeEditor createJCodeEditor(ScriptingUIManager uimanager, ScriptingScript script);
95
        
96
        /**
97
         * Creates a new {@link JDialogEditor} component.
98
         * 
99
         * @return a new {@link JDialogEditor}.
100
         * 
101
         * @see  JDialogEditor
102
         */
103
        public JDialogEditor createJDialogEditor(ScriptingUIManager uimanager, ScriptingDialog script);
104
        
105
        /**
106
         * Creates a new {@link JThinlet} component.
107
         * 
108
         * @return a new {@link JThinlet}.
109
         * 
110
         * @see  JThinlet
111
         */
112
        public JThinlet createJThinlet();
113
        
114
        /**
115
         * Creates a new {@link JThinG} component.
116
         * 
117
         * @return a new {@link JThinG}.
118
         * 
119
         * @see  JThinG
120
         */
121
        public JThinG createJThinG();
122
        
123
        /**
124
         * Returns a ImageIcon associated with the name.
125
         * 
126
         * @params name String that identificates the image.
127
         *
128
         * @return the ImageIcon identified by the String name.
129
         */
130
        public ImageIcon getIcon(String name);
131
        
132
        /**
133
         * Returns a ImageIcon associated with the name.
134
         * 
135
         * @params name String that identificates the image.
136
         * @params size String to specify if the size of the icon would be "small", "medium" or "big" (default value: "small").
137
         *
138
         * @return the ImageIcon identified by the String name.
139
         */
140
        public ImageIcon getIcon(String name, String size);
141

    
142
        /**
143
         * Returns the {@link ScriptingManager} of the ScriptingFramework.
144
         * 
145
         * @return {@link ScriptingManager}
146
         */
147
        public ScriptingManager getManager();
148
        
149
        /**
150
         * Returns the {@link AboutManager} to provide services of the 'About Us' information of the ScriptingFramework.
151
         * 
152
         * @return the {@link AboutManager}
153
         *          
154
         * @see  AboutManager
155
         */
156
        public AboutManager getAboutManager();
157
        
158
        /**
159
         * Returns a help panel.
160
         * 
161
         * @return a JPanel with the JavaDocs registered in the application
162
         */
163
        public JPanel getAPIHelp();
164
        
165
        /**
166
         * Returns a help panel.
167
         * 
168
         * @return a JPanel with the User's help of the application
169
         */
170
        public JPanel getUserHelp();
171

    
172
        public void addUserHelp(String langName, URL resource);
173
        
174
        /**
175
         * Shows a JPanel in a dialog window with it's own characteristics
176
         *
177
         * @params panel JPanel included in the dialog's content
178
         * @params title String with the dialog's title
179
         * 
180
         */
181
        public void showDialog(JPanel panel, String title);
182
        
183
        /**
184
         * Shows a JPanel in a window with it's own characteristics
185
         *
186
         * @params panel JPanel included in the window's content
187
         * @params title String with the window's title
188
         * 
189
         */
190
        public void showWindow(JPanel panel, String title);
191
        
192
        /**
193
         * Shows a JPanel in a tool window with it's own characteristics
194
         *
195
         * @params panel JPanel included in the tool's content
196
         * @params title String with the tool's title
197
         * 
198
         */
199
        public void showTool(JPanel panel, String title);
200

    
201
        /**
202
         * Registers a new instance of a WindowManager which provides services to the management of the application windows
203
         *
204
         * @params manager {@link  WindowManager} to register in the ScriptingUIManager.
205
         * 
206
         * @see WindowManager
207
         */
208
//        public void registerWindowManager(WindowManager manager);
209
        
210
        public String getTranslation(String key);
211

    
212
}