[Japi-cvs] SF.net SVN: japi:[724] libs/swing-recent/trunk/src
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2008-11-30 17:56:33
|
Revision: 724
http://japi.svn.sourceforge.net/japi/?rev=724&view=rev
Author: christianhujer
Date: 2008-11-30 17:56:31 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Added swing-recent source code (moved from historic).
Added Paths:
-----------
libs/swing-recent/trunk/src/prj/
libs/swing-recent/trunk/src/prj/net/
libs/swing-recent/trunk/src/prj/net/sf/
libs/swing-recent/trunk/src/prj/net/sf/japi/
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties
libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/PrefsRecentURLs.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/PrefsRecentURLs.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,155 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.prefs.Preferences;
+import javax.swing.event.EventListenerList;
+
+/** Class for managing recent URLs using Preferences.
+ * It also manages the list of recent URLs.
+ * Warning: The behaviour of creating two PrefsRecentURLs objects for the same class is undefined.
+ * @todo perhaps make this class manage its instances
+ */
+public class PrefsRecentURLs implements RecentURLs {
+
+ /** How many files to show in the last opened list. */
+ private int maxLastOpened;
+
+ /** List with recently opened files. */
+ private List<String> recentlyOpenedURLs = new ArrayList<String>();
+
+ /** List with listeners. */
+ private EventListenerList listeners = new EventListenerList();
+
+ /** The Preferences to manage the recent URLs in. */
+ private Preferences prefs;
+
+ /** The PrefsRecentURls. */
+ private static final Map<Class<?>,PrefsRecentURLs> instances = new WeakHashMap<Class<?>,PrefsRecentURLs>();
+
+ /** Create a new RecentURLs object for managing recent URLs.
+ * Instances created with this constructor are unmanaged.
+ * @param prefs Preferences to use
+ */
+ public PrefsRecentURLs(final Preferences prefs) {
+ this.prefs = prefs;
+ load();
+ }
+
+ /** Create a new RecentURLs object for managing recent URLs.
+ * @param c Class to get Preferences for
+ */
+ private PrefsRecentURLs(final Class<?> c) {
+ prefs = Preferences.userNodeForPackage(c);
+ load();
+ }
+
+ /** Get an instance of PrefsRecentURLs fitting to the supplied class.
+ * @param c Class to get Preferences for
+ * @return RecentURLs for Class c
+ * @see Preferences#userNodeForPackage(Class) Preferences.userNodeForPackage(Class<?>) which is invoked to get the Preferences instance.
+ */
+ public static PrefsRecentURLs getInstance(final Class<?> c) {
+ PrefsRecentURLs instance = instances.get(c);
+ if (instance == null) {
+ instances.put(c, instance = new PrefsRecentURLs(c));
+ }
+ return instance;
+ }
+
+ /** Load preferences. */
+ private void load() {
+ maxLastOpened = prefs.getInt("maxLastOpened", 4);
+ recentlyOpenedURLs.clear();
+ for (int i = 0; i < maxLastOpened; i++) {
+ final String file = prefs.get("recentlyOpenedURL[" + i + "]", null);
+ if (file == null) {
+ break;
+ }
+ recentlyOpenedURLs.add(file);
+ }
+ }
+
+ /** Save preferences. */
+ private void save() {
+ prefs.putInt("maxLastOpened", maxLastOpened);
+ for (int i = 0, size = recentlyOpenedURLs.size(); i < size; i++) {
+ prefs.put("recentlyOpenedURL[" + i + "]", recentlyOpenedURLs.get(i));
+ }
+ }
+
+ /** Get the maximum number of files to show in the last opened list.
+ * @return maximum number of files to show in the last opened list.
+ */
+ public int getMaxLastOpened() {
+ return maxLastOpened;
+ }
+
+ /** Set the maximum number of files to show in the last opened list.
+ * @param maxLastOpened maximum number of files to show in the last opened list.
+ */
+ public void setMaxLastOpened(final int maxLastOpened) {
+ this.maxLastOpened = maxLastOpened;
+ }
+
+ /** {@inheritDoc} */
+ public void addRecentlyURL(final String url) {
+ if (recentlyOpenedURLs.contains(url)) {
+ recentlyOpenedURLs.remove(url);
+ }
+ recentlyOpenedURLs.add(url);
+ if (recentlyOpenedURLs.size() > maxLastOpened) {
+ recentlyOpenedURLs.remove(0);
+ }
+ save();
+ fireREcentURlsChanged();
+ }
+
+ /** Get the recently opened files.
+ * @return recently opened files
+ */
+ public String[] getRecentlyURLs() {
+ return recentlyOpenedURLs.toArray(new String[recentlyOpenedURLs.size()]);
+ }
+
+ /** {@inheritDoc} */
+ public void addRecentURLsListener(final RecentURLsListener listener) {
+ listeners.add(RecentURLsListener.class, listener);
+ }
+
+ /** {@inheritDoc} */
+ public void removeRecentURLsListener(final RecentURLsListener listener) {
+ listeners.remove(RecentURLsListener.class, listener);
+ }
+
+ /** Inform all registered listeners that the list of recent urls changed. */
+ private void fireREcentURlsChanged() {
+ final RecentURLsEvent e = new RecentURLsEvent(this);
+ for (final RecentURLsListener listener : listeners.getListeners(RecentURLsListener.class)) {
+ listener.recentURLsChanged(e);
+ }
+ }
+
+} // class PrefsRecentURLs
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLs.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLs.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,64 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+/** Interface for classes that manage recent URLs.
+ * @author $Author: chris $
+ * @version $Id: RecentURLs.java,v 1.1 2004/12/28 23:51:22 chris Exp $
+ * @see RecentURLsEvent
+ * @see RecentURLsListener
+ * @todo enhance this to support a title.
+ */
+public interface RecentURLs {
+
+ /** Get the maximum number of URLs shown in the list of recently opened URLs.
+ * @return maximum URL number
+ */
+ int getMaxLastOpened();
+
+ /** Set the maximum number of entries in the list of recently opened URLs.
+ * @param maxLastOpened maximum number of URL entries
+ */
+ void setMaxLastOpened(int maxLastOpened);
+
+ /** Add a URL to the list of recently opened URLs.
+ * @param url URL to add
+ */
+ void addRecentlyURL(final String url);
+
+ /** Get the recently opened URLs.
+ * @return recently opened URLs
+ */
+ String[] getRecentlyURLs();
+
+ /** Adds a <code>RecentURLs</code> listener.
+ * Objects use this method to register interest in this RecentURLs object.
+ * When the list of recent urls changes, the registered listeners are informed of the change.
+ * @param listener a <code>RecentURLsListener</code> object
+ */
+ void addRecentURLsListener(RecentURLsListener listener);
+
+ /** Remocves a <code>RecentURLs</code> listener.
+ * @param listener a <code>RecentURLsListener</code> object
+ */
+ void removeRecentURLsListener(RecentURLsListener listener);
+
+} // interface RecentURLs
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLsEvent.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsEvent.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,42 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.util.EventObject;
+
+/** A semantic event which indicates that the list of recent URLs in a RecentURLs object changed.
+ * @see RecentURLsListener
+ * @see RecentURLs
+ */
+public class RecentURLsEvent extends EventObject {
+
+ /** Serial Version. */
+ @SuppressWarnings({"AnalyzingVariableNaming"})
+ private static final long serialVersionUID = 1L;
+
+ /** Creates a new RecentURLsEvent object.
+ * @param source the object responsible for the event
+ */
+ public RecentURLsEvent(final Object source) {
+ super(source);
+ }
+
+} // class RecentURLsEvent
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLsListener.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsListener.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,36 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.util.EventListener;
+
+/** Interface for classes that want to be notified if a RecentURLs object changed its list of recent urls.
+ * @see RecentURLsEvent
+ * @see RecentURLs
+ */
+public interface RecentURLsListener extends EventListener {
+
+ /** Invoked when a RecentURLs changed its list of recent urls.
+ * @param e RecentURLsEvent object
+ */
+ void recentURLsChanged(RecentURLsEvent e);
+
+} // interface RecentURLsListener
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/RecentURLsMenu.java)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/RecentURLsMenu.java 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,121 @@
+/* JAPI - (Yet another (hopefully) useful) Java API
+ *
+ * Copyright (C) 2004-2006 Christian Hujer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+package net.sf.japi.swing.recent;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import net.sf.japi.swing.ActionBuilderFactory;
+import net.sf.japi.swing.app.CanLoad;
+
+/** Class for a menu showing the recently used URLs.
+ * @todo think about serialization of recent and program
+ */
+public class RecentURLsMenu extends JMenu implements RecentURLsListener {
+
+ /** Serial Version. */
+ @SuppressWarnings({"AnalyzingVariableNaming"})
+ private static final long serialVersionUID = 1L;
+
+ /** The object providing the RecentURLs information. */
+ private transient RecentURLs recent;
+
+ /** The program opening documents. */
+ private transient CanLoad program;
+
+ /** Create a RecentURLsMenu.
+ * @param recent object with RecentURLs information.
+ * @param program program that opens documents
+ */
+ public RecentURLsMenu(final RecentURLs recent, final CanLoad program) {
+ super(ActionBuilderFactory.getInstance().getActionBuilder("net.sf.japi.swing.recent").createAction(true, "recent"));
+ this.program = program;
+ this.recent = recent;
+ recent.addRecentURLsListener(this);
+ updateMenu();
+ }
+
+ /** Create a RecentURLsMenu.
+ * The list of recent URLs is stored in the preferences for the class of <var>c</var>.
+ * @param c Class to obtain RecentURLs information for
+ * @param program program that opens documents
+ * @see PrefsRecentURLs
+ */
+ public RecentURLsMenu(final Class<?> c, final CanLoad program) {
+ this(PrefsRecentURLs.getInstance(c), program);
+ }
+
+ /** Create a RecentURLsMenu.
+ * The list of recent URLs is stored in the preferences for the class of <var>program</var>.
+ * @param program program that opens documents
+ * @see PrefsRecentURLs
+ */
+ public RecentURLsMenu(final CanLoad program) {
+ this(PrefsRecentURLs.getInstance(program.getClass()), program);
+ }
+
+ /** Update the menu. */
+ private void updateMenu() {
+ removeAll();
+ for (final String url : recent.getRecentlyURLs()) {
+ add(new JMenuItem(new URLAction(url)));
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void recentURLsChanged(final RecentURLsEvent e) {
+ assert e.getSource() == recent;
+ updateMenu();
+ }
+
+ /** Class for URL Actions.
+ */
+ private class URLAction extends AbstractAction {
+
+ /** Serial Version. */
+ @SuppressWarnings({"AnalyzingVariableNaming"})
+ private static final long serialVersionUID = 1L;
+
+ /** The URL to be opened. */
+ private String url;
+
+ /** Create a URLAction.
+ * @param url URL to use for this action.
+ */
+ URLAction(final String url) {
+ putValue(NAME, url);
+ this.url = url;
+ }
+
+ /** {@inheritDoc} */
+ public void actionPerformed(final ActionEvent e) {
+ try {
+ program.load(url);
+ } catch (final Exception e1) {
+ e1.printStackTrace();//To change body of catch statement use File | Settings | File Templates.
+ // TODO
+ }
+ }
+
+ } // class URLAction
+
+} // class RecentURLsMenu
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/action.properties)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,21 @@
+#
+# JAPI - (Yet another (hopefully) useful) Java API
+#
+# Copyright (C) 2006 Christian Hujer
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+recent.text=Recently opened
Property changes on: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/action_de.properties)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,21 @@
+#
+# JAPI - (Yet another (hopefully) useful) Java API
+#
+# Copyright (C) 2006 Christian Hujer
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+recent.text=Zuletzt ge\xF6ffnet
Property changes on: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/action_de.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Copied: libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html (from rev 635, progs/jeduca/trunk/src/prj/net/sf/japi/progs/jeduca/swing/recent/package.html)
===================================================================
--- libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html (rev 0)
+++ libs/swing-recent/trunk/src/prj/net/sf/japi/swing/recent/package.html 2008-11-30 17:56:31 UTC (rev 724)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ JAPI - (Yet another (hopefully) useful) Java API
+ ~
+ ~ Copyright (C) 2006 Christian Hujer
+ ~
+ ~ This program is free software; you can redistribute it and/or
+ ~ modify it under the terms of the GNU General Public License as
+ ~ published by the Free Software Foundation; either version 2 of the
+ ~ License, or (at your option) any later version.
+ ~
+ ~ This program 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
+ ~ General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program; if not, write to the Free Software
+ ~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ ~ 02111-1307, USA.
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
+ <head>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <title>Manage a list of recently opened files</title>
+ </head>
+ <body>
+ <p>
+ This package contains classes and interfaces for managing a list of recently opened files.
+ </p>
+ <h3>Usage</h3>
+ <ul>
+ <li>
+ Alternatively,
+ <ul>
+ <li>Create and instanciate your desired implementation of {@link net.sf.japi.progs.jeduca.swing.recent.RecentURLs}.</li>
+ <li>Get an instance using {@link net.sf.japi.progs.jeduca.swing.recent.PrefsRecentURLs#PrefsRecentURLs(Class)}</li>
+ </ul>
+ </li>
+ <li>Somewhere implement {@link net.sf.japi.progs.jeduca.swing.io.CanLoad} so a recently loaded document can be activated.</li>
+ <li>Create a Menu for recently opened files (URLs) using {@link net.sf.japi.progs.jeduca.swing.recent.RecentURLsMenu#RecentURLsMenu(net.sf.japi.progs.jeduca.swing.recent.RecentURLs,net.sf.japi.progs.jeduca.swing.io.CanLoad)}</li>
+ </ul>
+ </body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|