1 | package org.greenstone.admin.guiext;
|
---|
2 |
|
---|
3 | import java.awt.*;
|
---|
4 | import java.awt.event.*;
|
---|
5 | import java.io.*;
|
---|
6 | import java.lang.reflect.Constructor;
|
---|
7 | import java.lang.reflect.Method;
|
---|
8 | import java.util.*;
|
---|
9 |
|
---|
10 | import java.net.URLClassLoader;
|
---|
11 | import java.net.URL;
|
---|
12 |
|
---|
13 | import javax.swing.*;
|
---|
14 | import javax.swing.event.*;
|
---|
15 | import javax.swing.tree.*;
|
---|
16 | import javax.swing.table.TableCellRenderer;
|
---|
17 |
|
---|
18 | import javax.xml.parsers.DocumentBuilder;
|
---|
19 | import javax.xml.parsers.DocumentBuilderFactory;
|
---|
20 | import javax.xml.transform.OutputKeys;
|
---|
21 | import javax.xml.transform.Transformer;
|
---|
22 | import javax.xml.transform.TransformerFactory;
|
---|
23 | import javax.xml.transform.dom.DOMSource;
|
---|
24 | import javax.xml.transform.stream.StreamResult;
|
---|
25 |
|
---|
26 | import org.greenstone.admin.GAIManager;
|
---|
27 | import org.greenstone.admin.GAI;
|
---|
28 |
|
---|
29 | import org.greenstone.util.Configuration;
|
---|
30 | import org.greenstone.util.GlobalProperties;
|
---|
31 | import org.greenstone.gsdl3.util.GSPath;
|
---|
32 |
|
---|
33 | import org.w3c.dom.Document;
|
---|
34 | import org.w3c.dom.Element;
|
---|
35 | import org.w3c.dom.Node;
|
---|
36 | import org.w3c.dom.NodeList;
|
---|
37 | import org.w3c.dom.Text;
|
---|
38 |
|
---|
39 |
|
---|
40 | public class ExtPane extends JPanel {
|
---|
41 |
|
---|
42 | /* The pane to demonstrate extension information*/
|
---|
43 |
|
---|
44 | protected JSplitPane main_ext_pane = null;
|
---|
45 |
|
---|
46 | /** The panel that contains a log_list */
|
---|
47 | private JPanel extensionList_pane = null;
|
---|
48 |
|
---|
49 | /** The panel that contains the log content. */
|
---|
50 | protected static JPanel extensionContent_pane = null;
|
---|
51 |
|
---|
52 | /** The label at the top of the logList_pane. */
|
---|
53 | protected JLabel extensionList_label = null;
|
---|
54 |
|
---|
55 | /** The label shown at the top of the logContent Pane. */
|
---|
56 | protected JLabel extensionContent_label = null;
|
---|
57 |
|
---|
58 | /** The scrollable area into which the log content is placed. */
|
---|
59 | protected JScrollPane description_content = null;
|
---|
60 |
|
---|
61 | /* Log TEXT AREA*/
|
---|
62 | protected JTextArea description_textarea = null;
|
---|
63 |
|
---|
64 | protected JScrollPane message_content = null;
|
---|
65 |
|
---|
66 | /* Log TEXT AREA*/
|
---|
67 | public static JTextArea message_textarea = null;
|
---|
68 |
|
---|
69 | protected static JPanel current_description_pane = null;
|
---|
70 |
|
---|
71 | protected JPanel button_pane = null;
|
---|
72 |
|
---|
73 | protected static JPanel control_pane = null;
|
---|
74 |
|
---|
75 | protected JPanel main_content_pane = null;
|
---|
76 |
|
---|
77 | protected JTree extensionTreeList = null;
|
---|
78 |
|
---|
79 | protected DefaultMutableTreeNode top = new DefaultMutableTreeNode("Extension List");
|
---|
80 |
|
---|
81 | protected HashMap<String, ArrayList> extensionInformation = null;
|
---|
82 |
|
---|
83 | protected JPanel extensionContentHeaderPane = null;
|
---|
84 |
|
---|
85 | protected String file_location;
|
---|
86 |
|
---|
87 | protected final String extension_status_root = "Configuration";
|
---|
88 | protected File extension_status_file = null;
|
---|
89 | protected String extension_file = null;
|
---|
90 |
|
---|
91 | /** The various sizes for the screen layout*/
|
---|
92 | static protected Dimension MIN_SIZE = new Dimension( 90, 90);
|
---|
93 | static protected Dimension LIST_SIZE = new Dimension(200, 450);
|
---|
94 | static protected Dimension LOGPANE_SIZE = new Dimension (800,450);
|
---|
95 | static public int left_padding = 5;
|
---|
96 | public String fileSeparator = File.separator;
|
---|
97 |
|
---|
98 | protected Element extFileRootElement = null;
|
---|
99 | protected HashMap<String, ExtensionInformation> extensions = null;
|
---|
100 | protected HashMap extClasses = null;
|
---|
101 | protected Properties dependencies = new Properties();
|
---|
102 | protected JPanel extPanel = new JPanel();
|
---|
103 | protected JSplitPane extensionListContainer = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
|
---|
104 |
|
---|
105 | public ExtPane() {
|
---|
106 |
|
---|
107 | String gsdl3Home = GAI.getGSDL3Home();
|
---|
108 |
|
---|
109 | file_location = gsdl3Home+fileSeparator+"ext"+fileSeparator+"extension_project_list.xml";
|
---|
110 |
|
---|
111 | extFileRootElement = getRootElement();
|
---|
112 |
|
---|
113 | //Load the steps that have already been performed (used for dependencies)
|
---|
114 | loadExtensionInformation();
|
---|
115 |
|
---|
116 | // create all the necessary panes
|
---|
117 | control_pane = new JPanel();
|
---|
118 | button_pane = new JPanel();
|
---|
119 | current_description_pane = new JPanel();
|
---|
120 | extensionContentHeaderPane = new JPanel();
|
---|
121 | extensionInformation = new HashMap<String, ArrayList>();
|
---|
122 |
|
---|
123 | // Extension_Pane
|
---|
124 | main_ext_pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
|
---|
125 | main_ext_pane.setPreferredSize(LOGPANE_SIZE);
|
---|
126 |
|
---|
127 | // Extension_TextArea
|
---|
128 | description_textarea = new JTextArea();
|
---|
129 | description_textarea.setEditable(false);
|
---|
130 | description_textarea.setLineWrap(true);
|
---|
131 | description_textarea.setWrapStyleWord(true);
|
---|
132 | description_textarea.setMargin(new Insets(0,left_padding,0,0));
|
---|
133 | }
|
---|
134 |
|
---|
135 | public void loadExtensionInformation()
|
---|
136 | {
|
---|
137 | Element[] extensionElements = ExtXMLHelper.getMultipleChildElements(extFileRootElement, ExtXMLHelper.EXTENSION, true);
|
---|
138 | if(extensionElements != null){
|
---|
139 | extensions = new HashMap<String, ExtensionInformation>();
|
---|
140 |
|
---|
141 | for(int i = 0; i < extensionElements.length; i++){
|
---|
142 | ExtensionInformation ei = new ExtensionInformation(extensionElements[i], extFileRootElement.getAttribute("baseURL"));
|
---|
143 | extensions.put(ei.getName(), ei);
|
---|
144 | }
|
---|
145 | }
|
---|
146 | else{
|
---|
147 | System.err.println("There are no <" + ExtXMLHelper.EXTENSION + "> elements in the extension_project_list.xml file in the extension directory");
|
---|
148 | }
|
---|
149 | }
|
---|
150 |
|
---|
151 | /** This method is callsed to actually layout the components.*/
|
---|
152 | public void display() {
|
---|
153 |
|
---|
154 | load_Admin_UI();
|
---|
155 | HashMap<String, ArrayList<String>> projectNameMap = getProjectList();
|
---|
156 | Set<String> s = projectNameMap.keySet();
|
---|
157 | Iterator<String> it = s.iterator();
|
---|
158 | int i = 0;
|
---|
159 |
|
---|
160 | while(it.hasNext()){
|
---|
161 | String projectNameGroup = it.next();
|
---|
162 | ArrayList alist = projectNameMap.get(projectNameGroup);
|
---|
163 | DefaultMutableTreeNode projecti = new DefaultMutableTreeNode (projectNameGroup);
|
---|
164 |
|
---|
165 | for (int j = 0; j< alist.size(); j++){
|
---|
166 | String projectName = (String)alist.get(j);
|
---|
167 | DefaultMutableTreeNode projectNameGroupj = new DefaultMutableTreeNode (projectName);
|
---|
168 | projecti.add(projectNameGroupj);
|
---|
169 | }
|
---|
170 | top.add(projecti);
|
---|
171 | i++;
|
---|
172 | }
|
---|
173 |
|
---|
174 | extensionTreeList = new JTree(top);
|
---|
175 | extensionTreeList.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
|
---|
176 | extensionTreeList.addTreeSelectionListener(new ConfTreeListener());
|
---|
177 | extensionTreeList.addMouseListener(new ConfTreeMouseListener());
|
---|
178 |
|
---|
179 | // extensionList_Pane
|
---|
180 | extensionList_pane = new JPanel();
|
---|
181 | extensionList_pane.setBorder(BorderFactory.createLoweredBevelBorder());
|
---|
182 | extensionList_label = new JLabel();
|
---|
183 | extensionList_label.setOpaque(true);
|
---|
184 | extensionList_label.setBackground(Configuration.getColor("coloring.workspace_heading_background"));
|
---|
185 | extensionList_label.setForeground(Configuration.getColor("coloring.workspace_heading_foreground"));
|
---|
186 | extensionList_label.setText("Available Extensions");
|
---|
187 | extensionList_label.setBorder(BorderFactory.createEmptyBorder(0, left_padding, 0, 0));
|
---|
188 | // extensionContent_Pane
|
---|
189 | extensionContent_pane = new JPanel();
|
---|
190 | extensionContent_pane.setBorder(BorderFactory.createLoweredBevelBorder());
|
---|
191 | extensionContent_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
|
---|
192 | extensionContent_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
|
---|
193 |
|
---|
194 | extensionContent_label = new JLabel();
|
---|
195 | extensionContent_label.setBorder(BorderFactory.createEmptyBorder(0, left_padding, 0, 0));
|
---|
196 | extensionContent_label.setOpaque(false);
|
---|
197 | extensionContent_label.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
|
---|
198 | extensionContent_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
|
---|
199 | extensionContent_label.setText("Extension Content");
|
---|
200 |
|
---|
201 | // Layout Components
|
---|
202 | extensionList_pane.setLayout(new BorderLayout());
|
---|
203 | extensionList_pane.add(extensionTreeList, BorderLayout.CENTER);
|
---|
204 | extensionList_pane.add(extensionList_label, BorderLayout.NORTH);
|
---|
205 | extensionListContainer.add(extensionList_pane, JSplitPane.TOP);
|
---|
206 | extensionListContainer.setDividerLocation(600);
|
---|
207 |
|
---|
208 | extPanel.setLayout(new BorderLayout());
|
---|
209 | ExtensionInformation.setExtPane(extPanel);
|
---|
210 |
|
---|
211 | JScrollPane extScrollPane = new JScrollPane(extPanel);
|
---|
212 |
|
---|
213 | extensionContent_pane.setLayout(new BorderLayout());
|
---|
214 | //extensionContent_pane.add(main_content_pane,BorderLayout.SOUTH);
|
---|
215 | extensionContent_pane.add(extensionContent_label, BorderLayout.NORTH);
|
---|
216 | extensionContent_pane.add(extScrollPane, BorderLayout.CENTER);
|
---|
217 |
|
---|
218 | main_ext_pane.add(extensionListContainer, JSplitPane.LEFT);
|
---|
219 | main_ext_pane.add(extensionContent_pane, JSplitPane.RIGHT);
|
---|
220 | main_ext_pane.setDividerLocation(LIST_SIZE.width);
|
---|
221 |
|
---|
222 | this.setLayout(new BorderLayout());
|
---|
223 | this.add(main_ext_pane, BorderLayout.CENTER);
|
---|
224 | }
|
---|
225 |
|
---|
226 |
|
---|
227 | protected Element getRootElement(){
|
---|
228 |
|
---|
229 | Element rootNode = null;
|
---|
230 |
|
---|
231 | try{
|
---|
232 | DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
|
---|
233 | DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
|
---|
234 | Document doc = docBuilder.newDocument();
|
---|
235 | doc = docBuilder.parse (new File(file_location));
|
---|
236 | rootNode = doc.getDocumentElement();
|
---|
237 | return rootNode;
|
---|
238 |
|
---|
239 | }catch (Exception e) {
|
---|
240 | e.printStackTrace();
|
---|
241 | return null;
|
---|
242 | }
|
---|
243 | }
|
---|
244 |
|
---|
245 | protected HashMap<String, ArrayList<String>> getProjectList(){
|
---|
246 |
|
---|
247 | HashMap<String, ArrayList<String>> projectGroupMap = new HashMap<String, ArrayList<String>>();
|
---|
248 | Element rootNode = extFileRootElement;
|
---|
249 | NodeList projectList = rootNode.getElementsByTagName(ExtXMLHelper.EXTENSION);
|
---|
250 |
|
---|
251 | for(int i = 0; i<projectList.getLength(); i++){
|
---|
252 |
|
---|
253 | Element projectNode = (Element)projectList.item(i);
|
---|
254 | NodeList nameList = projectNode.getElementsByTagName(ExtXMLHelper.NAME);
|
---|
255 | String name = nameList.item(0).getChildNodes().item(0).getNodeValue();
|
---|
256 |
|
---|
257 | NodeList groupList = projectNode.getElementsByTagName(ExtXMLHelper.GROUP);
|
---|
258 | String group = groupList.item(0).getChildNodes().item(0).getNodeValue();
|
---|
259 |
|
---|
260 | if(projectGroupMap.containsKey(group)){
|
---|
261 | ArrayList<String> alist = projectGroupMap.get(group);
|
---|
262 | alist.add(name);
|
---|
263 | projectGroupMap.put(group, alist);
|
---|
264 | }
|
---|
265 | else{
|
---|
266 | ArrayList<String> alist = new ArrayList<String>();
|
---|
267 | alist.add(name);
|
---|
268 | projectGroupMap.put(group, alist);
|
---|
269 | }
|
---|
270 | }
|
---|
271 | return projectGroupMap;
|
---|
272 | }
|
---|
273 |
|
---|
274 | protected class ConfTreeMouseListener implements MouseListener
|
---|
275 | {
|
---|
276 | public void mouseClicked(MouseEvent e)
|
---|
277 | {
|
---|
278 | Object comp = extensionTreeList.getLastSelectedPathComponent();
|
---|
279 | if(comp == null){
|
---|
280 | return;
|
---|
281 | }
|
---|
282 |
|
---|
283 | String option = comp.toString();
|
---|
284 | if(option == null){
|
---|
285 | return;
|
---|
286 | }
|
---|
287 |
|
---|
288 | ExtensionInformation info = extensions.get(option);
|
---|
289 |
|
---|
290 | if(info != null){
|
---|
291 | extPanel.removeAll();
|
---|
292 |
|
---|
293 | JTextArea descArea = new JTextArea();
|
---|
294 | descArea.setText(info.getDescription());
|
---|
295 | descArea.setEditable(false);
|
---|
296 | descArea.setLineWrap(true);
|
---|
297 | descArea.setWrapStyleWord(true);
|
---|
298 |
|
---|
299 | //JEditorPane descArea = new JEditorPane("text/plain" info.getDescription());
|
---|
300 | //descArea.setEditable(false);
|
---|
301 |
|
---|
302 | extPanel.add(descArea, BorderLayout.CENTER);
|
---|
303 | extPanel.revalidate();
|
---|
304 | extPanel.repaint();
|
---|
305 | }
|
---|
306 | }
|
---|
307 |
|
---|
308 | public void mouseEntered(MouseEvent e){}
|
---|
309 | public void mouseExited(MouseEvent e){}
|
---|
310 | public void mousePressed(MouseEvent e){}
|
---|
311 | public void mouseReleased(MouseEvent e){}
|
---|
312 | }
|
---|
313 |
|
---|
314 | protected class ConfTreeListener implements TreeSelectionListener{
|
---|
315 |
|
---|
316 | public void valueChanged (TreeSelectionEvent e){
|
---|
317 |
|
---|
318 | String option = new String();
|
---|
319 |
|
---|
320 | try{
|
---|
321 | option = extensionTreeList.getLastSelectedPathComponent().toString();
|
---|
322 | }catch(Exception ex){
|
---|
323 |
|
---|
324 | }
|
---|
325 |
|
---|
326 | if(extensionInformation.containsKey(option)){
|
---|
327 |
|
---|
328 | try{
|
---|
329 | extensionListContainer.setBottomComponent(getProjectButtonPane(option));
|
---|
330 | extensionListContainer.setDividerLocation(250);
|
---|
331 |
|
---|
332 | extensionContent_label.setText(option);
|
---|
333 | }
|
---|
334 | catch(Exception ex){
|
---|
335 | ex.printStackTrace();
|
---|
336 | description_textarea.setText("");
|
---|
337 | description_textarea.append("Sorry, this extension is not available!");
|
---|
338 | extensionContent_pane.add(description_content, BorderLayout.CENTER);
|
---|
339 | extensionContent_pane.validate();
|
---|
340 | extensionContent_pane.repaint();
|
---|
341 | }
|
---|
342 | }
|
---|
343 | else{
|
---|
344 | if(control_pane.getComponentCount()>0){
|
---|
345 | //System.out.println("remove");
|
---|
346 | control_pane.remove(0);
|
---|
347 | control_pane.revalidate();
|
---|
348 | control_pane.repaint();
|
---|
349 | control_pane.add(new JPanel());
|
---|
350 | control_pane.revalidate();
|
---|
351 | control_pane.repaint();
|
---|
352 | }
|
---|
353 |
|
---|
354 | if(extensionContent_pane.getComponentCount()>0){
|
---|
355 |
|
---|
356 | extensionContent_label.setText("Extension Content");
|
---|
357 | //extensionContent_pane.remove(2);
|
---|
358 | //extensionContent_pane.revalidate();
|
---|
359 | //extensionContent_pane.repaint();
|
---|
360 |
|
---|
361 |
|
---|
362 | //JTextArea ja= new JTextArea();
|
---|
363 | //JScrollPane jp = new JScrollPane(ja);
|
---|
364 | //extensionContent_pane.add(jp);
|
---|
365 | //extensionContent_pane.revalidate();
|
---|
366 | //extensionContent_pane.repaint();
|
---|
367 | //xxxxx
|
---|
368 | }
|
---|
369 | }
|
---|
370 | }
|
---|
371 | }
|
---|
372 |
|
---|
373 | public String loadDescription(String className){
|
---|
374 |
|
---|
375 | String description = "";
|
---|
376 | Element rootNode = extFileRootElement;
|
---|
377 | NodeList projectNodeList = rootNode.getElementsByTagName(ExtXMLHelper.EXTENSION);
|
---|
378 |
|
---|
379 | for(int i = 0; i < projectNodeList.getLength(); i++){
|
---|
380 |
|
---|
381 | Element projectNode = (Element)projectNodeList.item(i);
|
---|
382 | NodeList nameNodeList = projectNode.getElementsByTagName(ExtXMLHelper.NAME);
|
---|
383 | String name = nameNodeList.item(0).getChildNodes().item(0).getNodeValue();
|
---|
384 |
|
---|
385 | if(name.equals(className)){
|
---|
386 | NodeList descriptionNodeList = projectNode.getElementsByTagName(ExtXMLHelper.DESCRIPTION);
|
---|
387 | description = descriptionNodeList.item(0).getChildNodes().item(0).getNodeValue();
|
---|
388 | }
|
---|
389 | }
|
---|
390 | return description;
|
---|
391 | }
|
---|
392 |
|
---|
393 | public void load_Admin_UI(){
|
---|
394 |
|
---|
395 | Element rootNode = extFileRootElement;
|
---|
396 |
|
---|
397 | NodeList projectList = rootNode.getElementsByTagName(ExtXMLHelper.EXTENSION);
|
---|
398 |
|
---|
399 | for(int i = 0; i < projectList.getLength(); i++){
|
---|
400 |
|
---|
401 | Element projectNode = (Element)projectList.item(i);
|
---|
402 | ArrayList alist = new ArrayList();
|
---|
403 | NodeList nameList = projectNode.getElementsByTagName(ExtXMLHelper.NAME);
|
---|
404 | String name = nameList.item(0).getChildNodes().item(0).getNodeValue();
|
---|
405 |
|
---|
406 | //Maybe recode this? //xxxxx
|
---|
407 | try{
|
---|
408 | extensionInformation.put(name, alist);
|
---|
409 | }catch (Exception ex){
|
---|
410 | ex.printStackTrace();
|
---|
411 | }
|
---|
412 | }
|
---|
413 | }
|
---|
414 |
|
---|
415 | public static void updateButtonPane(JPanel pane){
|
---|
416 | control_pane.remove(0);
|
---|
417 | control_pane.revalidate();
|
---|
418 | control_pane.repaint();
|
---|
419 | control_pane.add(pane);
|
---|
420 | }
|
---|
421 |
|
---|
422 | public static void updateExtensionContentPane(){
|
---|
423 | CardLayout cl = (CardLayout)( current_description_pane.getLayout());
|
---|
424 | cl.next(current_description_pane);
|
---|
425 |
|
---|
426 | }
|
---|
427 |
|
---|
428 | public static boolean deleteDir(File dir) {
|
---|
429 |
|
---|
430 | if (dir.isDirectory()) {
|
---|
431 | String[] children = dir.list();
|
---|
432 | for (int i=0; i<children.length; i++) {
|
---|
433 | boolean success = deleteDir(new File(dir, children[i]));
|
---|
434 | if (!success) {
|
---|
435 | return false;
|
---|
436 | }
|
---|
437 | }
|
---|
438 | }
|
---|
439 | return dir.delete();
|
---|
440 | }
|
---|
441 |
|
---|
442 |
|
---|
443 |
|
---|
444 | /*
|
---|
445 | private void updateStatus(String project_name, String action){
|
---|
446 |
|
---|
447 | try{
|
---|
448 | DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
|
---|
449 | DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
|
---|
450 | Document doc = docBuilder.newDocument();
|
---|
451 | Element root = doc.createElement(extension_status_root);
|
---|
452 |
|
---|
453 | boolean fileExist = extension_status_file.exists();
|
---|
454 |
|
---|
455 | if(!fileExist){
|
---|
456 | extension_status_file = new File (extension_file);
|
---|
457 | root = doc.createElement(extension_status_root);
|
---|
458 | }
|
---|
459 | else{
|
---|
460 | doc = docBuilder.parse (extension_status_file);
|
---|
461 | root = doc.getDocumentElement();
|
---|
462 | }
|
---|
463 |
|
---|
464 |
|
---|
465 | TransformerFactory tf = TransformerFactory.newInstance();
|
---|
466 | Transformer transformer= tf.newTransformer();
|
---|
467 | DOMSource source= new DOMSource(root);
|
---|
468 | transformer.setOutputProperty(OutputKeys.INDENT,"yes");
|
---|
469 |
|
---|
470 | Writer pwx= new BufferedWriter(new OutputStreamWriter(new FileOutputStream(extension_status_file),"UTF-8"));
|
---|
471 | StreamResult result= new StreamResult(pwx);
|
---|
472 | transformer.transform(source,result);
|
---|
473 | pwx.close();
|
---|
474 |
|
---|
475 | root = null;
|
---|
476 | docBuilderFactory = null;
|
---|
477 | docBuilder = null;
|
---|
478 | doc = null;
|
---|
479 |
|
---|
480 | }catch (Exception e) {
|
---|
481 | System.out.println(e);
|
---|
482 | }
|
---|
483 | }*/
|
---|
484 |
|
---|
485 | public JPanel getProjectButtonPane(String projectName){
|
---|
486 |
|
---|
487 | String option = extensionTreeList.getLastSelectedPathComponent().toString();
|
---|
488 | JPanel buttonPane = new JPanel();
|
---|
489 |
|
---|
490 | ExtensionInformation extension = extensions.get(projectName);
|
---|
491 |
|
---|
492 | String gsdl3ExtHome = GAI.getGSDL3ExtensionHome();
|
---|
493 |
|
---|
494 | JButton[] buttons = extension.getSequenceList().getButtons();
|
---|
495 |
|
---|
496 | GridLayout gl = new GridLayout(buttons.length, 1);
|
---|
497 | gl.setVgap(5);
|
---|
498 | buttonPane.setLayout(gl);
|
---|
499 |
|
---|
500 | for(int j = 0; j < buttons.length; j++){
|
---|
501 | buttonPane.add(buttons[j]);
|
---|
502 | }
|
---|
503 |
|
---|
504 | extension.getSequenceList().updateButtons();
|
---|
505 |
|
---|
506 | return buttonPane;
|
---|
507 | }
|
---|
508 | } |
---|