home *** CD-ROM | disk | FTP | other *** search
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
-
- public class PopupSelected implements ActionListener {
- ElemPanel parent;
- XMLPro theApp;
-
- PopupSelected(ElemPanel var1, XMLPro var2) {
- this.theApp = var2;
- this.parent = var1;
- }
-
- public void actionPerformed(ActionEvent var1) {
- String var2 = var1.getActionCommand();
- if (var2.equals(Strings.DeleteElement)) {
- this.parent.deleteElem();
- this.theApp.xmlDocument.modified = true;
- this.theApp.xmlDocument.validated = false;
- } else if (var2.equals(Strings.MoveElementUp)) {
- this.parent.elemUp();
- this.theApp.xmlDocument.validated = false;
- this.theApp.xmlDocument.modified = true;
- this.theApp.xmlDocument.validated = false;
- } else if (var2.equals(Strings.MoveElementDown)) {
- this.parent.elemDown();
- this.theApp.xmlDocument.validated = false;
- this.theApp.xmlDocument.modified = true;
- this.theApp.xmlDocument.modified = true;
- this.theApp.xmlDocument.validated = false;
- } else if (var2.equals(Strings.ExpandBeneath)) {
- this.parent.expandBeneath();
- } else if (var2.equals(Strings.CollapseBeneath)) {
- this.parent.collapseBeneath();
- } else if (var2.equals(Strings.AddPCDATA)) {
- this.parent.addElement("", 3);
- } else if (var2.equals(Strings.AddCDATA)) {
- this.parent.addElement("", 4);
- } else if (var2.equals(Strings.AddComment)) {
- this.parent.addElement("", 8);
- }
-
- this.parent.theTree.repaint();
- }
- }
-