KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.awt.event.ActionEvent JavaDoc;
14
15 /**
16  * Class that realizes <B>open</B> action.
17  */

18 public class Open extends ActionBase {
19
20    public Open (PackageEditor editor) {
21       super(editor);
22    }
23
24    public void actionPerformed(ActionEvent JavaDoc e) {
25       if (JaWE.getInstance().close()) {
26          String JavaDoc name = JaWE.getInstance().openDialog(
27             ResourceManager.getLanguageDependentString("OpenLabel"));
28          if (name==null) return;
29          JaWE.getInstance().checkNameAndOpenDocumentIfPossible(name);
30       }
31    }
32
33 }
34
Popular Tags