KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > actions > PackageProperties


1 /*
2  * Authors:
3  * Stefanovic Nenad chupo@iis.ns.ac.yu
4  * Bojanic Sasa sasaboy@neobee.net
5  * Puskas Vladimir vpuskas@eunet.yu
6  * Pilipovic Goran zboniek@uns.ac.yu
7  *
8  */

9
10 package org.enhydra.jawe.actions;
11
12 import org.enhydra.jawe.*;
13 import org.enhydra.jawe.xml.*;
14 import org.enhydra.jawe.xml.panels.*;
15
16 import javax.swing.*;
17 import java.awt.event.ActionEvent JavaDoc;
18
19
20 /**
21  * Class that realizes <B>package properties</B> action.
22  */

23 public class PackageProperties extends ActionBase {
24
25    public PackageProperties (PackageEditor editor) {
26       super(editor);
27    }
28
29    public void actionPerformed(ActionEvent JavaDoc e) {
30       PackageEditor pe=(PackageEditor)editor;
31       if (!pe.isInitialized()) {
32          pe.enterPackageID();
33       }
34       XMLPanel p1=pe.getXMLPackage().getPanel(1);
35       XMLPanel p2=pe.getXMLPackage().getPanel(2);
36       XMLPanel p3=pe.getXMLPackage().getPanel(3);
37       XMLTabbedPanel p=new XMLTabbedPanel(pe.getXMLPackage(),
38          new XMLPanel[] {p1,p2,p3});
39
40       XMLElementDialog d=new XMLElementDialog((JFrame)pe.getWindow(),
41          ResourceManager.getLanguageDependentString("PackageKey")+" '"+
42          pe.getXMLPackage().get("Id").toString()+"' - "+
43          ResourceManager.getLanguageDependentString("PropertiesKey"));
44       d.editXMLElement(p,true,false);
45       pe.update();
46    }
47 }
48
Popular Tags