Thread: [Japi-cvs] SF.net SVN: japi:[660] libs/swing-app/trunk
Status: Beta
                
                Brought to you by:
                
                    christianhujer
                    
                
            | 
     
      
      
      From: <chr...@us...> - 2008-10-07 18:29:57
       
   | 
Revision: 660
          http://japi.svn.sourceforge.net/japi/?rev=660&view=rev
Author:   christianhujer
Date:     2008-10-07 18:29:48 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
Added doc and test directories.
Modified Paths:
--------------
    libs/swing-app/trunk/libs-swing-app.iml
Added Paths:
-----------
    libs/swing-app/trunk/src/doc/
    libs/swing-app/trunk/src/tst/
Modified: libs/swing-app/trunk/libs-swing-app.iml
===================================================================
--- libs/swing-app/trunk/libs-swing-app.iml	2008-10-07 18:26:27 UTC (rev 659)
+++ libs/swing-app/trunk/libs-swing-app.iml	2008-10-07 18:29:48 UTC (rev 660)
@@ -3,7 +3,9 @@
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
     <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/doc" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/prj" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/tst" isTestSource="true" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
@@ -25,6 +27,11 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module" module-name="libs-swing-action" />
+    <orderEntry type="library" name="jlfgr-1_0" level="project" />
+    <orderEntry type="module" module-name="libs-swing-about" />
+    <orderEntry type="module" module-name="libs-swing-extlib" />
+    <orderEntry type="module" module-name="libs-argparser" />
     <orderEntryProperties />
   </component>
   <component name="copyright">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
     
      
      
      From: <chr...@us...> - 2008-10-07 23:21:00
       
   | 
Revision: 695
          http://japi.svn.sourceforge.net/japi/?rev=695&view=rev
