* Exception that is thrown when there is a problem with the FCP backend.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class BackendException extends JSiteException {
* Interface for the core.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface Core {
* The core of jSite.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class CoreImpl implements Core, NodeListener, RequestListener {
}
/**
- * @see net.pterodactylus.jsite.core.RequestListener#requestGeneratedURI(net.pterodactylus.jsite.core.Request, java.lang.String)
+ * @see net.pterodactylus.jsite.core.RequestListener#requestGeneratedURI(net.pterodactylus.jsite.core.Request,
+ * java.lang.String)
*/
public void requestGeneratedURI(Request request, String uri) {
/* TODO - find project and process request */
}
-
+
/**
- * @see net.pterodactylus.jsite.core.RequestListener#requestFinished(net.pterodactylus.jsite.core.Request)
- */
- public void requestFinished(Request request) {
+ * @see net.pterodactylus.jsite.core.RequestListener#requestFinished(net.pterodactylus.jsite.core.Request)
+ */
+ public void requestFinished(Request request) {
/* TODO - find project and process request */
- }
+ }
}
* Interface definition for user interfaces.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface CoreListener {
* Base exception for all jSite-specific exceptions.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class JSiteException extends Exception {
*
* @see NodeManager#generateKeyPair()
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class NoNodeException extends JSiteException {
* {@link PropertyChangeListener}s if any of the contained properties change.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Node extends AbstractBean {
* Interface for listeners that want to be notified about node events.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface NodeListener extends EventListener {
* TODO
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class NodeManager implements Iterable<Node>, PropertyChangeListener, HighLevelClientListener {
* Lifetime statistics of a project.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class ProjectLifetime {
* A request is an ongoing download or upload reported by the freenet node.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Request extends AbstractBean {
* The type of a request.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public enum Type {
* Interface for objects that want to be notified on request events.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface RequestListener extends EventListener {
* node is disconnected.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class RequestManager implements NodeListener, HighLevelProgressListener {
/**
* Contains verifier for various settings.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Verifier {
/**
* Checks whether the given name is a valid node name.
- *
+ *
* @param name
* The name to verify
* @return <code>true</code> if the name is okay, <code>false</code> if
/**
* Verifies the given hostname by trying to resolve it.
- *
+ *
* @param hostname
* The hostname to verify
* @return <code>true</code> if the hostname is not empty and can be
/**
* Verifies that the port number is numeric and in the range from
* <code>0</code> to <code>65535</code>.
- *
+ *
* @param portString
* The port number string
* @return <code>true</code> if the port number is okay,
* An “about” dialog.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class AboutDialog extends JDialog implements I18nable {
/** A list of all contributors. */
private static final List<Contributor> CONTRIBUTORS = new ArrayList<Contributor>();
-
+
/** A list of all code usages. */
private static final List<CodeUsage> CODE_USAGES = new ArrayList<CodeUsage>();
/** The “other people’s code used” label. */
private I18nLabel codeUsageLabel;
-
+
/** The license header. */
private I18nLabel licenseHeaderLabel;
codeUsageLabel.setFont(codeUsageLabel.getFont().deriveFont(Font.BOLD));
textPanel.add(codeUsageLabel);
textPanel.add(Box.createVerticalStrut(12));
-
+
for (CodeUsage codeUsage: CODE_USAGES) {
JLabel usageLabel = new JLabel(codeUsage.getName() + " (" + codeUsage.getURL() + ", " + codeUsage.getLicense() + ")");
textPanel.add(usageLabel);
}
-
+
return aboutPanel;
}
* Container for a contributor.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
private static class Contributor {
* The configuration dialog.
*
* @author <a href="mailto:dr@ina-germany.de">David Roden</a>
- * @version $Id$
*/
public class ConfigurationDialog extends JDialog implements I18nable {
* Wrapper around class name and name of a {@link LookAndFeel}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
private static class LookAndFeelWrapper {
* Dialog that lets the user edit the properties of a node.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class EditNodeDialog extends JDialog implements I18nable {
* #4304129</a>).
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class FixedJMenuItem extends JMenuItem {
*
* @see GraphicsEnvironment#getAllFonts()
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class FontComboBox extends JComboBox {
* The cell renderer for the font name cells.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
private static class FontCellRenderer extends JLabel implements ListCellRenderer {
* Frame that shows log messages as they occur.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class LogWindow extends JFrame implements LoggingListener, ActionListener {
* Table model for the log message table.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
private class LogRecordTableModel extends AbstractTableModel {
* Defines the main window of the application.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class MainWindow extends JFrame implements WindowListener, I18nable, PropertyChangeListener {
* the properties of the project.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class ProjectPanel extends JPanel implements DocumentListener, I18nable {
* Class that handles i18n.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class I18n {
* Interface for objects that want to be notified when the language is changed.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface I18nable {
+
package net.pterodactylus.jsite.i18n.gui;
import javax.swing.AbstractAction;
* Helper class that initializes actions with values from {@link I18n}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public abstract class I18nAction extends AbstractAction implements I18nable {
/**
* Label that can update itself from {@link I18n}.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class I18nLabel extends JLabel implements I18nable {
/**
* Creates a new label with the given I18n basename.
- *
+ *
* @param i18nBasename
* The I18n basename of the label
*/
/**
* 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
/**
* 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
/**
* 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
* Menu that receives its properties from {@link I18n}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class I18nMenu extends JMenu implements I18nable {
* Main class that is called by the VM.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Main {
* Container for version information.
*
* @author David Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Version implements Comparable<Version> {
* Abstract base implementation of a {@link Entry}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public abstract class AbstractEntry extends AbstractBean implements Entry {
* (separated by a slash, ‘/’).
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface Entry {
* A physical file represents a file on the disk.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class PhysicalEntry extends AbstractEntry {
* {@link PropertyChangeListener}s if any of the contained properties change.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Project extends AbstractBean {
* things.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class ProjectManager implements PropertyChangeListener {
String projectDescription = projectProperties.getProperty(projectPrefix + ".description");
String projectPrivateKey = projectProperties.getProperty(projectPrefix + ".privateKey");
String projectPublicKey = projectProperties.getProperty(projectPrefix + ".publicKey");
- String projectBasePath = projectProperties.getProperty(projectPrefix + ".basePath");
+ String projectBasePath = projectProperties.getProperty(projectPrefix + ".basePath");
Project project = new Project();
project.setId(projectId);
project.setName(projectName);
* another file on freenet.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class RedirectEntry extends AbstractEntry {
* Abstract bean super class that contains property change listener management.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public abstract class AbstractBean {
* Loads an {@link Icon} from the class path.
*
* @author <a href="mailto:droden@gmail.com">David Roden</a>
- * @version $Id$
*/
public class IconLoader {
* try-catch-finally blocks.
*
* @author David ‘Roden’ <bombe@freenetproject.org>
- * @version $Id$
*/
public class Closer {
/**
* © 2008 INA Service GmbH
*/
+
package net.pterodactylus.util.io;
import java.io.FilterInputStream;
* bytes from the underlying input stream.
*
* @author <a href="mailto:dr@ina-germany.de">David Roden</a>
- * @version $Id$
*/
public class LimitedInputStream extends FilterInputStream {
*/
@Override
public synchronized long skip(long n) throws IOException {
- if ((n < 0) || (remaining == 0)) {
+ if ((n < 0) || (remaining == 0)) {
return 0;
}
long skipped = super.skip(Math.min(n, remaining));
}
/**
- * {@inheritDoc}
- *
- * This method does nothing, as {@link #mark(int)} and {@link #reset()} are
- * not supported.
+ * {@inheritDoc} This method does nothing, as {@link #mark(int)} and
+ * {@link #reset()} are not supported.
*
* @see java.io.FilterInputStream#mark(int)
*/
}
/**
- * {@inheritDoc}
- *
- * This method does nothing, as {@link #mark(int)} and {@link #reset()} are
- * not supported.
+ * {@inheritDoc} This method does nothing, as {@link #mark(int)} and
+ * {@link #reset()} are not supported.
*
* @see java.io.FilterInputStream#reset()
*/
* Handles MIME types and maps them to file extensions.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class MimeTypes {
* {@link OutputStream}.
*
* @author <a href="mailto:dr@ina-germany.de">David Roden</a>
- * @version $Id$
*/
public class StreamCopier {
* Sets up logging.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Logging {
Handler consoleHandler = new ConsoleHandler();
consoleHandler.setLevel(Level.ALL);
consoleHandler.setFormatter(new Formatter() {
+
private StringBuffer recordBuffer = new StringBuffer();
private DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z");
+
/**
* {@inheritDoc}
*/
*
* @see LoggingListener
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
private static class LogHandler extends Handler {
* Interface for components that want to received logged messages.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface LoggingListener extends EventListener {
* Conversion routines for handling hexadecimal numbers.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class Hex {
* of a {@link JFrame}’s {@link JFrame#getContentPane() content pane}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
/* TODO - make it possible to add further components. */
public class StatusBar extends JPanel {
* Helper utilities for working with Swing.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public class SwingUtils {