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