Author:   christianhujer
Date:     2008-10-07 23:20:54 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
Saved current status. Warning: swing-app is very experimental right now!
Modified Paths:
--------------
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java
Added Paths:
-----------
    libs/swing-app/trunk/lib/
    libs/swing-app/trunk/lib/japi-lib-argparser-trunk.jar
    libs/swing-app/trunk/lib/japi-lib-swing-about-trunk.jar
    libs/swing-app/trunk/lib/japi-lib-swing-action-trunk.jar
    libs/swing-app/trunk/lib/japi-lib-swing-extlib-trunk.jar
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEvent.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEventType.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentFrame.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentListener.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/action.properties
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/requirements.txt
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/package-info.java
Property changes on: libs/swing-app/trunk/lib/japi-lib-argparser-trunk.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Property changes on: libs/swing-app/trunk/lib/japi-lib-swing-about-trunk.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Property changes on: libs/swing-app/trunk/lib/japi-lib-swing-action-trunk.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Property changes on: libs/swing-app/trunk/lib/japi-lib-swing-extlib-trunk.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
Added: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java	                        (rev 0)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java	2008-10-07 23:20:54 UTC (rev 695)
@@ -0,0 +1,50 @@
+package net.sf.japi.swing.app;
+
+import java.util.List;
+import net.sf.japi.io.args.CommandWithHelp;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/** Command for launching a GUI application.
+ * If the application does not need additional command line parameters, this class is sufficient and needn't be subclassed.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class AppLaunchCommand extends CommandWithHelp {
+
+    /** The Application Class. */
+    @Nullable private final Class<? extends Application<?>> appClass;
+
+    /** The Application. */
+    @Nullable private Application<?> application;
+
+    /** Creates an AppLaunchCommand.
+     * @param appClass Application Class to launch.
+     */
+    public AppLaunchCommand(@NotNull final Class<? extends Application<?>> appClass) {
+        this.appClass = appClass;
+        application = null;
+    }
+
+    /** Creates an AppLaunchCommand.
+     * @param application Application to launch.
+     */
+    public AppLaunchCommand(@NotNull final Application<?> application) {
+        appClass = null;
+        this.application = application;
+    }
+
+    @SuppressWarnings({"InstanceMethodNamingConvention"})
+    public int run(@NotNull final List<String> args) throws Exception {
+        Application<?> application = this.application;
+        assert !(application == null && appClass == null);
+        if (application == null) {
+            application = appClass.newInstance();
+        }
+
+        for (final String arg : args) {
+            application.load(arg);
+        }
+        application.show();
+        return 0;
+    }
+}
Property changes on: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + LF
Added: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java	                        (rev 0)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java	2008-10-07 23:20:54 UTC (rev 695)
@@ -0,0 +1,503 @@
+package net.sf.japi.swing.app;
+
+import java.awt.Container;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import javax.swing.Action;
+import javax.swing.JDesktopPane;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.WindowConstants;
+import javax.swing.event.InternalFrameEvent;
+import javax.swing.event.InternalFrameListener;
+import net.sf.japi.swing.ActionBuilder;
+import net.sf.japi.swing.ActionBuilderFactory;
+import net.sf.japi.swing.ActionMethod;
+import net.sf.japi.swing.ToolBarLayout;
+import net.sf.japi.swing.about.AboutDialog;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/** Base class for applications.
+ * @param <D> The document type that is managed by this application.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public abstract class Application<D> implements CanLoad<D>, InternalFrameListener, DocumentListener<D> {
+
+    /** The application frame. */
+    @NotNull private JFrame appFrame;
+
+    /** The ActionBuilder. */
+    @NotNull private final ActionBuilder actionBuilder;
+
+    /** Whether or not to ask the user before quitting. */
+    private boolean askForQuit = true;
+
+    /** The About Dialog. */
+    private AboutDialog aboutDialog = null; // lazy
+
+    /** The file chooser for loading and saving. */
+    private JFileChooser fileChooser;
+
+    /** The MDI handler. */
+    private JDesktopPane desktop;
+
+    /** The current document frame. */
+    @Nullable private DocumentFrame<D> currentDocumentFrame = null;
+
+    /** The current document. */
+    @Nullable private Document<D> currentDocument = null;
+
+    /** The opened documents. */
+    @NotNull private final Collection<Document<D>> documents = new ArrayList<Document<D>>();
+
+    /** Maps Window Actions to JMenuItems for later removal. */
+    private final Map<Action, JMenuItem> windowActionMap = new HashMap<Action, JMenuItem>();
+
+    /** Creates an Application. */
+    protected Application() {
+        final ActionBuilderFactory actionBuilderFactory = ActionBuilderFactory.getInstance();
+        actionBuilder = actionBuilderFactory.getActionBuilder(getClass());
+        actionBuilder.addParent(actionBuilderFactory.getActionBuilder("net.sf.japi.swing.app"));
+        appFrame = new JFrame(actionBuilder.getString("application.title"));
+        final Container cont = appFrame.getContentPane();
+        cont.setLayout(new ToolBarLayout());
+        appFrame.setJMenuBar(actionBuilder.createMenuBar(true, "application", this));
+        fileChooser = new JFileChooser();
+        desktop = new JDesktopPane();
+        cont.add(desktop);
+        updateActionStates();
+    }
+
+    /** Invoke this as soon as the application is ready to display. */
+    protected void show() {
+        if (!appFrame.isVisible()) {
+            appFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+            appFrame.addWindowListener(new ApplicationQuitter<D>(this));
+            appFrame.pack();
+            appFrame.setVisible(true);
+        }
+    }
+
+    /** Returns the application frame.
+     * @return The application frame.
+     */
+    @NotNull protected JFrame getAppFrame() {
+        return appFrame;
+    }
+
+    /** Returns the ActionBuilder.
+     * @return The Actionbuilder.
+     */
+    @NotNull protected ActionBuilder getActionBuilder() {
+        return actionBuilder;
+    }
+
+    /** Action New. */
+    @ActionMethod
+    public void fileNew() {
+        addDocument(createNew());
+    }
+
+    /** Action Open.
+     * @throws Exception in case of I/O problems.
+     */
+    @ActionMethod
+    public void fileOpen() throws Exception {
+        fileChooser.setMultiSelectionEnabled(true);
+        if (fileChooser.showOpenDialog(appFrame) == JFileChooser.APPROVE_OPTION) {
+            final File[] files = fileChooser.getSelectedFiles();
+            fileLoop:
+            for (final File file : files) {
+                final String uri = file.toURI().toString();
+                for (final Document<D> doc : documents) {
+                    if (uri.equals(doc.getUri())) {
+                        doc.getFirstFrame().setSelected(true);
+                        continue fileLoop;
+                    }
+                }
+                addDocument(load(uri));
+            }
+        }
+    }
+
+    /** Adds the specified document.
+     * @param doc Document to add.
+     */
+    public void addDocument(@NotNull final Document<D> doc) {
+        documents.add(doc);
+        doc.addDocumentListener(this);
+        // TODO:christianhujer:handle frames with a menu.
+        final DocumentFrame<D> docFrame = doc.createDocumentFrame();
+        docFrame.addInternalFrameListener(this);
+        desktop.add(docFrame);
+        docFrame.pack();
+        docFrame.setVisible(true);
+    }
+
+    /** Action Save.
+     * @throws Exception in case of I/O problems while saving.
+     */
+    @ActionMethod
+    public void fileSave() throws Exception {
+        final Document<D> docToSave = currentDocument;
+        if (docToSave != null) {
+            final String uri = docToSave.getUri();
+            if (uri != null) {
+                save(docToSave, uri);
+                docToSave.setChanged(false);
+                updateActionStates();
+            } else {
+                fileSaveAs();
+            }
+        }
+    }
+
+    /** Action Save As.
+     * @throws Exception in case of I/O problems while saving.
+     */
+    @ActionMethod
+    public void fileSaveAs() throws Exception {
+        saveAs(currentDocument);
+        updateActionStates();
+    }
+
+    /** Saves a document with a new location.
+     * @param docToSaveAs Doc to save with a new location.
+     * @throws Exception in case of I/O problems while saving.
+     */
+    public void saveAs(final Document<D> docToSaveAs) throws Exception {
+        if (docToSaveAs != null) {
+            fileChooser.setMultiSelectionEnabled(false);
+            final String currentUri = docToSaveAs.getUri();
+            if (currentUri != null) {
+                fileChooser.setSelectedFile(new File(new URI(currentUri)));
+            } else {
+                fileChooser.setSelectedFile(new File("Unnamed")); // TODO:christianhujer:I18N/L10N of file name
+            }
+            if (fileChooser.showSaveDialog(appFrame) == JFileChooser.APPROVE_OPTION) {
+                final File file = fileChooser.getSelectedFile();
+                final String uri = file.toURI().toString();
+                save(docToSaveAs, uri);
+                docToSaveAs.setChanged(false);
+                docToSaveAs.setUri(uri);
+                updateActionStates();
+            }
+        }
+    }
+
+    /** Action Save All.
+     * @throws Exception in case of I/O problems during saving.
+     */
+    @ActionMethod
+    public void fileSaveAll() throws Exception {
+        for (final Document<D> docToSave : documents) {
+            final String uri = docToSave.getUri();
+            if (uri != null) {
+                save(docToSave, uri);
+                docToSave.setChanged(false);
+            } else {
+                saveAs(docToSave);
+            }
+        }
+        updateActionStates();
+    }
+
+    /** Action Close. */
+    @ActionMethod
+    public void fileClose() {
+        final Document<D> currentDocument = this.currentDocument;
+        if (currentDocument != null) {
+            if (close(currentDocument)) {
+                // TODO:christianhujer:Finish implementation
+                documents.remove(currentDocument);
+            }
+        }
+        updateActionStates();
+    }
+
+    /** Action New Window. */
+    @ActionMethod
+    public void winNew() {
+        final Document<D> doc = currentDocument;
+        if (doc == null) {
+            return;
+        }
+        final DocumentFrame<D> docFrame = doc.createDocumentFrame();
+        docFrame.addInternalFrameListener(this);
+        desktop.add(docFrame);
+        docFrame.pack();
+        docFrame.setVisible(true);
+        updateActionStates();
+    }
+
+    /** Action Close Window. */
+    @ActionMethod
+    public void winClose() {
+        final DocumentFrame<D> frameToClose = currentDocumentFrame;
+        if (frameToClose == null) {
+            return;
+        }
+        close(frameToClose);
+        updateActionStates();
+    }
+
+    /** Closes the specified frame.
+     * The frame is not definitely closed.
+     * The user might be asked and prevent the frame from being closed.
+     * @param frameToClose The frame to close.
+     * @return <code>true</code> if the frame was closed, otherwise <code>false</code>.
+     */
+    private boolean close(@NotNull final DocumentFrame<D> frameToClose) {
+        final Document<D> doc = frameToClose.getDocument();
+        if (doc.getFrameCount() > 1) {
+            doc.removeDocumentFrame(frameToClose);
+            desktop.remove(frameToClose);
+            desktop.selectFrame(true);
+            return true;
+        } else {
+            close(doc);
+            documents.remove(doc);
+            return false;
+        }
+    }
+
+    /** Closes the specified document.
+     * The document is not yet removed from the list of opened documents.
+     * That must be done by the caller.
+     * @param doc Document to close.
+     * @return <code>true</code> if <var>doc</var> was closed, otherwise <code>false</code>.
+     */
+    private boolean close(@NotNull final Document<D> doc) {
+        if (doc.hasChanged()) {
+            // TODO:christianhujer:Finish implementation
+            final int result = actionBuilder.showConfirmDialog(desktop.getSelectedFrame(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, "documentNotSaved", doc.getTitle());
+            switch (result) {
+            case JOptionPane.YES_OPTION:
+                // TODO:christianhujer:try saving. If that fails, cancel.
+                break;
+            case JOptionPane.NO_OPTION:
+                // TODO:christianhujer:force closing.
+                break;
+            case JOptionPane.CANCEL_OPTION:
+                return false;
+            default:
+                assert false : "Switch that misses cases.";
+            }
+        } else {
+            while (doc.getFrameCount() > 0) {
+                final DocumentFrame<D> frameToClose = doc.getFirstFrame();
+                doc.removeDocumentFrame(frameToClose);
+                desktop.remove(frameToClose);
+            }
+            desktop.selectFrame(true);
+            return true;
+        }
+        return false;
+    }
+
+    /** Action Close All. */
+    @ActionMethod
+    public void fileCloseAll() {
+        final Iterator<Document<D>> iterator = documents.iterator();
+        while (iterator.hasNext()) {
+            final Document<D> doc = iterator.next();
+            if (close(doc)) {
+                // TODO:christianhujer:Finish implementation
+                iterator.remove();
+            }
+        }
+        updateActionStates();
+    }
+    /** Action Quit. */
+    @ActionMethod
+    public void fileQuit() {
+        // TODO:christianhujer:This should ask about each document with unsaved changes.
+        if (!isUserPermissionForQuitRequired() || isQuitAllowedByUser()) {
+            appFrame.dispose();
+        }
+    }
+
+    /** Action About. */
+    @ActionMethod
+    public void about() {
+        synchronized (this) {
+            if (aboutDialog == null) {
+                aboutDialog = new AboutDialog(actionBuilder);
+            }
+        }
+        aboutDialog.showAboutDialog(appFrame);
+    }
+
+    /** Returns whether or not asking the user before quitting is requried.
+     * Asking the user may be required if the user configured to be always asked, or if there are unsaved changes.
+     * @return <code>true</code> if asking the user is required.
+     */
+    public boolean isUserPermissionForQuitRequired() {
+        return askForQuit || hasUnsavedChanges();
+    }
+
+    /** Returns whether or not the user allowed quitting.
+     * @return <code>true</code> if the user allowed quitting, otherwise <code>false</code>
+     */
+    public boolean isQuitAllowedByUser() {
+        return actionBuilder.showQuestionDialog(appFrame, "reallyQuit");
+    }
+
+    /** Returns whether or not one or more documents have unsaved changes.
+     * @return <code>true</code> if one or more documents have unsaved changes, <code>false</code> if all changes are saved.
+     */
+    public boolean hasUnsavedChanges() {
+        // TODO:christianhujer:Finish implementation.
+        return true;
+    }
+
+    public void internalFrameOpened(final InternalFrameEvent e) {
+        final JMenu windows = (JMenu) actionBuilder.find(appFrame.getJMenuBar(), "window");
+        assert windows != null;
+        final DocumentFrame<D> docFrame = (DocumentFrame<D>) e.getInternalFrame();
+        final Action winAction = docFrame.getWindowAction();
+        windowActionMap.put(winAction, windows.add(winAction));
+    }
+
+    public void internalFrameClosing(final InternalFrameEvent e) {
+        close((DocumentFrame<D>) e.getInternalFrame());
+    }
+
+    public void internalFrameClosed(final InternalFrameEvent e) {
+        final JMenu windows = (JMenu) actionBuilder.find(appFrame.getJMenuBar(), "window");
+        assert windows != null;
+        final DocumentFrame<D> docFrame = (DocumentFrame<D>) e.getInternalFrame();
+        final Action winAction = docFrame.getWindowAction();
+        windows.remove(windowActionMap.get(winAction));
+    }
+
+    public void internalFrameIconified(final InternalFrameEvent e) {
+        //ignore
+    }
+
+    public void internalFrameDeiconified(final InternalFrameEvent e) {
+        //ignore
+    }
+
+    public void internalFrameActivated(final InternalFrameEvent e) {
+        setActiveDocumentImpl(((DocumentFrame<D>) e.getInternalFrame()));
+    }
+
+    public void internalFrameDeactivated(final InternalFrameEvent e) {
+        //ignore
+    }
+
+    /** Updates the states of the actions.
+     * @param docFrame Update the application to match this document frame and its document.
+     */
+    private void setActiveDocumentImpl(@Nullable final DocumentFrame<D> docFrame) {
+        currentDocumentFrame = docFrame;
+        if (docFrame != null) {
+            currentDocument = docFrame.getDocument();
+        } else {
+            currentDocument = null;
+        }
+        updateActionStates();
+    }
+
+    /** Updates the states of all actions. */
+    private synchronized void updateActionStates() {
+        final Document<D> currentDocument = this.currentDocument;
+        final boolean hasCurrentDocumentFrame = currentDocumentFrame != null;
+        final boolean hasCurrentDocument = currentDocument != null;
+        final boolean hasDocumentsWithUnsavedChanges = hasDocumentsWithUnsavedChanges();
+        actionBuilder.setActionEnabled("fileSave", hasCurrentDocument && currentDocument.hasChanged());
+        actionBuilder.setActionEnabled("fileSaveAs", hasCurrentDocument);
+        actionBuilder.setActionEnabled("fileSaveAll", hasDocumentsWithUnsavedChanges);
+        actionBuilder.setActionEnabled("fileClose", hasCurrentDocument);
+        actionBuilder.setActionEnabled("fileCloseAll", documents.size() > 0);
+        actionBuilder.setActionEnabled("winNew", hasCurrentDocument);
+        actionBuilder.setActionEnabled("winClose", hasCurrentDocumentFrame);
+    }
+
+    private boolean hasDocumentsWithUnsavedChanges() {
+        for (final Document<D> doc : documents) {
+            if (doc.hasChanged()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @NotNull public abstract Document<D> load(@NotNull final String uri) throws Exception;
+
+    /** Saves the specified document at the specified uri.
+     * @param doc Document to save.
+     * @param uri Uri at which to save the document.
+     * @throws Exception in case of problems while saving.
+     */
+    public abstract void save(@NotNull final Document<D> doc, @NotNull final String uri) throws Exception;
+
+    /** Creates a new empty document.
+     * @return A new empty document.
+     */
+    public abstract Document<D> createNew();
+
+    /** Opens the specified uri for writing.
+     * @param uri URI to open
+     * @return OutputStream for writing to that uri.
+     * @throws IOException in case the uri couldn't be opened for writing.
+     * @throws URISyntaxException in case the syntax of the uri was not correct.
+     */
+    public static OutputStream openUriForwriting(@NotNull final String uri) throws IOException, URISyntaxException {
+        final URI theUri = new URI(uri);
+        final String scheme = theUri.getScheme();
+        if (scheme == null || "file".equals(scheme)) {
+            return new FileOutputStream(new File(theUri));
+        }
+        final URL url = theUri.toURL();
+        final URLConnection con = url.openConnection();
+        con.setDoInput(true);
+        con.setDoOutput(true);
+        return con.getOutputStream();
+    }
+
+    /** Opens the specified uri for reading.
+     * @param uri URI to open
+     * @return InputStream for reading from that uri.
+     * @throws IOException in case the uri couldn't be opened for reading.
+     * @throws URISyntaxException in case the syntax of the uri was not correct.
+     */
+    public static InputStream openUriForReading(@NotNull final String uri) throws IOException, URISyntaxException {
+        final URI theUri = new URI(uri);
+        final URL url = theUri.toURL();
+        return url.openStream();
+    }
+
+    public void documentUriChanged(@NotNull final DocumentEvent<D> e) {
+        // Nothing to do
+    }
+
+    public void documentTitleChanged(@NotNull final DocumentEvent<D> e) {
+        // Nothing to do
+    }
+
+    public void documentContentChanged(@NotNull final DocumentEvent<D> e) {
+        if (e.getSource() == currentDocument) {
+            updateActionStates();
+        }
+    }
+
+}
Property changes on: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + LF
Added: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java	                        (rev 0)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java	2008-10-07 23:20:54 UTC (rev 695)
@@ -0,0 +1,27 @@
+package net.sf.japi.swing.app;
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import org.jetbrains.annotations.NotNull;
+
+/** Quits an application when its window is closing.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ * @param <D> The document type that is managed by the application.
+ */
+class ApplicationQuitter<D> extends WindowAdapter {
+
+    /** Application to quit. */
+    @NotNull private Application<D> application;
+
+    /** Creates an ApplicationQuitter.
+     * @param application Application to quit when its window is closing.
+     */
+    ApplicationQuitter(@NotNull final Application<D> application) {
+        this.application = application;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void windowClosing(final WindowEvent e) {
+        application.fileQuit();
+    }
+}
Property changes on: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + LF
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java	2008-10-07 23:03:58 UTC (rev 694)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java	2008-10-07 23:20:54 UTC (rev 695)
@@ -22,16 +22,17 @@
 import org.jetbrains.annotations.NotNull;
 
 /** Interface to be implemented by classes that are able to load a URL.
+ * @param <D> The document type that can be loaded.
  * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
  */
-public interface CanLoad {
+public interface CanLoad<D> {
 
     /** Load a document.
-     * This method does not declare any exceptions.
-     * The implementor of this method is responsible for handling any exceptional conditions which might occur during the load operation.
-     * @param url URL to load
-     * @return <code>true</code> if and only if loading the file was successful
+     * The returned document will have its URI set.
+     * @param uri URL to load.
+     * @return The document that was just loaded.
+     * @throws Exception in case of problems when loading.
      */
-    boolean load(@NotNull String url);
+    @NotNull Document<D> load(@NotNull String uri) throws Exception;
 
 } // interface CanLoad
Added: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java	                        (rev 0)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java	2008-10-07 23:20:54 UTC (rev 695)
@@ -0,0 +1,239 @@
+package net.sf.japi.swing.app;
+
+import java.awt.Component;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.event.EventListenerList;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/** A document represents an entity of work in an application that can be loaded and saved.
+ * In a text editor, a document would represent the text file that is being edited.
+ * In a word processor, it would be the document edited in the word processor.
+ * In a spread sheet, it would be the spread sheet file.
+ * @param <D> The document type that is managed by the application.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public abstract class Document<D> {
+
+    /** The frames of this document. */
+    private final List<DocumentFrame<D>> frames = new ArrayList<DocumentFrame<D>>();
+
+    /** The Event Listeners. */
+    private final EventListenerList listenerList = new EventListenerList();
+
+    /** The data of this Document. */
+    @NotNull private D data;
+
+    /** The URI of this document. */
+    @Nullable private String uri;
+
+    /** The title of this document. */
+    // TODO:christianhujer:@Nullable or @NotNull
+    private String title;
+
+    /** The changed state of this document. */
+    private boolean changed = false;
+
+    /** Creates a Document.
+     * @param uri URI.
+     * @param title Title.
+     * @param data Data for this document.
+     */
+    public Document(@Nullable final String uri, final String title, @NotNull final D data) {
+        this.uri = uri;
+        this.title = title;
+        this.data = data;
+    }
+
+    /** Adds a {@link DocumentListener} to this Document.
+     * @param l the listener to be added.
+     */
+    public void addDocumentListener(final DocumentListener<D> l) {
+        listenerList.add(DocumentListener.class, l);
+    }
+
+    /** Removes a {@link DocumentListener} from this Document.
+     * @param l the listener to be removed.
+     */
+    public void removeDocumentListener(final DocumentListener<D> l) {
+        listenerList.add(DocumentListener.class, l);
+    }
+
+    /** Forward the notification that the document title has changed
+     * to all {@link DocumentListener}s that registered themselves
+     * as listeners for this Document.
+     */
+    private void fireDocumentTitleChanged() {
+        final Object[] listeners = listenerList.getListenerList();
+        DocumentEvent<D> e = null;
+        for (int i = listeners.length - 2; i >= 0; i -= 2) {
+            if (listeners[i] == DocumentListener.class) {
+                if (e == null) {
+                    e = new DocumentEvent<D>(this, DocumentEventType.DOCUMENT_TITLE_CHANGED);
+                }
+                //noinspection unchecked
+                ((DocumentListener<D>) listeners[i + 1]).documentTitleChanged(e);
+            }
+        }
+    }
+
+    /** Forward the notification that the document uri has changed
+     * to all {@link DocumentListener}s that registered themselves
+     * as listeners for this Document.
+     */
+    private void fireDocumentUriChanged() {
+        final Object[] listeners = li...
 
[truncated message content] | 
| 
     
      
      
      From: <chr...@us...> - 2009-02-14 21:23:07
       
   | 
Revision: 812
          http://japi.svn.sourceforge.net/japi/?rev=812&view=rev
Author:   christianhujer
Date:     2009-02-14 21:22:58 +0000 (Sat, 14 Feb 2009)
Log Message:
-----------
Updated copyright statements in source code.
Modified Paths:
--------------
    libs/swing-app/trunk/build.xml
    libs/swing-app/trunk/module.properties
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEvent.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEventType.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentFrame.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentListener.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/action.properties
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java
    libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/package-info.java
Modified: libs/swing-app/trunk/build.xml
===================================================================
--- libs/swing-app/trunk/build.xml	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/build.xml	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ~ JAPI libs-swing-app is a library for solving application development tasks of general nature.
-  ~ Copyright (C) 2007  Christian Hujer.
+  ~ Copyright (C) 2009  Christian Hujer.
   ~
   ~ This library is free software; you can redistribute it and/or
   ~ modify it under the terms of the GNU Lesser General Public
Modified: libs/swing-app/trunk/module.properties
===================================================================
--- libs/swing-app/trunk/module.properties	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/module.properties	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,6 +1,5 @@
 #
-# JAPI libs-swing-app is a library for solving application development tasks of general nature.
-# Copyright (C) 2007  Christian Hujer.
+# Copyright (C) 2009  Christian Hujer.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/AppLaunchCommand.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.util.List;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Application.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.awt.Container;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/ApplicationQuitter.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.awt.event.WindowAdapter;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/CanLoad.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,6 +1,5 @@
 /*
- * JAPI libs-swing-app is a library for solving application development tasks of general nature.
- * Copyright (C) 2007  Christian Hujer.
+ * Copyright (C) 2009  Christian Hujer.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/Document.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.awt.Component;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEvent.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEvent.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEvent.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.util.EventObject;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEventType.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEventType.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentEventType.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 /** Type for {@link DocumentEvent}s.
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentFrame.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentFrame.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentFrame.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.awt.event.ActionEvent;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentListener.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentListener.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/DocumentListener.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app;
 
 import java.util.EventListener;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/action.properties
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/action.properties	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/action.properties	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+#
+# Copyright (C) 2009  Christian Hujer.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+
 application.title=Missing Resource: application.title
 
 application.menubar=file window help
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/Application.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app.script;
 
 import java.util.List;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/TryApplication.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 package net.sf.japi.swing.app.script;
 
 import java.util.List;
Modified: libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/package-info.java
===================================================================
--- libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/package-info.java	2009-02-14 21:21:51 UTC (rev 811)
+++ libs/swing-app/trunk/src/prj/net/sf/japi/swing/app/script/package-info.java	2009-02-14 21:22:58 UTC (rev 812)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009  Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 /** This package contains the fundamental bindings for scripting applications.
  * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
  */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 | 
| 
     
      
      
      From: <chr...@us...> - 2009-02-21 23:57:18
       
   | 
Revision: 1025
          http://japi.svn.sourceforge.net/japi/?rev=1025&view=rev
Author:   christianhujer
Date:     2009-02-21 23:57:16 +0000 (Sat, 21 Feb 2009)
Log Message:
-----------
Fetch required libraries
Modified Paths:
--------------
    libs/swing-app/trunk/build.xml
Removed Paths:
-------------
    libs/swing-app/trunk/lib/japi-lib-argparser-trunk.jar
    libs/swing-app/trunk/lib/japi-lib-swing-about-trunk.jar
    libs/swing-app/trunk/lib/japi-lib-swing-action-trunk.jar
    libs/swing-app/trunk/lib/japi-lib-swing-extlib-trunk.jar
Modified: libs/swing-app/trunk/build.xml
===================================================================
--- libs/swing-app/trunk/build.xml	2009-02-21 23:55:08 UTC (rev 1024)
+++ libs/swing-app/trunk/build.xml	2009-02-21 23:57:16 UTC (rev 1025)
@@ -23,4 +23,11 @@
 
     &commonBuild;
 
+    <target name="getlibs">
+        <get src="http://downloads.sourceforge.net/japi/japi-lib-argparser-0.3.0.jar" dest="lib/japi-lib-argparser.jar" />
+        <get src="http://downloads.sourceforge.net/japi/japi-lib-swing-about-0.1.0.jar" dest="lib/japi-lib-swing-about.jar" />
+        <get src="http://downloads.sourceforge.net/japi/japi-lib-swing-action-0.1.0.jar" dest="lib/japi-lib-swing-action.jar" />
+        <get src="http://downloads.sourceforge.net/japi/japi-lib-swing-extlib-0.1.0.jar" dest="lib/japi-lib-swing-extlib.jar" />
+    </target>
+
 </project>
Deleted: libs/swing-app/trunk/lib/japi-lib-argparser-trunk.jar
===================================================================
(Binary files differ)
Deleted: libs/swing-app/trunk/lib/japi-lib-swing-about-trunk.jar
===================================================================
(Binary files differ)
Deleted: libs/swing-app/trunk/lib/japi-lib-swing-action-trunk.jar
===================================================================
(Binary files differ)
Deleted: libs/swing-app/trunk/lib/japi-lib-swing-extlib-trunk.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |