From c63257e8cc0ba1a5aca9364b22171abe7279d479 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 23 Jun 2008 08:52:57 +0200 Subject: [PATCH] whitespace fixups --- .../pterodactylus/jsite/core/BackendException.java | 8 +-- src/net/pterodactylus/jsite/core/Core.java | 29 +++++----- src/net/pterodactylus/jsite/core/CoreImpl.java | 46 ++++++++-------- src/net/pterodactylus/jsite/core/CoreListener.java | 44 +++++++-------- src/net/pterodactylus/jsite/core/FileOverride.java | 19 +++---- src/net/pterodactylus/jsite/core/Insert.java | 20 +++---- .../pterodactylus/jsite/core/InsertListener.java | 21 +++---- .../pterodactylus/jsite/core/InsertManager.java | 26 ++++----- .../pterodactylus/jsite/core/JSiteException.java | 8 +-- .../pterodactylus/jsite/core/NoNodeException.java | 8 +-- src/net/pterodactylus/jsite/core/Node.java | 18 +++--- src/net/pterodactylus/jsite/core/NodeListener.java | 12 ++-- src/net/pterodactylus/jsite/core/NodeManager.java | 44 +++++++-------- src/net/pterodactylus/jsite/core/Project.java | 64 +++++++++++----------- src/net/pterodactylus/jsite/core/ProjectFile.java | 1 - .../pterodactylus/jsite/core/ProjectLifetime.java | 6 +- .../pterodactylus/jsite/core/ProjectManager.java | 20 +++---- src/net/pterodactylus/jsite/core/Request.java | 38 ++++++------- .../pterodactylus/jsite/core/RequestListener.java | 12 ++-- .../pterodactylus/jsite/core/RequestManager.java | 34 ++++++------ src/net/pterodactylus/jsite/core/Verifier.java | 8 +-- src/net/pterodactylus/jsite/gui/AboutDialog.java | 36 ++++++------ src/net/pterodactylus/jsite/gui/AddNodeDialog.java | 18 +++--- .../jsite/gui/ConfigurationDialog.java | 38 ++++++------- src/net/pterodactylus/jsite/gui/FileManager.java | 44 +++++++-------- .../pterodactylus/jsite/gui/FixedJMenuItem.java | 4 +- src/net/pterodactylus/jsite/gui/FontComboBox.java | 6 +- src/net/pterodactylus/jsite/gui/LogWindow.java | 6 +- src/net/pterodactylus/jsite/gui/MainWindow.java | 30 +++++----- src/net/pterodactylus/jsite/gui/NodeLabel.java | 6 +- src/net/pterodactylus/jsite/gui/ProjectPanel.java | 18 +++--- .../pterodactylus/jsite/gui/SwingInterface.java | 6 +- src/net/pterodactylus/jsite/i18n/I18n.java | 22 ++++---- src/net/pterodactylus/jsite/i18n/I18nable.java | 2 +- .../pterodactylus/jsite/i18n/gui/I18nAction.java | 10 ++-- .../pterodactylus/jsite/i18n/gui/I18nLabel.java | 10 ++-- src/net/pterodactylus/jsite/i18n/gui/I18nMenu.java | 4 +- .../pterodactylus/jsite/i18n/gui/package-info.java | 2 +- src/net/pterodactylus/jsite/main/Main.java | 10 ++-- src/net/pterodactylus/jsite/main/Version.java | 16 +++--- src/net/pterodactylus/jsite/util/IdGenerator.java | 6 +- src/net/pterodactylus/util/beans/AbstractBean.java | 14 ++--- src/net/pterodactylus/util/data/Node.java | 32 +++++------ src/net/pterodactylus/util/data/NodeImpl.java | 16 +++--- src/net/pterodactylus/util/data/Tree.java | 4 +- src/net/pterodactylus/util/image/IconLoader.java | 10 ++-- src/net/pterodactylus/util/io/Closer.java | 16 +++--- .../pterodactylus/util/io/LimitedInputStream.java | 12 ++-- src/net/pterodactylus/util/io/MimeTypes.java | 10 ++-- src/net/pterodactylus/util/io/StreamCopier.java | 10 ++-- src/net/pterodactylus/util/logging/Logging.java | 22 ++++---- .../util/logging/LoggingListener.java | 4 +- src/net/pterodactylus/util/number/Hex.java | 6 +- .../pterodactylus/util/swing/SortableTreeNode.java | 14 ++--- src/net/pterodactylus/util/swing/StatusBar.java | 14 ++--- src/net/pterodactylus/util/swing/SwingUtils.java | 10 ++-- 56 files changed, 486 insertions(+), 488 deletions(-) diff --git a/src/net/pterodactylus/jsite/core/BackendException.java b/src/net/pterodactylus/jsite/core/BackendException.java index d0e3e58..f344721 100644 --- a/src/net/pterodactylus/jsite/core/BackendException.java +++ b/src/net/pterodactylus/jsite/core/BackendException.java @@ -21,7 +21,7 @@ package net.pterodactylus.jsite.core; /** * Exception that is thrown when there is a problem with the FCP backend. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class BackendException extends JSiteException { @@ -35,7 +35,7 @@ public class BackendException extends JSiteException { /** * Creates a new backend exception with the given message. - * + * * @param message * The message of the exception */ @@ -45,7 +45,7 @@ public class BackendException extends JSiteException { /** * Creates a new backend exception with the given cause. - * + * * @param cause * The cause of the exception */ @@ -55,7 +55,7 @@ public class BackendException extends JSiteException { /** * Creates a new backend exception with the given message and cause. - * + * * @param message * The message of the exception * @param cause diff --git a/src/net/pterodactylus/jsite/core/Core.java b/src/net/pterodactylus/jsite/core/Core.java index 4a3531a..328e8ab 100644 --- a/src/net/pterodactylus/jsite/core/Core.java +++ b/src/net/pterodactylus/jsite/core/Core.java @@ -24,17 +24,16 @@ import java.net.UnknownHostException; import java.util.List; import java.util.concurrent.Executor; - /** * Interface for the core. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface Core { /** * Adds the given listener to the list of registered listeners. - * + * * @param coreListener * The listener to add */ @@ -42,7 +41,7 @@ public interface Core { /** * Removes the given listener from the list of registered listeners. - * + * * @param coreListener * The listener to remove */ @@ -50,14 +49,14 @@ public interface Core { /** * Returns a thread pool. - * + * * @return A thread pool */ public Executor getThreadPool(); /** * Adds the given node to the core. - * + * * @param node * The node to add * @return true if the node was added, false @@ -69,7 +68,7 @@ public interface Core { /** * Removes the given node from the core. - * + * * @param node * The node to remove */ @@ -77,14 +76,14 @@ public interface Core { /** * Returns the list of all configured nodes. - * + * * @return All configured nodes */ public List getNodes(); /** * Returns whether the core is currently connected to the given node. - * + * * @param node * The node to check * @return true if the core is currently connected to the @@ -104,7 +103,7 @@ public interface Core { /** * Connects to the given node. - * + * * @param node * The node to connect to */ @@ -112,7 +111,7 @@ public interface Core { /** * Disconnects from the given node. - * + * * @param node * The node to disconnect from */ @@ -120,7 +119,7 @@ public interface Core { /** * Creates a new project. - * + * * @throws IOException * if an I/O error occured communicating with the node * @throws JSiteException @@ -132,7 +131,7 @@ public interface Core { * Clones the given project. {@link CoreListener}s will be notified of the * new clone via the {@link CoreListener#projectCloned(Project, Project)} * event. - * + * * @param project * The project to clone */ @@ -140,7 +139,7 @@ public interface Core { /** * Removes the given project. - * + * * @param project * The project to remove */ @@ -148,7 +147,7 @@ public interface Core { /** * Returns a list of all projects. - * + * * @return A list of all projects */ public List getProjects(); diff --git a/src/net/pterodactylus/jsite/core/CoreImpl.java b/src/net/pterodactylus/jsite/core/CoreImpl.java index 3654c4f..cff97c6 100644 --- a/src/net/pterodactylus/jsite/core/CoreImpl.java +++ b/src/net/pterodactylus/jsite/core/CoreImpl.java @@ -32,7 +32,7 @@ import net.pterodactylus.util.logging.Logging; /** * The core of jSite. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class CoreImpl implements Core, NodeListener, RequestListener { @@ -79,7 +79,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the projects were loaded successfully. - * + * * @param directory * The directory the projects were loaded from */ @@ -93,7 +93,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all core listeners that loading the projects from the given * directory has failed. - * + * * @param directory * The directory the projects were tried to load from * @param throwable @@ -108,7 +108,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the projects were successfully saved. - * + * * @param directory * The directory the projects were saved to */ @@ -121,7 +121,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the projects could not be saved. - * + * * @param directory * The directory the projects were to be saved to * @param throwable @@ -136,7 +136,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a project was added. - * + * * @param project * The project that was added */ @@ -149,7 +149,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a project was cloned. - * + * * @param clonedProject * The project that was cloned * @param projectClone @@ -164,7 +164,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a project was removed. - * + * * @param project * The project that was removed */ @@ -177,7 +177,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the nodes were successfully loaded. - * + * * @param directory * The directory the nodes were loaded from */ @@ -190,7 +190,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that loading the nodes has failed. - * + * * @param directory * The directory the nodes were loaded from * @param throwable @@ -205,7 +205,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the nodes were saved successfully. - * + * * @param directory * The directory the nodes were saved to */ @@ -218,7 +218,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that saving the nodes has failed. - * + * * @param directory * The directory the nodes were saved to * @param throwable @@ -253,7 +253,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a node was added to the core. - * + * * @param node * The node that was added */ @@ -266,7 +266,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a node was removed from the core. - * + * * @param node * The node that was removed */ @@ -280,7 +280,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a connection to the given node is now being * established. - * + * * @param node * The node that is being connected to */ @@ -293,7 +293,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the given node is now connected. - * + * * @param node * The node that is now connected */ @@ -306,7 +306,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that a connection to a node has failed. - * + * * @param node * The node that could not be connected * @param cause @@ -321,7 +321,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Notifies all listeners that the given node was disconnected. - * + * * @param node * The node that is now disconnected * @param throwable @@ -348,7 +348,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Returns the project manager. - * + * * @return The project manager */ public ProjectManager getProjectManager() { @@ -357,7 +357,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Sets the project manager to use. - * + * * @param projectManager * The project manager to use */ @@ -367,7 +367,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Returns the node manager. - * + * * @return The node manager */ public NodeManager getNodeManager() { @@ -376,7 +376,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Sets the node manager to use. - * + * * @param nodeManager * The node manager to use */ @@ -386,7 +386,7 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * Sets the request manager to use. - * + * * @param requestManager * The request manager to use */ diff --git a/src/net/pterodactylus/jsite/core/CoreListener.java b/src/net/pterodactylus/jsite/core/CoreListener.java index 57eea5a..4da2ec8 100644 --- a/src/net/pterodactylus/jsite/core/CoreListener.java +++ b/src/net/pterodactylus/jsite/core/CoreListener.java @@ -21,7 +21,7 @@ package net.pterodactylus.jsite.core; /** * Interface definition for user interfaces. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface CoreListener { @@ -32,7 +32,7 @@ public interface CoreListener { /** * Notifies a listener that loading the projects finished successfully. - * + * * @param directory * The directory the nodes were loaded from */ @@ -40,7 +40,7 @@ public interface CoreListener { /** * Notifies all listeners that loading the projects has failed. - * + * * @param directory * The directory the projects were tried to load from * @param throwable @@ -51,7 +51,7 @@ public interface CoreListener { /** * Notifies a listener that the projects were successfully saved to the * given directory. - * + * * @param directory * The directory the projects were saved to */ @@ -59,7 +59,7 @@ public interface CoreListener { /** * Notifies a listener that saving the projects has failed. - * + * * @param directory * The directory the projects were to be saved to * @param throwable @@ -69,7 +69,7 @@ public interface CoreListener { /** * Notifies a listener that the given project was added. - * + * * @param project * The project that was added. */ @@ -77,7 +77,7 @@ public interface CoreListener { /** * Notifies a listener that a project was cloned. - * + * * @param clonedProject * The clones project * @param projectClone @@ -87,7 +87,7 @@ public interface CoreListener { /** * Notifies a listener that the given project was removed. - * + * * @param project * The project that was removed. */ @@ -99,7 +99,7 @@ public interface CoreListener { /** * Notifies a listener that the nodes were successfully loaded. - * + * * @param directory * The directory the nodes were loaded from */ @@ -107,7 +107,7 @@ public interface CoreListener { /** * Notifies a listener that loading the nodes has failed. - * + * * @param directory * The directory the nodes were loaded from * @param throwable @@ -117,7 +117,7 @@ public interface CoreListener { /** * Notifies a listener that the nodes were successfully saved. - * + * * @param directory * The directory the nodes were saved to */ @@ -125,7 +125,7 @@ public interface CoreListener { /** * Notifies a listener that saving the nodes has failed. - * + * * @param directory * The directory the nodes were saved to * @param throwable @@ -153,7 +153,7 @@ public interface CoreListener { /** * Notifies a listener that a node was added to the core. - * + * * @param node * The node that was added. */ @@ -163,7 +163,7 @@ public interface CoreListener { * Notifies a listener that a node was removed from the core. Before a node * is removed, it will be disconnected (and * {@link #nodeDisconnected(Node, Throwable)} will be called). - * + * * @param node * The node that was removed */ @@ -173,7 +173,7 @@ public interface CoreListener { * Notifies all listeners that the core started connecting to the given * node. Before a node is connected, it will be added (and * {@link #nodeAdded(Node)} will be called). - * + * * @param node * The node that is being connected */ @@ -181,7 +181,7 @@ public interface CoreListener { /** * Notifies all listeners that the core connected to the given node. - * + * * @param node * The node that is connected */ @@ -189,7 +189,7 @@ public interface CoreListener { /** * Notifies a listener that a connection to a node has failed. - * + * * @param node * The node that could not be connected * @param cause @@ -199,7 +199,7 @@ public interface CoreListener { /** * Notifies all listeners that the core disconnected from the given node. - * + * * @param node * The node that was diconnected * @param throwable @@ -214,7 +214,7 @@ public interface CoreListener { /** * Notifies a listener that a project insert started. - * + * * @param project * The project that is now inserting */ @@ -222,7 +222,7 @@ public interface CoreListener { /** * Notifies a listener that a project insert made progress. - * + * * @param project * The project that made progress * @param totalBlocks @@ -244,7 +244,7 @@ public interface CoreListener { /** * Notifies a listener that a project insert has generated a URI. - * + * * @param project * The project that generated a URI * @param uri @@ -254,7 +254,7 @@ public interface CoreListener { /** * Notifies a listener that a project insert has finished. - * + * * @param project * The project that has finished * @param success diff --git a/src/net/pterodactylus/jsite/core/FileOverride.java b/src/net/pterodactylus/jsite/core/FileOverride.java index 474d057..259ecc7 100644 --- a/src/net/pterodactylus/jsite/core/FileOverride.java +++ b/src/net/pterodactylus/jsite/core/FileOverride.java @@ -27,9 +27,8 @@ import net.pterodactylus.util.logging.Logging; /** * An override is used to enter other information about a file than the defaults * would have yielded. It is also used to add redirects to a project. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FileOverride { @@ -47,7 +46,7 @@ public class FileOverride { /** * Checks whether this override has any content. - * + * * @return true if this override does not have any effects, * false otherwise */ @@ -57,7 +56,7 @@ public class FileOverride { /** * Returns the insert override. - * + * * @return true if the entry should be inserted, * false if it should not be inserted, * null if the default should not be overridden @@ -68,7 +67,7 @@ public class FileOverride { /** * Sets the insert override. - * + * * @param insert * true if the entry should be inserted, * false if it should not be inserted, @@ -80,7 +79,7 @@ public class FileOverride { /** * Returns the override content type. - * + * * @return The override content type, or null to not override * the default */ @@ -90,7 +89,7 @@ public class FileOverride { /** * Sets the override content type. - * + * * @param contentType * The override content type, or null to not * override the default @@ -101,7 +100,7 @@ public class FileOverride { /** * Returns the target of a redirect. - * + * * @return The target URI of the redirect, or null if no * redirect should be created */ @@ -111,7 +110,7 @@ public class FileOverride { /** * Sets the target of a redirect. - * + * * @param redirectTarget * The target URI of the redirect, or null if no * redirect should be created @@ -131,7 +130,7 @@ public class FileOverride { /** * Converts an override string created by {@link #toString()} back to an * {@link FileOverride} object. - * + * * @param overrideString * The textual representation of the override * @return The parsed override, or null if the string could diff --git a/src/net/pterodactylus/jsite/core/Insert.java b/src/net/pterodactylus/jsite/core/Insert.java index 019dcde..ba61be2 100644 --- a/src/net/pterodactylus/jsite/core/Insert.java +++ b/src/net/pterodactylus/jsite/core/Insert.java @@ -1,16 +1,16 @@ /* * jSite2 - Insert.java - Copyright © 2008 David Roden - * + * * 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. @@ -20,7 +20,7 @@ package net.pterodactylus.jsite.core; /** * Represents a currently running or past insert. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Insert extends Request { @@ -36,7 +36,7 @@ public class Insert extends Request { /** * Creates a new insert that starts now. - * + * * @param project * The project that is inserted * @param node @@ -50,7 +50,7 @@ public class Insert extends Request { /** * Creates a new insert. - * + * * @param project * The project that is inserted * @param node @@ -68,7 +68,7 @@ public class Insert extends Request { /** * Returns the project that is inserted. - * + * * @return The inserted project */ public Project getProject() { @@ -77,7 +77,7 @@ public class Insert extends Request { /** * Returns the start time of the insert. - * + * * @return The start time of the insert */ public long getStartTime() { @@ -87,7 +87,7 @@ public class Insert extends Request { /** * Returns the end time of the insert. If the insert has not yet finished, * -1 is returned. - * + * * @return The end time of the insert, or -1 if the insert is * still running */ @@ -97,7 +97,7 @@ public class Insert extends Request { /** * Sets the end time of the insert. - * + * * @param endTime * The end time of the insert */ diff --git a/src/net/pterodactylus/jsite/core/InsertListener.java b/src/net/pterodactylus/jsite/core/InsertListener.java index 0ab6acb..d4751c0 100644 --- a/src/net/pterodactylus/jsite/core/InsertListener.java +++ b/src/net/pterodactylus/jsite/core/InsertListener.java @@ -1,20 +1,21 @@ /* * jSite2 - InsertListener.java - Copyright © 2008 David Roden - * + * * 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.pterodactylus.jsite.core; import java.util.EventListener; @@ -22,14 +23,14 @@ import java.util.EventListener; /** * Interface for objects that want to be notified on events emitted by the * {@link InsertManager}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert was added. - * + * * @param insert * The insert that was added */ @@ -37,7 +38,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert was removed. - * + * * @param insert * The insert that was removed */ @@ -45,7 +46,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert was started. - * + * * @param insert * The insert that was started */ @@ -53,7 +54,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert made some progress. - * + * * @param insert * The insert that made some progress */ @@ -61,7 +62,7 @@ public interface InsertListener extends EventListener { /** * Notifies listeners that an insert generated a URI. - * + * * @param insert * The insert that generated a URI * @param uri @@ -71,7 +72,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert has finished. - * + * * @param insert * The insert that has finished */ diff --git a/src/net/pterodactylus/jsite/core/InsertManager.java b/src/net/pterodactylus/jsite/core/InsertManager.java index c91b513..bdd02a1 100644 --- a/src/net/pterodactylus/jsite/core/InsertManager.java +++ b/src/net/pterodactylus/jsite/core/InsertManager.java @@ -1,16 +1,16 @@ /* * jSite2 - InsertManager.java - Copyright © 2008 David Roden - * + * * 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. @@ -29,7 +29,7 @@ import net.pterodactylus.util.logging.Logging; /** * Manages all currently running and past inserts. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class InsertManager { @@ -49,7 +49,7 @@ public class InsertManager { /** * Adds an insert listener to the list of insert listeners. - * + * * @param insertListener * The insert listener to add */ @@ -62,7 +62,7 @@ public class InsertManager { /** * Removes an insert listener from the list of insert listeners. - * + * * @param insertListener * The insert listener to remove */ @@ -75,7 +75,7 @@ public class InsertManager { /** * Notifies all listeners that an insert was added. - * + * * @param insert * The insert that was added */ @@ -89,7 +89,7 @@ public class InsertManager { /** * Notifies all listeners that an insert was removed. - * + * * @param insert * The insert that was removes */ @@ -104,7 +104,7 @@ public class InsertManager { /** * Notifies all listeners that an insert was started. - * + * * @param insert * The insert that was started */ @@ -119,7 +119,7 @@ public class InsertManager { /** * Notifies all listeners that an insert made some progress - * + * * @param insert * The insert that made some progress */ @@ -134,7 +134,7 @@ public class InsertManager { /** * Notifies all listeners that an insert generated a URI. - * + * * @param insert * The insert that generated a URI * @param uri @@ -151,7 +151,7 @@ public class InsertManager { /** * Notifies all listeners that an insert has finished. - * + * * @param insert * The insert that has finished */ @@ -172,7 +172,7 @@ public class InsertManager { * Starts to insert the given project. The insert will be made to the node * stored in the project, and if no node is specified in the project, the * given node will be used. - * + * * @param project * The project to insert * @param node diff --git a/src/net/pterodactylus/jsite/core/JSiteException.java b/src/net/pterodactylus/jsite/core/JSiteException.java index 4f54032..fed18ca 100644 --- a/src/net/pterodactylus/jsite/core/JSiteException.java +++ b/src/net/pterodactylus/jsite/core/JSiteException.java @@ -21,7 +21,7 @@ package net.pterodactylus.jsite.core; /** * Base exception for all jSite-specific exceptions. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class JSiteException extends Exception { @@ -35,7 +35,7 @@ public class JSiteException extends Exception { /** * Creates a new jSite exception with the given message. - * + * * @param message * The message of the exception */ @@ -45,7 +45,7 @@ public class JSiteException extends Exception { /** * Creates a new jSite exception with the given cause. - * + * * @param cause * The cause of the exception */ @@ -55,7 +55,7 @@ public class JSiteException extends Exception { /** * Creates a new jSite exception with the given message and cause. - * + * * @param message * The message of the exception * @param cause diff --git a/src/net/pterodactylus/jsite/core/NoNodeException.java b/src/net/pterodactylus/jsite/core/NoNodeException.java index 0fa573e..68f2b16 100644 --- a/src/net/pterodactylus/jsite/core/NoNodeException.java +++ b/src/net/pterodactylus/jsite/core/NoNodeException.java @@ -22,7 +22,7 @@ package net.pterodactylus.jsite.core; /** * Exception that signals the lack of configured nodes that are required for the * action. - * + * * @see NodeManager#generateKeyPair() * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ @@ -37,7 +37,7 @@ public class NoNodeException extends JSiteException { /** * Creates a new exception with the given message. - * + * * @param message * The message of the exception */ @@ -47,7 +47,7 @@ public class NoNodeException extends JSiteException { /** * Creates a new exception with the given cause. - * + * * @param cause * The cause of the exception */ @@ -57,7 +57,7 @@ public class NoNodeException extends JSiteException { /** * Creates a new exception with the given message and cause. - * + * * @param message * The message of the exception * @param cause diff --git a/src/net/pterodactylus/jsite/core/Node.java b/src/net/pterodactylus/jsite/core/Node.java index 9a4d3be..3d35b47 100644 --- a/src/net/pterodactylus/jsite/core/Node.java +++ b/src/net/pterodactylus/jsite/core/Node.java @@ -28,7 +28,7 @@ import net.pterodactylus.util.number.Hex; /** * Container for a Freenet node. A Node is capable of notifying * {@link PropertyChangeListener}s if any of the contained properties change. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Node extends AbstractBean { @@ -63,7 +63,7 @@ public class Node extends AbstractBean { /** * Returns the internal ID of the node. - * + * * @return The internal ID of the node */ String getId() { @@ -72,7 +72,7 @@ public class Node extends AbstractBean { /** * Sets the internal ID of the node. - * + * * @param id * The internal ID of the node */ @@ -86,7 +86,7 @@ public class Node extends AbstractBean { /** * Returns the user-given name of the node. - * + * * @return The name of the node */ public String getName() { @@ -95,7 +95,7 @@ public class Node extends AbstractBean { /** * Sets the user-given name of the node. - * + * * @param name * The name of the node */ @@ -107,7 +107,7 @@ public class Node extends AbstractBean { /** * Returns the hostname of the node. - * + * * @return The hostname of the node */ public String getHostname() { @@ -116,7 +116,7 @@ public class Node extends AbstractBean { /** * Sets the hostname of the node. - * + * * @param hostname * The hostname of the node */ @@ -128,7 +128,7 @@ public class Node extends AbstractBean { /** * Returns the port number of the node. - * + * * @return The port number of the node */ public int getPort() { @@ -137,7 +137,7 @@ public class Node extends AbstractBean { /** * Sets the port number of the node. - * + * * @param port * The port number of the node */ diff --git a/src/net/pterodactylus/jsite/core/NodeListener.java b/src/net/pterodactylus/jsite/core/NodeListener.java index 1198969..dda0d63 100644 --- a/src/net/pterodactylus/jsite/core/NodeListener.java +++ b/src/net/pterodactylus/jsite/core/NodeListener.java @@ -23,14 +23,14 @@ import java.util.EventListener; /** * Interface for listeners that want to be notified about node events. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface NodeListener extends EventListener { /** * Notifies a listener that a node was added. - * + * * @param node * The node that was added */ @@ -38,7 +38,7 @@ public interface NodeListener extends EventListener { /** * Notifies a listener that a node was removed. - * + * * @param node * The node that was removed */ @@ -46,7 +46,7 @@ public interface NodeListener extends EventListener { /** * Notifies a listener that a connection to the given node was established. - * + * * @param node * The node that is now connected */ @@ -54,7 +54,7 @@ public interface NodeListener extends EventListener { /** * Notifies a listener that a connection to a node has failed. - * + * * @param node * The node that could not be connected * @param cause @@ -68,7 +68,7 @@ public interface NodeListener extends EventListener { * anything else (like deregistering as listener from it) it should retrieve * the high-level client using {@link NodeManager#getHighLevelClient(Node)} * before this method returns! - * + * * @param node * The node that is now disconnected * @param throwable diff --git a/src/net/pterodactylus/jsite/core/NodeManager.java b/src/net/pterodactylus/jsite/core/NodeManager.java index 922a85a..f032570 100644 --- a/src/net/pterodactylus/jsite/core/NodeManager.java +++ b/src/net/pterodactylus/jsite/core/NodeManager.java @@ -49,7 +49,7 @@ import net.pterodactylus.util.number.Hex; /** * TODO - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class NodeManager implements Iterable, PropertyChangeListener, HighLevelClientListener { @@ -83,7 +83,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Creates a new FCP collector. - * + * * @param clientName * The name of the FCP client * @param directory @@ -100,7 +100,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Adds the given listener to the list of listeners. - * + * * @param nodeListener * The listener to add */ @@ -110,7 +110,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Removes the given listener from the list of listeners. - * + * * @param nodeListener * The listener to remove */ @@ -120,7 +120,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Notifies all listeners that a node was added. - * + * * @param node * The node that was added. */ @@ -133,7 +133,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Notifies all listeners that a node was removed. - * + * * @param node * The node that was removed */ @@ -146,7 +146,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Notifies all listeners that the given node was connected. - * + * * @param node * The node that is now connected */ @@ -159,7 +159,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Notifies all listeners that a connection to a node has failed. - * + * * @param node * The node that could not be connected * @param cause @@ -174,7 +174,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Notifies all listeners that the given node was disconnected. - * + * * @param node * The node that is now disconnected * @param throwable @@ -194,7 +194,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Returns the directory in which the nodes are stored. - * + * * @return The directory the nodes are stored in */ public String getDirectory() { @@ -203,7 +203,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Checks whether the given node is already connected. - * + * * @param node * The node to check * @return true if the node is already connected, @@ -226,7 +226,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Loads nodes. - * + * * @throws IOException * if an I/O error occurs loading the nodes */ @@ -294,7 +294,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Saves all configured nodes. - * + * * @throws IOException * if an I/O error occurs saving the nodes */ @@ -327,7 +327,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Adds the given node to this manager. - * + * * @see #connect(Node) * @param node * The node to connect to @@ -354,7 +354,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Removes the given node from the node manager, disconnecting it if it is * currently connected. - * + * * @param node * The node to remove */ @@ -376,7 +376,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Tries to establish a connection with the given node. - * + * * @param node * The node to connect to */ @@ -399,7 +399,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Disconnects the given node without removing it. - * + * * @param node * The node to disconnect */ @@ -416,7 +416,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Returns a list of all nodes. - * + * * @return A list of all nodes */ public List getNodes() { @@ -425,7 +425,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Returns the high-level client for a given node. - * + * * @param node * The node to get a high-level client for * @return The high-level client for a node, or null if the @@ -437,7 +437,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Returns the node for a high-level client. - * + * * @param highLevelClient * The high-level client to get the node for * @return The node for the high-level client, or null if the @@ -449,7 +449,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Returns the node identified by the given ID. - * + * * @param id * The ID of the node * @return The node with the given ID, or null if no such @@ -461,7 +461,7 @@ public class NodeManager implements Iterable, PropertyChangeListener, High /** * Generates a new SSK key pair. - * + * * @return An array with the private key at index 0 and the * public key at index 1 * @throws IOException diff --git a/src/net/pterodactylus/jsite/core/Project.java b/src/net/pterodactylus/jsite/core/Project.java index 9ddada5..c601d76 100644 --- a/src/net/pterodactylus/jsite/core/Project.java +++ b/src/net/pterodactylus/jsite/core/Project.java @@ -34,7 +34,7 @@ import net.pterodactylus.util.number.Hex; /** * Container for project information. A Project is capable of notifying * {@link PropertyChangeListener}s if any of the contained properties change. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Project extends AbstractBean { @@ -99,7 +99,7 @@ public class Project extends AbstractBean { /** * Clones the given project. - * + * * @param project */ Project(Project project) { @@ -113,7 +113,7 @@ public class Project extends AbstractBean { /** * Returns the internal ID. - * + * * @return The internal ID */ String getId() { @@ -122,7 +122,7 @@ public class Project extends AbstractBean { /** * Sets the internal ID. - * + * * @param id * The internal ID */ @@ -136,7 +136,7 @@ public class Project extends AbstractBean { /** * Returns the name of the project. - * + * * @return The name of the project */ public String getName() { @@ -145,7 +145,7 @@ public class Project extends AbstractBean { /** * Sets the name of the project. - * + * * @param name * The name of the project */ @@ -157,7 +157,7 @@ public class Project extends AbstractBean { /** * Returns the description of the project. - * + * * @return The description of the project */ public String getDescription() { @@ -166,7 +166,7 @@ public class Project extends AbstractBean { /** * Sets the description of the project - * + * * @param description * The description of the project */ @@ -178,7 +178,7 @@ public class Project extends AbstractBean { /** * Returns the public key of the project. - * + * * @return The public key of the project */ public String getPublicKey() { @@ -187,7 +187,7 @@ public class Project extends AbstractBean { /** * Sets the public key of the project. - * + * * @param publicKey * The public key of the project */ @@ -199,7 +199,7 @@ public class Project extends AbstractBean { /** * Returns the private key of the project. - * + * * @return The private key of the project */ public String getPrivateKey() { @@ -208,7 +208,7 @@ public class Project extends AbstractBean { /** * Sets the private key of the project. - * + * * @param privateKey * The private key of the project */ @@ -220,7 +220,7 @@ public class Project extends AbstractBean { /** * Returns the base path of the project. - * + * * @return The base path of the project */ public String getBasePath() { @@ -229,7 +229,7 @@ public class Project extends AbstractBean { /** * Sets the base path of the project. - * + * * @param basePath * The base path of the project */ @@ -241,7 +241,7 @@ public class Project extends AbstractBean { /** * Returns the default file. - * + * * @return The default file */ public String getDefaultFile() { @@ -250,7 +250,7 @@ public class Project extends AbstractBean { /** * Sets the default file. - * + * * @param defaultFile * The default file */ @@ -262,7 +262,7 @@ public class Project extends AbstractBean { /** * Adds a file override for the given file. - * + * * @param projectFile * The file * @param override @@ -274,7 +274,7 @@ public class Project extends AbstractBean { /** * Adds a file override for the given file. - * + * * @param filePath * The file path * @param override @@ -286,7 +286,7 @@ public class Project extends AbstractBean { /** * Removes the file override for the given file. - * + * * @param projectFile * The file for which to remove the override */ @@ -296,7 +296,7 @@ public class Project extends AbstractBean { /** * Removes the file override for the given file. - * + * * @param filePath * The file path for which to remove the override */ @@ -306,7 +306,7 @@ public class Project extends AbstractBean { /** * Returns the file override for the given file. - * + * * @param projectFile * The file for which to get the override * @return The file override, or null if the given file does @@ -318,7 +318,7 @@ public class Project extends AbstractBean { /** * Returns the file override for the given file. - * + * * @param filePath * The file path for which to get the override * @return The file override, or null if the given file does @@ -330,7 +330,7 @@ public class Project extends AbstractBean { /** * Returns the list of {@link FileOverride}s. - * + * * @return All file overrides */ public Map getFileOverrides() { @@ -342,7 +342,7 @@ public class Project extends AbstractBean { * base path. From this file it is possible to reach all files in the base * path. This method is disk-intensive and may take some time on larger * directories! - * + * * @return The file for the base path, or null if the base * path does not denote an existing directory */ @@ -358,7 +358,7 @@ public class Project extends AbstractBean { /** * Returns the file that is specified by its complete path. - * + * * @param completePath * The complete path of the file * @return The project file at the given path, or null if @@ -384,7 +384,7 @@ public class Project extends AbstractBean { /** * Returns the default node to insert this project to. - * + * * @return The node to insert this project to */ public Node getNode() { @@ -393,7 +393,7 @@ public class Project extends AbstractBean { /** * Sets the default node to insert this project to. - * + * * @param node * The node to insert this project to */ @@ -418,7 +418,7 @@ public class Project extends AbstractBean { /** * Scans the given directory and recreates the file and directory structure * in the given project file. - * + * * @param directory * The directory to scan * @param projectFile @@ -440,7 +440,7 @@ public class Project extends AbstractBean { /** * Implementation of a {@link ProjectFile}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class ProjectFileImpl implements ProjectFile, Comparable { @@ -465,7 +465,7 @@ public class Project extends AbstractBean { /** * Creates a new project fie. - * + * * @param parentProjectFile * The parent of the project file, or null if * the new project file does not have a parent @@ -563,7 +563,7 @@ public class Project extends AbstractBean { /** * Returns the project file with the given name. The project file has to * be a direct child of this project file. - * + * * @param name * The name of the file to get * @return The project file, or null if there is no @@ -595,7 +595,7 @@ public class Project extends AbstractBean { /** * Adds a new project file as child to this project file. - * + * * @param name * The name of the file * @param size diff --git a/src/net/pterodactylus/jsite/core/ProjectFile.java b/src/net/pterodactylus/jsite/core/ProjectFile.java index a8d021c..ca4e4a4 100644 --- a/src/net/pterodactylus/jsite/core/ProjectFile.java +++ b/src/net/pterodactylus/jsite/core/ProjectFile.java @@ -22,7 +22,6 @@ package net.pterodactylus.jsite.core; import java.io.File; import java.util.List; - /** * Abstraction for a that exists on the machine {@link Core} is being run on. * This abstraction layer exists to make it possible to run jSite as a daemon diff --git a/src/net/pterodactylus/jsite/core/ProjectLifetime.java b/src/net/pterodactylus/jsite/core/ProjectLifetime.java index abad60a..4b24aec 100644 --- a/src/net/pterodactylus/jsite/core/ProjectLifetime.java +++ b/src/net/pterodactylus/jsite/core/ProjectLifetime.java @@ -21,7 +21,7 @@ package net.pterodactylus.jsite.core; /** * Lifetime statistics of a project. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class ProjectLifetime { @@ -31,7 +31,7 @@ public class ProjectLifetime { /** * Creates new lifetime statistics. - * + * * @param creationTime * The creation time of the project */ @@ -42,7 +42,7 @@ public class ProjectLifetime { /** * Returns the creation time of the project. The time is given in * milliseconds since Jan 1, 1970 UTC. - * + * * @see System#currentTimeMillis() * @return The creation time of the project */ diff --git a/src/net/pterodactylus/jsite/core/ProjectManager.java b/src/net/pterodactylus/jsite/core/ProjectManager.java index 2619650..2e28ab9 100644 --- a/src/net/pterodactylus/jsite/core/ProjectManager.java +++ b/src/net/pterodactylus/jsite/core/ProjectManager.java @@ -41,7 +41,7 @@ import net.pterodactylus.util.logging.Logging; /** * Manages projects, taking care of persistence, lifetime statistics, and other * things. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class ProjectManager implements PropertyChangeListener { @@ -61,7 +61,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Creates a new project manager that saves and restores its state to/from * the given directory. - * + * * @param directory * The directory to save and restore states to/from */ @@ -75,7 +75,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Returns the directory the projects are loaded from and saved to. - * + * * @return The directory for storing the projects */ public String getDirectory() { @@ -84,7 +84,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Returns a list of all projects. - * + * * @return A list of all projects */ public List getProjects() { @@ -93,7 +93,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Sets the node manager to use. - * + * * @param nodeManager * The node manager to use */ @@ -107,7 +107,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Loads projects and statistics. - * + * * @throws IOException * if an I/O error occurs */ @@ -164,7 +164,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Saves projects and statistics. - * + * * @throws IOException * if an I/O error occurs */ @@ -210,7 +210,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Creates a new project. The returned {@link Project} will contain a newly * generated key pair. - * + * * @return A newly created project * @throws IOException * if an I/O error occured communicating with the node @@ -240,7 +240,7 @@ public class ProjectManager implements PropertyChangeListener { * Clones the given project and returns the clone. The clone will be * identical in all user-exposed fields, except for the project’s * {@link Project#getId ID}. - * + * * @param project * The project to clone * @return The cloned project @@ -259,7 +259,7 @@ public class ProjectManager implements PropertyChangeListener { /** * Removes the given project. - * + * * @param project * The project to remove */ diff --git a/src/net/pterodactylus/jsite/core/Request.java b/src/net/pterodactylus/jsite/core/Request.java index 2c79856..a61bb94 100644 --- a/src/net/pterodactylus/jsite/core/Request.java +++ b/src/net/pterodactylus/jsite/core/Request.java @@ -23,14 +23,14 @@ import net.pterodactylus.util.beans.AbstractBean; /** * A request is an ongoing download or upload reported by the freenet node. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Request extends AbstractBean { /** * The type of a request. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public enum Type { @@ -129,7 +129,7 @@ public class Request extends AbstractBean { /** * Creates a new request with the given identifier. - * + * * @param node * The node the request belongs to * @param identifier @@ -146,7 +146,7 @@ public class Request extends AbstractBean { /** * Returns the node the request belongs to. - * + * * @return The node the request belongs to */ public Node getNode() { @@ -155,7 +155,7 @@ public class Request extends AbstractBean { /** * Returns the identifier of the request. It is unique per node. - * + * * @return The identifier of the request */ public String getIdentifier() { @@ -164,7 +164,7 @@ public class Request extends AbstractBean { /** * Returns the type of the request. - * + * * @return The type of the request */ @@ -174,7 +174,7 @@ public class Request extends AbstractBean { /** * Sets the type of the request. - * + * * @param type * The type of the request */ @@ -186,7 +186,7 @@ public class Request extends AbstractBean { /** * Returns the client token of the request. - * + * * @return The client token of the request */ public String getClientToken() { @@ -195,7 +195,7 @@ public class Request extends AbstractBean { /** * Sets the client token of the request. - * + * * @param clientToken * The client token of the request */ @@ -207,7 +207,7 @@ public class Request extends AbstractBean { /** * Returns whether the request has finished. - * + * * @see #isSuccessful() * @return true if the request is finished, * false otherwise @@ -218,7 +218,7 @@ public class Request extends AbstractBean { /** * Sets whether the request has finished. - * + * * @param finished * true if the request has finished, * false otherwise @@ -232,7 +232,7 @@ public class Request extends AbstractBean { /** * Returns whether the request finished successfully. This value will only * have meaning if {@link #isFinished()} returns true. - * + * * @return true if the request finished successfully, * false otherwise */ @@ -242,7 +242,7 @@ public class Request extends AbstractBean { /** * Sets whether this request finished successfully. - * + * * @param successful * true if the request finished successfully, * false otherwise @@ -256,7 +256,7 @@ public class Request extends AbstractBean { /** * Returns whether the data inserted by this {@link Type#put} or * {@link Type#putDir} request is already fetchable by other clients. - * + * * @return true if the data is already fetchable, * false otherwise */ @@ -267,7 +267,7 @@ public class Request extends AbstractBean { /** * Sets whether the data inserted by this {@link Type#put} or * {@link Type#putDir} request is already fetchable by other clients. - * + * * @param fetchable * true if the data is already fetchable, * false otherwise @@ -280,7 +280,7 @@ public class Request extends AbstractBean { /** * Returns the URI generated by this request. - * + * * @return The generated URI */ public String getURI() { @@ -289,7 +289,7 @@ public class Request extends AbstractBean { /** * Sets the URI generated by this request. - * + * * @param uri * The generated URI */ @@ -301,7 +301,7 @@ public class Request extends AbstractBean { * Returns the total number of blocks of a request. Until * {@link #isTotalFinalized()} returns true this value may * change! - * + * * @return The total number of blocks of a request */ public int getTotalBlocks() { @@ -310,7 +310,7 @@ public class Request extends AbstractBean { /** * Sets the total number of blocks of a request. - * + * * @param totalBlocks * The total number of blocks */ diff --git a/src/net/pterodactylus/jsite/core/RequestListener.java b/src/net/pterodactylus/jsite/core/RequestListener.java index 5ebdc09..d8f874e 100644 --- a/src/net/pterodactylus/jsite/core/RequestListener.java +++ b/src/net/pterodactylus/jsite/core/RequestListener.java @@ -23,14 +23,14 @@ import java.util.EventListener; /** * Interface for objects that want to be notified on request events. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface RequestListener extends EventListener { /** * Notifies a listener that a request was added to a node. - * + * * @param request * The request that was added */ @@ -38,7 +38,7 @@ public interface RequestListener extends EventListener { /** * Notifies a listener that a request made progress. - * + * * @param request * The request */ @@ -46,7 +46,7 @@ public interface RequestListener extends EventListener { /** * Notifies a listener that a request was removed. - * + * * @param request * The request that was removed */ @@ -54,7 +54,7 @@ public interface RequestListener extends EventListener { /** * Notifies a listener that a Put request has generated a URI. - * + * * @param request * The request that generated a URI * @param uri @@ -64,7 +64,7 @@ public interface RequestListener extends EventListener { /** * Notifies a listener that a request has completed. - * + * * @param request * The finished request */ diff --git a/src/net/pterodactylus/jsite/core/RequestManager.java b/src/net/pterodactylus/jsite/core/RequestManager.java index b101bf7..b6da95b 100644 --- a/src/net/pterodactylus/jsite/core/RequestManager.java +++ b/src/net/pterodactylus/jsite/core/RequestManager.java @@ -47,7 +47,7 @@ import net.pterodactylus.util.logging.Logging; * The request manager is added to the {@link NodeManager} as a * {@link NodeListener} so that it can fire request-removed events in case a * node is disconnected. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class RequestManager implements NodeListener, HighLevelProgressListener { @@ -71,7 +71,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { /** * Adds a request listener. - * + * * @param requestListener * The request listener to add */ @@ -81,7 +81,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { /** * Removes a request listener. - * + * * @param requestListener * The request listener to remove */ @@ -91,56 +91,56 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { /** * Notifies all listeners that a request was added. - * + * * @param request * The request that was added */ private void fireRequestAdded(Request request) { - for (RequestListener requestListener: requestListeners) { + for (RequestListener requestListener : requestListeners) { requestListener.requestAdded(request); } } /** * Notifies all listeners that a request progressed. - * + * * @param request * The request */ private void fireRequestProgressed(Request request) { - for (RequestListener requestListener: requestListeners) { + for (RequestListener requestListener : requestListeners) { requestListener.requestProgressed(request); } } /** * Notifies all listeners that a request was removed. - * + * * @param request * The request that was removed */ private void fireRequestRemoved(Request request) { - for (RequestListener requestListener: requestListeners) { + for (RequestListener requestListener : requestListeners) { requestListener.requestRemoved(request); } } /** * Notifies all listeners that a request has finished. - * + * * @see RequestListener#requestFinished(Request) * @param request * The request that has finished */ private void fireRequestFinished(Request request) { - for (RequestListener requestListener: requestListeners) { + for (RequestListener requestListener : requestListeners) { requestListener.requestFinished(request); } } /** * Notifies all listeners that a request has generated a URI. - * + * * @see RequestListener#requestGeneratedURI(Request, String) * @param request * The request that has generated a URI @@ -148,7 +148,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { * The generated URI */ private void fireRequestGeneratedURI(Request request, String uri) { - for (RequestListener requestListener: requestListeners) { + for (RequestListener requestListener : requestListeners) { requestListener.requestGeneratedURI(request, uri); } } @@ -159,7 +159,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { /** * Sets the node manager to use. - * + * * @param nodeManager * The node manager */ @@ -178,7 +178,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { /** * Requests a list of all running requests from a node. This method will * block until the request has been sent! - * + * * @param node * The node to get all requests for * @throws IOException @@ -208,7 +208,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { logger.log(Level.SEVERE, "getResult() blocked and was interrupted"); return; } - for (RequestResult requestResult: requestListResult) { + for (RequestResult requestResult : requestListResult) { String identifier = requestResult.getIdentifier(); logger.log(Level.FINER, "got identifier: " + identifier); Request request = identifierRequests.get(identifier); @@ -302,7 +302,7 @@ public class RequestManager implements NodeListener, HighLevelProgressListener { logger.warning("got node without request map: " + node); return; } - for (Request request: identifierRequests.values()) { + for (Request request : identifierRequests.values()) { fireRequestRemoved(request); } identifierRequests.clear(); diff --git a/src/net/pterodactylus/jsite/core/Verifier.java b/src/net/pterodactylus/jsite/core/Verifier.java index fc1b32d..7f206a5 100644 --- a/src/net/pterodactylus/jsite/core/Verifier.java +++ b/src/net/pterodactylus/jsite/core/Verifier.java @@ -24,14 +24,14 @@ import java.net.UnknownHostException; /** * Contains verifier for various settings. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Verifier { /** * Checks whether the given name is a valid node name. - * + * * @param name * The name to verify * @return true if the name is okay, false if @@ -43,7 +43,7 @@ public class Verifier { /** * Verifies the given hostname by trying to resolve it. - * + * * @param hostname * The hostname to verify * @return true if the hostname is not empty and can be @@ -64,7 +64,7 @@ public class Verifier { /** * Verifies that the port number is numeric and in the range from * 0 to 65535. - * + * * @param portString * The port number string * @return true if the port number is okay, diff --git a/src/net/pterodactylus/jsite/gui/AboutDialog.java b/src/net/pterodactylus/jsite/gui/AboutDialog.java index 26b9705..8f79a52 100644 --- a/src/net/pterodactylus/jsite/gui/AboutDialog.java +++ b/src/net/pterodactylus/jsite/gui/AboutDialog.java @@ -53,7 +53,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * An “about” dialog. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class AboutDialog extends JDialog implements I18nable { @@ -92,7 +92,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates a new “about” dialog. - * + * * @param swingInterface * The Swing interface */ @@ -148,7 +148,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates the “about” page. - * + * * @return The “about” page */ private JComponent createAboutPage() { @@ -170,7 +170,7 @@ public class AboutDialog extends JDialog implements I18nable { textPanel.add(Box.createVerticalStrut(12)); contributorsLabel.setFont(contributorsLabel.getFont().deriveFont(Font.BOLD)); - for (Contributor contributor: CONTRIBUTORS) { + for (Contributor contributor : CONTRIBUTORS) { JLabel contributorLabel = new JLabel(contributor.getName() + " <" + contributor.getEmail() + "> (" + contributor.getPart() + ")"); textPanel.add(contributorLabel); } @@ -190,7 +190,7 @@ public class AboutDialog extends JDialog implements I18nable { textPanel.add(codeUsageLabel); textPanel.add(Box.createVerticalStrut(12)); - for (CodeUsage codeUsage: CODE_USAGES) { + for (CodeUsage codeUsage : CODE_USAGES) { JLabel usageLabel = new JLabel(codeUsage.getName() + " (" + codeUsage.getURL() + ", " + codeUsage.getLicense() + ")"); textPanel.add(usageLabel); } @@ -200,7 +200,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates the “license” page. - * + * * @return The “license” page */ private JComponent createLicensePage() { @@ -225,7 +225,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Loads the license text. - * + * * @return The license text */ private String loadLicenseText() { @@ -283,7 +283,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Container for a contributor. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class Contributor { @@ -299,7 +299,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates a new contributor. - * + * * @param name * The name of the contributor * @param email @@ -315,7 +315,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the name of the contributor. - * + * * @return The name of the contributor */ String getName() { @@ -324,7 +324,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the email address of the contributor. - * + * * @return The email address of the contributor */ String getEmail() { @@ -333,7 +333,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the parts where the contributor helped. - * + * * @return The parts where the contributor helped */ String getPart() { @@ -345,7 +345,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * A code usage object describes code or other resources that have been * taken from other projects. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class CodeUsage { @@ -364,7 +364,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Creates a new code usage object. - * + * * @param name * The name of the project * @param url @@ -383,7 +383,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the name of the project. - * + * * @return The name of the project */ public String getName() { @@ -392,7 +392,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the URL of the project. - * + * * @return The URL of the project */ public String getURL() { @@ -401,7 +401,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the license of the used part. - * + * * @return The license of the used part */ public String getLicense() { @@ -410,7 +410,7 @@ public class AboutDialog extends JDialog implements I18nable { /** * Returns the used part. - * + * * @return The used part */ public String getPart() { diff --git a/src/net/pterodactylus/jsite/gui/AddNodeDialog.java b/src/net/pterodactylus/jsite/gui/AddNodeDialog.java index cb85b24..0a67837 100644 --- a/src/net/pterodactylus/jsite/gui/AddNodeDialog.java +++ b/src/net/pterodactylus/jsite/gui/AddNodeDialog.java @@ -45,7 +45,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * Dialog that lets the user edit the properties of a node. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class AddNodeDialog extends JDialog implements I18nable { @@ -88,7 +88,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Creates a new node edit dialog with the given parent. - * + * * @param parentFrame * The parent frame of this dialog */ @@ -108,7 +108,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Returns the user-given name of the node. - * + * * @return The user-given name of the node */ public String getNodeName() { @@ -117,7 +117,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Sets the user-given name of the node. - * + * * @param name * The name of the node */ @@ -128,7 +128,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Returns the hostname of the node. - * + * * @return The hostname of the node */ public String getNodeHostname() { @@ -137,7 +137,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Sets the hostname of the node. - * + * * @param hostname * The hostname of the node */ @@ -148,7 +148,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Returns the FCP port number of the node. - * + * * @return The FCP port number of the node */ public int getNodePort() { @@ -157,7 +157,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Sets the FCP port number of the node. - * + * * @param port * The FCP port number of the node */ @@ -168,7 +168,7 @@ public class AddNodeDialog extends JDialog implements I18nable { /** * Returns whether the dialog was cancelled. - * + * * @return true if the dialog was cancelled, * false if the user clicked “okay” */ diff --git a/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java b/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java index a8d212c..92c547a 100644 --- a/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java +++ b/src/net/pterodactylus/jsite/gui/ConfigurationDialog.java @@ -38,7 +38,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * The configuration dialog. - * + * * @author David Roden */ public class ConfigurationDialog extends JDialog implements I18nable { @@ -102,7 +102,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Creates a new configuration dialog. - * + * * @param swingInterface * The Swing interface */ @@ -122,7 +122,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Returns whether the dialog was cancelled or confirmed. If the dialog was * cancelled, no further processing should be done. - * + * * @return true if the dialog was cancelled, * false otherwise */ @@ -132,7 +132,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Returns whether the advanced mode is selected. - * + * * @return true if the advanced mode is selected, * false otherwise */ @@ -142,7 +142,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Sets whether the advanced mode is selected. - * + * * @param advancedMode * true if the advanced mode is selected, * false otherwise @@ -155,7 +155,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { * Returns whether the “beautify” checkbox has been selected. The result of * this method should not be used if {@link #wasCancelled()} returned * true! - * + * * @return true if the checkbox was selected, * false otherwise */ @@ -165,7 +165,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Sets the state of the “antialias” checkbox. - * + * * @param antialias * The state of the checkbox */ @@ -175,7 +175,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Returns the font for the controls. - * + * * @return The control font, or null if no custom control * font is to be used */ @@ -185,7 +185,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Sets the font for the controls. - * + * * @param controlFont * The control font, or null if no custom control * font is to be used @@ -207,7 +207,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Returns the font for user input. - * + * * @return The font for user input, or null if no custom user * input font is to be used */ @@ -217,7 +217,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Sets the font for user input. - * + * * @param userFont * The font for user input, or null if no custom * user input font is to be used @@ -240,7 +240,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Returns the class name of the selected look and feel, if a custom look * and feel is selected. - * + * * @return The class name of the look and feel to load, or null * if no special look and feel should be used */ @@ -253,7 +253,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Sets the given look and feel. - * + * * @param lookAndFeel * The class name of the look and feel, or null to * not select a custom look and feel @@ -386,7 +386,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Creates the interface configuration panel. - * + * * @return The interface configuration panel */ private JComponent createInterfaceConfig() { @@ -402,7 +402,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Creates the panel for the interface tweaks configuration. - * + * * @return The interface tweaks configuration panel */ private JComponent createInterfaceTweaksConfig() { @@ -438,7 +438,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { LookAndFeelInfo[] lookAndFeelInfos = UIManager.getInstalledLookAndFeels(); List lookAndFeelWrappers = new ArrayList(); - for (LookAndFeelInfo lookAndFeelInfo: lookAndFeelInfos) { + for (LookAndFeelInfo lookAndFeelInfo : lookAndFeelInfos) { lookAndFeelWrappers.add(new LookAndFeelWrapper(lookAndFeelInfo.getClassName(), lookAndFeelInfo.getName())); } customLAFComboBox = new JComboBox(lookAndFeelWrappers.toArray(new LookAndFeelWrapper[0])); @@ -502,7 +502,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Wrapper around class name and name of a {@link LookAndFeel}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class LookAndFeelWrapper { @@ -516,7 +516,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Creates a new wrapper around the given class name and name of a look * and feel. - * + * * @param className * The class name of the look and feel * @param lookAndFeelName @@ -529,7 +529,7 @@ public class ConfigurationDialog extends JDialog implements I18nable { /** * Returns the class name of the look and feel. - * + * * @return The class name of the look and feel */ public String getClassName() { diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index 766677f..f84d5b7 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -84,7 +84,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * Manages physical and virtual files in a project. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class FileManager extends JDialog implements I18nable, TreeSelectionListener, MouseListener { @@ -202,7 +202,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Creates a new file manager. - * + * * @param swingInterface * The Swing interface * @param project @@ -469,7 +469,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Creates the main panel with the file tree and the file properties. - * + * * @return The mail panel */ private Component createFileManagerPanel() { @@ -573,7 +573,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Creates the button panel. - * + * * @return The button panel */ private Component createButtonPanel() { @@ -615,7 +615,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Checks whether the given mouse event is a popup trigger and occured over * a file. If so, the context menu is shown. - * + * * @param mouseEvent * The mouse event to check */ @@ -645,7 +645,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Finds whether the {@link ProjectFile} given by * projectFileWrapper is hidden. - * + * * @param projectFileWrapper * The wrapped project file * @return true if the file is hidden and should not be @@ -731,7 +731,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Returns all currently selected {@link ProjectFileWrapper}s. - * + * * @param filesOnly * true to return only selected files, * false to include directories @@ -755,7 +755,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Sets the given action’s enabled state to the given enabled state if the * action’s current enabled state is not the given enabled state. - * + * * @param action * The action to set the enabled state on * @param enabled @@ -770,7 +770,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Sets the given button’s selected state to the given selected state if the * button’s current selected state is not the given selected state. - * + * * @param button * The button to set the selected state on * @param selected @@ -786,7 +786,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe * Returns the extension of the given filename. If the file name does not * have an extension, the name of the file (without any path components) is * returned. - * + * * @param fileName * The name of the file * @return The extension of the file @@ -799,7 +799,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Repopulates the content type combo box with all content types, putting * the most probably ones to the front of the list. - * + * * @param fileName * The name of the file */ @@ -945,7 +945,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Tree cell renderer that takes care of certain display properties for * project-specific stuff. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private class FileCellRenderer extends DefaultTreeCellRenderer { @@ -1014,7 +1014,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * TreeModel that is based on {@link Project#getBaseFile()}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private class ProjectFileTreeModel implements TreeModel, PropertyChangeListener { @@ -1058,7 +1058,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Notifies all listeners that a node has changed. - * + * * @param changedProjectFileWrapper * The wrapper around the changed project file */ @@ -1080,7 +1080,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Notifies all listeners that the tree structure has changed * significantly. - * + * * @see TreeModelListener#treeStructureChanged(TreeModelEvent) * @param newRootNode */ @@ -1096,7 +1096,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Sets the new base project file. This causes the model to reload. - * + * * @param baseProjectFile * The new base project file */ @@ -1117,7 +1117,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Creates {@link ProjectFileWrapper}s for all files below the given * project file. - * + * * @param projectFile * The base project file for all project files to create * wrappers for @@ -1245,7 +1245,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Wrapper around a {@link ProjectFile} that overwrites * {@link Object#toString()} to return the project file’s name. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class ProjectFileWrapper { @@ -1258,7 +1258,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Creates a new wrapper around a project file. - * + * * @param projectFile * The project file to wrap */ @@ -1268,7 +1268,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Returns the wrapped project file. - * + * * @return The wrapped project file */ public ProjectFile getProjectFile() { @@ -1278,7 +1278,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * Sets the name override. If the name override is not null * it will be shown insted of the project file’s name. - * + * * @param nameOverride * The name override */ @@ -1299,7 +1299,7 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe /** * A cell renderer for combo boxes that converts the string “--” to a * separator. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private class MimeTypeComboBoxRenderer extends DefaultListCellRenderer { diff --git a/src/net/pterodactylus/jsite/gui/FixedJMenuItem.java b/src/net/pterodactylus/jsite/gui/FixedJMenuItem.java index 92cafb4..c7a7b03 100644 --- a/src/net/pterodactylus/jsite/gui/FixedJMenuItem.java +++ b/src/net/pterodactylus/jsite/gui/FixedJMenuItem.java @@ -32,14 +32,14 @@ import javax.swing.KeyStroke; * upen is changed this change is not picked up (see bug * #4304129). - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class FixedJMenuItem extends JMenuItem { /** * Creates a new fixed menu item. - * + * * @param action * The action of the menu item */ diff --git a/src/net/pterodactylus/jsite/gui/FontComboBox.java b/src/net/pterodactylus/jsite/gui/FontComboBox.java index 12805fc..7870a30 100644 --- a/src/net/pterodactylus/jsite/gui/FontComboBox.java +++ b/src/net/pterodactylus/jsite/gui/FontComboBox.java @@ -32,7 +32,7 @@ import javax.swing.ListCellRenderer; /** * Combobox that displays a list of all available fonts, showing the name of the * font in the font itself. - * + * * @see GraphicsEnvironment#getAllFonts() * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ @@ -46,7 +46,7 @@ public class FontComboBox extends JComboBox { System.out.println("got " + allFonts.length + " fonts"); fontNames = new String[allFonts.length]; int fontIndex = 0; - for (Font font: allFonts) { + for (Font font : allFonts) { fontNames[fontIndex++] = font.getName(); } } @@ -62,7 +62,7 @@ public class FontComboBox extends JComboBox { /** * The cell renderer for the font name cells. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class FontCellRenderer extends JLabel implements ListCellRenderer { diff --git a/src/net/pterodactylus/jsite/gui/LogWindow.java b/src/net/pterodactylus/jsite/gui/LogWindow.java index 23660d7..a94da05 100644 --- a/src/net/pterodactylus/jsite/gui/LogWindow.java +++ b/src/net/pterodactylus/jsite/gui/LogWindow.java @@ -51,7 +51,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * Frame that shows log messages as they occur. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class LogWindow extends JFrame implements LoggingListener, ActionListener { @@ -152,7 +152,7 @@ public class LogWindow extends JFrame implements LoggingListener, ActionListener /** * Table model for the log message table. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private class LogRecordTableModel extends AbstractTableModel { @@ -175,7 +175,7 @@ public class LogWindow extends JFrame implements LoggingListener, ActionListener /** * Adds a log record. - * + * * @param logRecord * The log record to add */ diff --git a/src/net/pterodactylus/jsite/gui/MainWindow.java b/src/net/pterodactylus/jsite/gui/MainWindow.java index 2e2e082..da516c3 100644 --- a/src/net/pterodactylus/jsite/gui/MainWindow.java +++ b/src/net/pterodactylus/jsite/gui/MainWindow.java @@ -64,7 +64,7 @@ import net.pterodactylus.util.swing.SwingUtils; /** * Defines the main window of the application. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class MainWindow extends JFrame implements WindowListener, I18nable, PropertyChangeListener { @@ -127,7 +127,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Creates a new main window that redirects all actions to the given swing * interface. - * + * * @param swingInterface * The swing interface to receive all actions */ @@ -149,7 +149,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Sets the text of the status bar. - * + * * @param text * The text of the status bar */ @@ -174,7 +174,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Returns the status bar clear delay (in milliseconds). - * + * * @return The status bar clear delay */ public int getStatusBarClearDelay() { @@ -183,7 +183,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Sets the status bar clear delay (in milliseconds). - * + * * @param statusBarClearDelay * The status bar clear delay */ @@ -193,7 +193,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Sets whether the advanced mode is activated. - * + * * @param advancedMode * true if the advanced mode is activated, * false if the simple mode is activated @@ -212,7 +212,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Returns the currently selected project. - * + * * @return The currently selected project */ public Project getSelectedProject() { @@ -221,7 +221,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Sets the given node to the “online” state. - * + * * @param node * The node to set online */ @@ -231,7 +231,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Sets the given node to the “offline” state in the status bar. - * + * * @param node * The node to set offline */ @@ -241,7 +241,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Sets the given node to the “error” state in the status bar. - * + * * @param node * The node to set the error state for */ @@ -255,7 +255,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Adds a node to the menu. - * + * * @param node * The node to add */ @@ -283,7 +283,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Removes a node from the menu. - * + * * @param node * The node to remove */ @@ -302,7 +302,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Adds a project to the project pane. - * + * * @param project * The project to add * @param switchToProject @@ -326,7 +326,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Removes the pane containing the given project. - * + * * @param project * The project whose pane to remove */ @@ -388,7 +388,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop /** * Returns the index of the project panel that contains the given project. - * + * * @param project * The wanted project * @return The index of {@link #projectPane}’s tab that contains the given diff --git a/src/net/pterodactylus/jsite/gui/NodeLabel.java b/src/net/pterodactylus/jsite/gui/NodeLabel.java index 8d3d098..1d382fb 100644 --- a/src/net/pterodactylus/jsite/gui/NodeLabel.java +++ b/src/net/pterodactylus/jsite/gui/NodeLabel.java @@ -42,7 +42,7 @@ import net.pterodactylus.jsite.i18n.gui.I18nLabel; * A node label is a small component that sits in the status bar, displays the * current status of a node and offers a context menu to connect and disconnect * from the node. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class NodeLabel extends JLabel implements PropertyChangeListener, MouseListener, I18nable { @@ -70,7 +70,7 @@ public class NodeLabel extends JLabel implements PropertyChangeListener, MouseLi /** * Creates a new node label. - * + * * @param swingInterface * The Swing interface * @param node @@ -145,7 +145,7 @@ public class NodeLabel extends JLabel implements PropertyChangeListener, MouseLi /** * Checks whether the given mouse event is a trigger for popup menues and * shows the popup menu if it is. - * + * * @param mouseEvent * The mouse event to check for being a popup trigger */ diff --git a/src/net/pterodactylus/jsite/gui/ProjectPanel.java b/src/net/pterodactylus/jsite/gui/ProjectPanel.java index 2dd1031..b046a7c 100644 --- a/src/net/pterodactylus/jsite/gui/ProjectPanel.java +++ b/src/net/pterodactylus/jsite/gui/ProjectPanel.java @@ -55,7 +55,7 @@ import net.pterodactylus.util.logging.Logging; /** * A panel that contains all information about a project and lets the user edit * the properties of the project. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { @@ -105,7 +105,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Creates a new project panel. - * + * * @param swingInterface * The Swing interface * @param project @@ -126,7 +126,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Returns the project that is displayed in this panel. - * + * * @return The project of this panel */ public Project getProject() { @@ -139,7 +139,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Adds the given node to the node combo boxes in all {@link ProjectPanel}s. - * + * * @param node * The node to add */ @@ -150,7 +150,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Removes the given node from the node combo boxes in all * {@link ProjectPanel}s. - * + * * @param node * The node to remove */ @@ -214,7 +214,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Creates the properties panel. - * + * * @return The properties panel */ private JPanel createPropertiesPanel() { @@ -261,7 +261,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Creates the button panel. - * + * * @return The button panel */ private JPanel createButtonPanel() { @@ -276,7 +276,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Updates the project from changes in the text fields. - * + * * @param document * The document that was changed */ @@ -358,7 +358,7 @@ public class ProjectPanel extends JPanel implements DocumentListener, I18nable { /** * Cell cenderer for the node combo box. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class NodeComboBoxCellRenderer extends DefaultListCellRenderer { diff --git a/src/net/pterodactylus/jsite/gui/SwingInterface.java b/src/net/pterodactylus/jsite/gui/SwingInterface.java index 92b6dc2..397688a 100644 --- a/src/net/pterodactylus/jsite/gui/SwingInterface.java +++ b/src/net/pterodactylus/jsite/gui/SwingInterface.java @@ -546,7 +546,7 @@ public class SwingInterface implements CoreListener, LoggingListener, PropertyCh } }; List availableLanguages = I18n.findAvailableLanguages(); - for (final Locale locale: availableLanguages) { + for (final Locale locale : availableLanguages) { String language = locale.getLanguage(); I18nAction languageAction = new I18nAction("general.language." + language, IconLoader.loadIcon("/flag-" + language + ".png")) { @@ -744,7 +744,7 @@ public class SwingInterface implements CoreListener, LoggingListener, PropertyCh * The action that triggered the change */ private void changeLanguage(Locale newLocale, I18nAction languageAction) { - for (I18nAction i18nAction: languageActions) { + for (I18nAction i18nAction : languageActions) { i18nAction.setEnabled(i18nAction != languageAction); } I18n.setLocale(newLocale); @@ -804,7 +804,7 @@ public class SwingInterface implements CoreListener, LoggingListener, PropertyCh */ public void loadingProjectsDone(String directory) { mainWindow.setStatusBarText(I18n.get("mainWindow.statusBar.projectLoadingDone")); - for (Project project: core.getProjects()) { + for (Project project : core.getProjects()) { projectAdded(project, false); } } diff --git a/src/net/pterodactylus/jsite/i18n/I18n.java b/src/net/pterodactylus/jsite/i18n/I18n.java index 8223a0b..4647ddc 100644 --- a/src/net/pterodactylus/jsite/i18n/I18n.java +++ b/src/net/pterodactylus/jsite/i18n/I18n.java @@ -41,7 +41,7 @@ import net.pterodactylus.util.logging.Logging; /** * Class that handles i18n. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class I18n { @@ -78,7 +78,7 @@ public class I18n { /** * Returns the translated value for a key. The translated values may contain * placeholders that are replaced with the given parameters. - * + * * @see MessageFormat * @param key * The key to get @@ -106,7 +106,7 @@ public class I18n { * Returns the keycode from the value of the given key. You can specify the * constants in {@link KeyEvent} in the properties file, e.g. VK_S for the * keycode ‘s’ when used for mnemonics. - * + * * @param key * The key under which the keycode is stored * @return The keycode @@ -133,7 +133,7 @@ public class I18n { /** * Returns a key stroke for use with swing accelerators. - * + * * @param key * The key of the key stroke * @return The key stroke, or null if no key stroke could be @@ -180,7 +180,7 @@ public class I18n { /** * Sets the current locale. - * + * * @param newLocale * The new locale to use */ @@ -190,7 +190,7 @@ public class I18n { /** * Sets the current locale. - * + * * @param newLocale * The new locale to use * @param notify @@ -226,7 +226,7 @@ public class I18n { /** * Returns the current locale. - * + * * @return The current locale */ public static Locale getLocale() { @@ -235,7 +235,7 @@ public class I18n { /** * Finds all available locales. - * + * * @return All available locales */ public static List findAvailableLanguages() { @@ -247,7 +247,7 @@ public class I18n { /** * Registers the given I18nable to be updated when the language is changed. - * + * * @param i18nable * The i18nable to register */ @@ -258,7 +258,7 @@ public class I18n { /** * Deregisters the given I18nable to be updated when the language is * changed. - * + * * @param i18nable * The i18nable to register */ @@ -274,7 +274,7 @@ public class I18n { * Notifies all registered {@link I18nable}s that the language was changed. */ private static void notifyI18nables() { - for (I18nable i18nable: i18nables) { + for (I18nable i18nable : i18nables) { i18nable.updateI18n(); } } diff --git a/src/net/pterodactylus/jsite/i18n/I18nable.java b/src/net/pterodactylus/jsite/i18n/I18nable.java index efb3f6b..71c7a5f 100644 --- a/src/net/pterodactylus/jsite/i18n/I18nable.java +++ b/src/net/pterodactylus/jsite/i18n/I18nable.java @@ -21,7 +21,7 @@ package net.pterodactylus.jsite.i18n; /** * Interface for objects that want to be notified when the language is changed. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface I18nable { diff --git a/src/net/pterodactylus/jsite/i18n/gui/I18nAction.java b/src/net/pterodactylus/jsite/i18n/gui/I18nAction.java index 8904368..502ba69 100644 --- a/src/net/pterodactylus/jsite/i18n/gui/I18nAction.java +++ b/src/net/pterodactylus/jsite/i18n/gui/I18nAction.java @@ -10,7 +10,7 @@ import net.pterodactylus.jsite.i18n.I18nable; /** * Helper class that initializes actions with values from {@link I18n}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public abstract class I18nAction extends AbstractAction implements I18nable { @@ -21,7 +21,7 @@ public abstract class I18nAction extends AbstractAction implements I18nable { /** * Creates a new action that uses the given name as base name to get values * from {@link I18n}. - * + * * @param i18nName * The base name of the action */ @@ -32,7 +32,7 @@ public abstract class I18nAction extends AbstractAction implements I18nable { /** * Creates a new action that uses the given name as base name to get values * from {@link I18n} and the given icon. - * + * * @param i18nName * The base name of the action * @param icon @@ -45,7 +45,7 @@ public abstract class I18nAction extends AbstractAction implements I18nable { /** * Creates a new action that uses the given name as base name to get values * from {@link I18n}. - * + * * @param i18nName * The base name of the action * @param enabled @@ -58,7 +58,7 @@ public abstract class I18nAction extends AbstractAction implements I18nable { /** * Creates a new action that uses the given name as base name to get values * from {@link I18n} and the given icon. - * + * * @param i18nName * The base name of the action * @param enabled diff --git a/src/net/pterodactylus/jsite/i18n/gui/I18nLabel.java b/src/net/pterodactylus/jsite/i18n/gui/I18nLabel.java index e7c772b..10dbfac 100644 --- a/src/net/pterodactylus/jsite/i18n/gui/I18nLabel.java +++ b/src/net/pterodactylus/jsite/i18n/gui/I18nLabel.java @@ -28,7 +28,7 @@ import net.pterodactylus.jsite.i18n.I18nable; /** * Label that can update itself from {@link I18n}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class I18nLabel extends JLabel implements I18nable { @@ -41,7 +41,7 @@ public class I18nLabel extends JLabel implements I18nable { /** * Creates a new label with the given I18n basename. - * + * * @param i18nBasename * The I18n basename of the label */ @@ -52,7 +52,7 @@ public class I18nLabel extends JLabel implements I18nable { /** * Creates a new label with the given I18n basename that optionally is a * label for the given component. - * + * * @param i18nBasename * The I18n basename of the label * @param component @@ -67,7 +67,7 @@ public class I18nLabel extends JLabel implements I18nable { /** * Creates a new label with the given I18n basename that optionally is a * label for the given component. - * + * * @param i18nBasename * The I18n basename of the label * @param arguments @@ -81,7 +81,7 @@ public class I18nLabel extends JLabel implements I18nable { /** * Creates a new label with the given I18n basename that optionally is a * label for the given component. - * + * * @param i18nBasename * The I18n basename of the label * @param component diff --git a/src/net/pterodactylus/jsite/i18n/gui/I18nMenu.java b/src/net/pterodactylus/jsite/i18n/gui/I18nMenu.java index 49a25cb..2f54b5f 100644 --- a/src/net/pterodactylus/jsite/i18n/gui/I18nMenu.java +++ b/src/net/pterodactylus/jsite/i18n/gui/I18nMenu.java @@ -26,7 +26,7 @@ import net.pterodactylus.jsite.i18n.I18nable; /** * Menu that receives its properties from {@link I18n}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class I18nMenu extends JMenu implements I18nable { @@ -36,7 +36,7 @@ public class I18nMenu extends JMenu implements I18nable { /** * Creates a new menu with the given {@link I18n} basename. - * + * * @param i18nBasename * The basename of the {@link I18n} properties */ diff --git a/src/net/pterodactylus/jsite/i18n/gui/package-info.java b/src/net/pterodactylus/jsite/i18n/gui/package-info.java index 59f116b..eaa4325 100644 --- a/src/net/pterodactylus/jsite/i18n/gui/package-info.java +++ b/src/net/pterodactylus/jsite/i18n/gui/package-info.java @@ -19,7 +19,7 @@ /** * Contains various i18n-related Swing helper classes. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ diff --git a/src/net/pterodactylus/jsite/main/Main.java b/src/net/pterodactylus/jsite/main/Main.java index f2fa92b..0906ccd 100644 --- a/src/net/pterodactylus/jsite/main/Main.java +++ b/src/net/pterodactylus/jsite/main/Main.java @@ -36,14 +36,14 @@ import net.pterodactylus.util.logging.Logging; /** * Main class that is called by the VM. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Main { /** * Main entry method for the VM. - * + * * @param args * The command-line arguments */ @@ -85,7 +85,7 @@ public class Main { /** * Tries to load the class with the given name and includes the look & feel * in the UIManager, if it exists. - * + * * @param name * The name of the look & feel * @param className @@ -99,14 +99,14 @@ public class Main { /** * Tries to load each look & feel and adds it to the list of installed look & * feels. - * + * * @see UIManager#setInstalledLookAndFeels(LookAndFeelInfo[]) * @param lookAndFeelInfos * The look & feels to add */ private void addLookAndFeels(LookAndFeelInfo... lookAndFeelInfos) { List allLookAndFeelInfos = new ArrayList(Arrays.asList(UIManager.getInstalledLookAndFeels())); - for (LookAndFeelInfo lookAndFeelInfo: lookAndFeelInfos) { + for (LookAndFeelInfo lookAndFeelInfo : lookAndFeelInfos) { try { Class.forName(lookAndFeelInfo.getClassName()); allLookAndFeelInfos.add(lookAndFeelInfo); diff --git a/src/net/pterodactylus/jsite/main/Version.java b/src/net/pterodactylus/jsite/main/Version.java index adc8b86..c405b7a 100644 --- a/src/net/pterodactylus/jsite/main/Version.java +++ b/src/net/pterodactylus/jsite/main/Version.java @@ -21,7 +21,7 @@ package net.pterodactylus.jsite.main; /** * Container for version information. - * + * * @author David Roden <bombe@freenetproject.org> */ public class Version implements Comparable { @@ -41,7 +41,7 @@ public class Version implements Comparable { /** * Creates a new version with the given major level and minor and patch * levels set to 0. - * + * * @param major * The major level of the version */ @@ -52,7 +52,7 @@ public class Version implements Comparable { /** * Creates a new version with the given major and minor level and the patch * level set to 0. - * + * * @param major * The major level of the version * @param minor @@ -64,7 +64,7 @@ public class Version implements Comparable { /** * Creates a new version with the given major, minor, and patch level. - * + * * @param major * The major level of the version * @param minor @@ -80,7 +80,7 @@ public class Version implements Comparable { /** * Returns the version of the application. - * + * * @return The version of the application */ public static Version getVersion() { @@ -89,7 +89,7 @@ public class Version implements Comparable { /** * Returns the major level of the version. - * + * * @return The major level of the version */ public int getMajor() { @@ -98,7 +98,7 @@ public class Version implements Comparable { /** * Returns the minor level of the version. - * + * * @return The minor level of the version */ public int getMinor() { @@ -107,7 +107,7 @@ public class Version implements Comparable { /** * Returns the patch level of the version. - * + * * @return The patch level of the version */ public int getPatch() { diff --git a/src/net/pterodactylus/jsite/util/IdGenerator.java b/src/net/pterodactylus/jsite/util/IdGenerator.java index a997512..083f8d5 100644 --- a/src/net/pterodactylus/jsite/util/IdGenerator.java +++ b/src/net/pterodactylus/jsite/util/IdGenerator.java @@ -23,7 +23,7 @@ import java.util.Random; /** * A generator for internal IDs. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class IdGenerator { @@ -37,7 +37,7 @@ public class IdGenerator { /** * Generates a new random ID, consisting of {@link #DEFAULT_LENGTH} random * bytes. - * + * * @return The new ID */ public static byte[] generateId() { @@ -47,7 +47,7 @@ public class IdGenerator { /** * Generates a new random ID, consisting of length random * bytes. - * + * * @param length * The length of the ID in bytes before conversion to a string * @return The new ID diff --git a/src/net/pterodactylus/util/beans/AbstractBean.java b/src/net/pterodactylus/util/beans/AbstractBean.java index b2da732..7200324 100644 --- a/src/net/pterodactylus/util/beans/AbstractBean.java +++ b/src/net/pterodactylus/util/beans/AbstractBean.java @@ -27,7 +27,7 @@ import java.util.List; /** * Abstract bean super class that contains property change listener management. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public abstract class AbstractBean { @@ -37,7 +37,7 @@ public abstract class AbstractBean { /** * Adds a property change listener. - * + * * @param propertyChangeListener * The property change listener to add */ @@ -47,7 +47,7 @@ public abstract class AbstractBean { /** * Removes a property change listener. - * + * * @param propertyChangeListener * The property change listener to remove */ @@ -57,7 +57,7 @@ public abstract class AbstractBean { /** * Notifies all listeners that a property has changed. - * + * * @param property * The name of the property * @param oldValue @@ -67,7 +67,7 @@ public abstract class AbstractBean { */ protected void firePropertyChange(String property, Object oldValue, Object newValue) { PropertyChangeEvent propertyChangeEvent = new PropertyChangeEvent(this, property, oldValue, newValue); - for (PropertyChangeListener propertyChangeListener: propertyChangeListeners) { + for (PropertyChangeListener propertyChangeListener : propertyChangeListeners) { propertyChangeListener.propertyChange(propertyChangeEvent); } @@ -75,7 +75,7 @@ public abstract class AbstractBean { /** * Fires a property change event if the two values are not equal. - * + * * @param propertyName * The name of the property * @param oldValue @@ -97,7 +97,7 @@ public abstract class AbstractBean { * Compares the two objects and returns whether they are equal according to * {@link Object#equals(Object)}. This method takes null * into account as a valid value for an object. - * + * * @param first * The first object * @param second diff --git a/src/net/pterodactylus/util/data/Node.java b/src/net/pterodactylus/util/data/Node.java index 950ed99..3615b36 100644 --- a/src/net/pterodactylus/util/data/Node.java +++ b/src/net/pterodactylus/util/data/Node.java @@ -8,7 +8,7 @@ import java.util.Iterator; * A node that can be stored in a {@link Tree}. A node has exactly one parent * (which is null if the node is the {@link Tree#getRootNode()} * of the tree) and an arbitrary amount of child nodes. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @param * The type of the element to store @@ -17,21 +17,21 @@ public interface Node> extends Iterable>, Compar /** * Returns the parent node of the node. - * + * * @return The parent node */ public Node getParent(); /** * Returns the element that is stored in the node. - * + * * @return The node’s element */ public E getElement(); /** * Adds an element as a child to this node and returns the created node. - * + * * @param child * The child node’s element * @return The created child node @@ -40,14 +40,14 @@ public interface Node> extends Iterable>, Compar /** * Returns the number of children this node has. - * + * * @return The number of children */ public int size(); /** * Returns the child at the given index. - * + * * @param index * The index of the child * @return The child at the given index @@ -56,7 +56,7 @@ public interface Node> extends Iterable>, Compar /** * Returns the direct child node that contains the given element. - * + * * @param element * The element * @return The direct child node containing the given element, or @@ -67,7 +67,7 @@ public interface Node> extends Iterable>, Compar /** * Returns whether the given node is a direct child of this node. - * + * * @param childNode * The child node * @return true if the given node is a direct child of this @@ -78,7 +78,7 @@ public interface Node> extends Iterable>, Compar /** * Returns whether this node contains a child node containing the given * element. - * + * * @param element * The element * @return true if this node contains a direct child node @@ -88,7 +88,7 @@ public interface Node> extends Iterable>, Compar /** * Returns the index of the given child node. - * + * * @param childNode * The child node * @return The index of the child node, or -1 if the child @@ -98,7 +98,7 @@ public interface Node> extends Iterable>, Compar /** * Returns the index of the child node containing the given element. - * + * * @param element * The element * @return The index of the child node, or -1 if the child @@ -109,7 +109,7 @@ public interface Node> extends Iterable>, Compar /** * Remove the given child node from this node. If the given node is not a * child of this node, nothing happens. - * + * * @param childNode * The child node to remove */ @@ -118,7 +118,7 @@ public interface Node> extends Iterable>, Compar /** * Removes the child node that contains the given element. The element in * the node is checked using {@link Object#equals(Object)}. - * + * * @param child * The child element to remove */ @@ -126,7 +126,7 @@ public interface Node> extends Iterable>, Compar /** * Removes the child at the given index. - * + * * @param childIndex * The index of the child to remove */ @@ -145,7 +145,7 @@ public interface Node> extends Iterable>, Compar /** * Searches this node’s children recursively for a node that contains the * given element. - * + * * @param element * The element to search * @return The node that contains the given element, or null @@ -160,7 +160,7 @@ public interface Node> extends Iterable>, Compar /** * Sorts all children with the given comparator. - * + * * @param comparator * The comparator used to sort the children */ diff --git a/src/net/pterodactylus/util/data/NodeImpl.java b/src/net/pterodactylus/util/data/NodeImpl.java index 266cea1..0f719c8 100644 --- a/src/net/pterodactylus/util/data/NodeImpl.java +++ b/src/net/pterodactylus/util/data/NodeImpl.java @@ -9,7 +9,7 @@ import java.util.List; /** * Implementation of the {@link Node} interface. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @param * The type of the element to store @@ -35,7 +35,7 @@ class NodeImpl> implements Node { /** * Creates a new node with the given parent and element. - * + * * @param parentNode * The parent of this node * @param element @@ -90,7 +90,7 @@ class NodeImpl> implements Node { * {@inheritDoc} */ public Node getChild(E element) { - for (Node childNode: children) { + for (Node childNode : children) { if (childNode.getElement().equals(element)) { return childNode; } @@ -109,7 +109,7 @@ class NodeImpl> implements Node { * {@inheritDoc} */ public boolean hasChild(E element) { - for (Node childNode: children) { + for (Node childNode : children) { if (childNode.getElement().equals(element)) { return true; } @@ -122,7 +122,7 @@ class NodeImpl> implements Node { */ public int getIndexOfChild(Node childNode) { int childIndex = 0; - for (Node node: children) { + for (Node node : children) { if (node.equals(childNode)) { return childIndex; } @@ -136,7 +136,7 @@ class NodeImpl> implements Node { */ public int getIndexOfChild(E element) { int childIndex = 0; - for (Node node: children) { + for (Node node : children) { if (node.getElement().equals(element)) { return childIndex; } @@ -156,7 +156,7 @@ class NodeImpl> implements Node { * {@inheritDoc} */ public void removeChild(E child) { - for (Node childNode: children) { + for (Node childNode : children) { if (child.equals(childNode.getElement())) { children.remove(childNode); break; @@ -189,7 +189,7 @@ class NodeImpl> implements Node { * {@inheritDoc} */ public Node findChild(E element) { - for (Node childNode: children) { + for (Node childNode : children) { Node wantedNode = childNode.findChild(element); if (wantedNode != null) { return wantedNode; diff --git a/src/net/pterodactylus/util/data/Tree.java b/src/net/pterodactylus/util/data/Tree.java index 634b8f7..ec47080 100644 --- a/src/net/pterodactylus/util/data/Tree.java +++ b/src/net/pterodactylus/util/data/Tree.java @@ -22,7 +22,7 @@ package net.pterodactylus.util.data; /** * A tree structure in which every node can have an arbitrary amount of * children. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @param * The type of the element to store @@ -34,7 +34,7 @@ public class Tree> { /** * Returns the root node of the tree. - * + * * @return The root node of the tree */ public Node getRootNode() { diff --git a/src/net/pterodactylus/util/image/IconLoader.java b/src/net/pterodactylus/util/image/IconLoader.java index d09443d..b12583f 100644 --- a/src/net/pterodactylus/util/image/IconLoader.java +++ b/src/net/pterodactylus/util/image/IconLoader.java @@ -3,12 +3,12 @@ * 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. @@ -26,14 +26,14 @@ import javax.swing.ImageIcon; /** * Loads an {@link Icon} from the class path. - * + * * @author David Roden */ public class IconLoader { /** * Loads an icon from the class path. - * + * * @param resourceName * The name of the icon * @return The icon, or null if no icon was found @@ -60,7 +60,7 @@ public class IconLoader { /** * Loads an image from the class path. - * + * * @param resourceName * The name of the image * @return The image, or null if no image was found diff --git a/src/net/pterodactylus/util/io/Closer.java b/src/net/pterodactylus/util/io/Closer.java index 6207c12..278a043 100644 --- a/src/net/pterodactylus/util/io/Closer.java +++ b/src/net/pterodactylus/util/io/Closer.java @@ -1,16 +1,16 @@ /* * freenet - Closer.java Copyright © 2007 David Roden - * + * * 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. @@ -29,14 +29,14 @@ import java.util.zip.ZipFile; * null before being closed, and every possible execption is * swallowed. That makes this class perfect for use in the finally blocks of * try-catch-finally blocks. - * + * * @author David ‘Roden’ <bombe@freenetproject.org> */ public class Closer { /** * Closes the given closeable. - * + * * @param closeable * The closeable to close */ @@ -52,7 +52,7 @@ public class Closer { /** * Closes the given socket. - * + * * @param socket * The socket to close */ @@ -68,7 +68,7 @@ public class Closer { /** * Closes the given jar file. - * + * * @param jarFile * The jar file to close */ @@ -84,7 +84,7 @@ public class Closer { /** * Closes the given zip file. - * + * * @param zipFile * The zip file to close */ diff --git a/src/net/pterodactylus/util/io/LimitedInputStream.java b/src/net/pterodactylus/util/io/LimitedInputStream.java index 5224bde..68e5d16 100644 --- a/src/net/pterodactylus/util/io/LimitedInputStream.java +++ b/src/net/pterodactylus/util/io/LimitedInputStream.java @@ -11,7 +11,7 @@ import java.io.InputStream; /** * A wrapper around an {@link InputStream} that only supplies a limit number of * bytes from the underlying input stream. - * + * * @author David Roden */ public class LimitedInputStream extends FilterInputStream { @@ -22,7 +22,7 @@ public class LimitedInputStream extends FilterInputStream { /** * Creates a new LimitedInputStream that supplies at most * length bytes from the given input stream. - * + * * @param inputStream * The input stream * @param length @@ -87,7 +87,7 @@ public class LimitedInputStream extends FilterInputStream { /** * {@inheritDoc} This method does nothing, as {@link #mark(int)} and * {@link #reset()} are not supported. - * + * * @see java.io.FilterInputStream#mark(int) */ @Override @@ -97,7 +97,7 @@ public class LimitedInputStream extends FilterInputStream { /** * {@inheritDoc} - * + * * @see java.io.FilterInputStream#markSupported() * @return false */ @@ -109,7 +109,7 @@ public class LimitedInputStream extends FilterInputStream { /** * {@inheritDoc} This method does nothing, as {@link #mark(int)} and * {@link #reset()} are not supported. - * + * * @see java.io.FilterInputStream#reset() */ @Override @@ -120,7 +120,7 @@ public class LimitedInputStream extends FilterInputStream { /** * Consumes the input stream, i.e. read all bytes until the limit is * reached. - * + * * @throws IOException * if an I/O error occurs */ diff --git a/src/net/pterodactylus/util/io/MimeTypes.java b/src/net/pterodactylus/util/io/MimeTypes.java index d9eaf91..b7f9618 100644 --- a/src/net/pterodactylus/util/io/MimeTypes.java +++ b/src/net/pterodactylus/util/io/MimeTypes.java @@ -27,7 +27,7 @@ import java.util.Map; /** * Handles MIME types and maps them to file extensions. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class MimeTypes { @@ -768,7 +768,7 @@ public class MimeTypes { /** * Returns a list of all known MIME types. - * + * * @return All known MIME types */ public static List getAllMimeTypes() { @@ -777,7 +777,7 @@ public class MimeTypes { /** * Returns a list of MIME types that are registered for the given extension. - * + * * @param extension * The extension to get the MIME types for * @return A list of MIME types, or an empty list if there are no registered @@ -794,7 +794,7 @@ public class MimeTypes { * Returns a default MIME type for the given extension. If the extension * does not match a MIME type the default MIME typ * “application/octet-stream” is returned. - * + * * @param extension * The extension to get the MIME type for * @return The MIME type for the extension, or the default MIME type @@ -813,7 +813,7 @@ public class MimeTypes { /** * Adds a MIME type and optional extensions. - * + * * @param mimeType * The MIME type to add * @param extensions diff --git a/src/net/pterodactylus/util/io/StreamCopier.java b/src/net/pterodactylus/util/io/StreamCopier.java index f413744..8f1592d 100644 --- a/src/net/pterodactylus/util/io/StreamCopier.java +++ b/src/net/pterodactylus/util/io/StreamCopier.java @@ -27,7 +27,7 @@ import java.io.OutputStream; /** * Helper class that copies bytes from an {@link InputStream} to an * {@link OutputStream}. - * + * * @author David Roden */ public class StreamCopier { @@ -40,7 +40,7 @@ public class StreamCopier { /** * Sets the buffer size for following transfers. - * + * * @param bufferSize * The new buffer size */ @@ -54,7 +54,7 @@ public class StreamCopier { * as much bytes as possible will be copied (i.e. until * {@link InputStream#read()} returns -1 to signal the end of * the stream). - * + * * @param source * The input stream to read from * @param destination @@ -85,7 +85,7 @@ public class StreamCopier { * Copies as much bytes as possible (i.e. until {@link InputStream#read()} * returns -1) from the source input stream to the * destination output stream. - * + * * @param source * The input stream to read from * @param destination @@ -100,7 +100,7 @@ public class StreamCopier { /** * Finds the length of the input stream by reading until * {@link InputStream#read(byte[])} returns -1. - * + * * @param source * The input stream to measure * @return The length of the input stream in bytes diff --git a/src/net/pterodactylus/util/logging/Logging.java b/src/net/pterodactylus/util/logging/Logging.java index 86a4a6f..cec0b7e 100644 --- a/src/net/pterodactylus/util/logging/Logging.java +++ b/src/net/pterodactylus/util/logging/Logging.java @@ -34,7 +34,7 @@ import java.util.logging.Logger; /** * Sets up logging. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Logging { @@ -51,7 +51,7 @@ public class Logging { /** * Adds a listener to the log handler. - * + * * @param loggingListener * The listener to add */ @@ -61,7 +61,7 @@ public class Logging { /** * Removes a listener from the log handler. - * + * * @param loggingListener * The listener to remove */ @@ -71,7 +71,7 @@ public class Logging { /** * Sets up logging and installs the log handler. - * + * * @param hierarchyName * The name of the hierarchy root logger */ @@ -108,7 +108,7 @@ public class Logging { } recordBuffer.append("\n"); StackTraceElement[] stackTraceElements = throwable.getStackTrace(); - for (StackTraceElement stackTraceElement: stackTraceElements) { + for (StackTraceElement stackTraceElement : stackTraceElements) { recordBuffer.append(linePrefix).append(" at ").append(stackTraceElement.getClassName()).append('.').append(stackTraceElement.getMethodName()).append("(").append(stackTraceElement.getFileName()).append(':').append(stackTraceElement.getLineNumber()).append(')').append("\n"); } throwable = throwable.getCause(); @@ -125,7 +125,7 @@ public class Logging { /** * Returns a named logger from the jSite hierarchy. - * + * * @param name * The name of the logger * @return The logger @@ -138,7 +138,7 @@ public class Logging { /** * The log handler simply forwards every log message it receives to all * registered listeners. - * + * * @see LoggingListener * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ @@ -160,7 +160,7 @@ public class Logging { /** * Adds a listener to the log handler. - * + * * @param loggingListener * The listener to add */ @@ -170,7 +170,7 @@ public class Logging { /** * Removes a listener from the log handler. - * + * * @param loggingListener * The listener to remove */ @@ -180,12 +180,12 @@ public class Logging { /** * Notifies all listeners that a log record was received. - * + * * @param logRecord * The received log record */ private void fireLogged(LogRecord logRecord) { - for (LoggingListener loggingListener: loggingListeners) { + for (LoggingListener loggingListener : loggingListeners) { loggingListener.logged(logRecord); } } diff --git a/src/net/pterodactylus/util/logging/LoggingListener.java b/src/net/pterodactylus/util/logging/LoggingListener.java index 0025c67..77d4090 100644 --- a/src/net/pterodactylus/util/logging/LoggingListener.java +++ b/src/net/pterodactylus/util/logging/LoggingListener.java @@ -24,14 +24,14 @@ import java.util.logging.LogRecord; /** * Interface for components that want to received logged messages. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface LoggingListener extends EventListener { /** * Notifies a listener that a new log record was received. - * + * * @param logRecord * The received log record */ diff --git a/src/net/pterodactylus/util/number/Hex.java b/src/net/pterodactylus/util/number/Hex.java index 09bf2b0..f81ec05 100644 --- a/src/net/pterodactylus/util/number/Hex.java +++ b/src/net/pterodactylus/util/number/Hex.java @@ -21,21 +21,21 @@ package net.pterodactylus.util.number; /** * Conversion routines for handling hexadecimal numbers. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Hex { /** * Converts the given byte array to a hexadecimal string. - * + * * @param dataBytes * The bytes to convert * @return A string of hexadecimal numbers */ public static String toHex(byte[] dataBytes) { StringBuilder hexString = new StringBuilder(dataBytes.length * 2); - for (byte dataByte: dataBytes) { + for (byte dataByte : dataBytes) { String hexByte = "0" + Integer.toHexString(dataByte & 0xff); hexString.append(hexByte.substring(hexByte.length() - 2)); } diff --git a/src/net/pterodactylus/util/swing/SortableTreeNode.java b/src/net/pterodactylus/util/swing/SortableTreeNode.java index 01cc3b1..056b708 100644 --- a/src/net/pterodactylus/util/swing/SortableTreeNode.java +++ b/src/net/pterodactylus/util/swing/SortableTreeNode.java @@ -30,7 +30,7 @@ import javax.swing.tree.TreeNode; /** * {@link MutableTreeNode} subclass that allows to sort its children. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class SortableTreeNode implements MutableTreeNode { @@ -49,7 +49,7 @@ public class SortableTreeNode implements MutableTreeNode { /** * Creates a new sortable tree node. - * + * * @param allowsChildren * true if this node allows children, * false otherwise @@ -61,7 +61,7 @@ public class SortableTreeNode implements MutableTreeNode { /** * Creates a new sortable tree node that contains the given user-defined * object. - * + * * @param userObject * The user-defined object */ @@ -72,7 +72,7 @@ public class SortableTreeNode implements MutableTreeNode { /** * Creates a new sortable tree node that contains the given user-defined * object. - * + * * @param userObject * The user-defined object * @param allowsChildren @@ -125,7 +125,7 @@ public class SortableTreeNode implements MutableTreeNode { /** * Returns the user-defined object. - * + * * @return The user-defined object */ public Object getUserObject() { @@ -152,7 +152,7 @@ public class SortableTreeNode implements MutableTreeNode { /** * Adds the given node to this node as a child. - * + * * @param child * The child node to add */ @@ -198,7 +198,7 @@ public class SortableTreeNode implements MutableTreeNode { * Removes all children of this node. */ public void removeAll() { - for (MutableTreeNode childNode: children) { + for (MutableTreeNode childNode : children) { childNode.setParent(null); } children.clear(); diff --git a/src/net/pterodactylus/util/swing/StatusBar.java b/src/net/pterodactylus/util/swing/StatusBar.java index c0e844d..1e1873e 100644 --- a/src/net/pterodactylus/util/swing/StatusBar.java +++ b/src/net/pterodactylus/util/swing/StatusBar.java @@ -35,7 +35,7 @@ import javax.swing.border.EtchedBorder; /** * Status bar component that can be added to the {@link BorderLayout#SOUTH} area * of a {@link JFrame}’s {@link JFrame#getContentPane() content pane}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ /* TODO - make it possible to add further components. */ @@ -61,7 +61,7 @@ public class StatusBar extends JPanel { /** * Sets the text of the label. - * + * * @param text * The text of the label */ @@ -72,7 +72,7 @@ public class StatusBar extends JPanel { /** * Adds a side component to the right side of the status bar, pushing all * previously added side components to the left. - * + * * @param component * The component to add */ @@ -85,7 +85,7 @@ public class StatusBar extends JPanel { /** * Returns the number of side components. - * + * * @return The number of side components */ public int getSideComponentCount() { @@ -94,7 +94,7 @@ public class StatusBar extends JPanel { /** * Returns all side components in order. - * + * * @return All side components */ public List getSideComponents() { @@ -103,7 +103,7 @@ public class StatusBar extends JPanel { /** * Removes the side component with the given index. - * + * * @param sideComponentIndex * The index of the side component to remove */ @@ -115,7 +115,7 @@ public class StatusBar extends JPanel { /** * Removes the given side component. - * + * * @param sideComponent * The side component to remove */ diff --git a/src/net/pterodactylus/util/swing/SwingUtils.java b/src/net/pterodactylus/util/swing/SwingUtils.java index b530044..08f79bb 100644 --- a/src/net/pterodactylus/util/swing/SwingUtils.java +++ b/src/net/pterodactylus/util/swing/SwingUtils.java @@ -27,7 +27,7 @@ import java.awt.Window; /** * Helper utilities for working with Swing. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class SwingUtils { @@ -37,7 +37,7 @@ public class SwingUtils { /** * Returns the size of the screen. - * + * * @return The size of the screen */ public static Dimension getScreenSize() { @@ -46,7 +46,7 @@ public class SwingUtils { /** * Centers the given window on the screen. - * + * * @param window * The window to center */ @@ -58,7 +58,7 @@ public class SwingUtils { /** * {@link Window#pack() Packs} the given window and positions it so that its * center stays the same. - * + * * @param window * The window to pack and recenter */ @@ -71,7 +71,7 @@ public class SwingUtils { /** * Returns the center of the given rectangle. - * + * * @param bounds * The rectangle which center to get * @return The center of the rectangle -- 2.7.4