From d8ea3e08f8c92c37310fb6c85ac252569d73715b Mon Sep 17 00:00:00 2001 From: tobias <thinkdifferent055@gmail.com> Date: Sun, 15 Jan 2017 11:33:34 +0100 Subject: [PATCH] Update documentation --- .idea/misc.xml | 18 +++++ .../src/de/tobias/playpad/update/Updates.java | 10 +-- .../src/de/tobias/playpad/PlayPad.java | 73 ++++++++----------- .../playpad/pad/content/PadContent.java | 14 ++-- .../playpad/profile/ref/ProfileReference.java | 41 +++++------ .../playpad/registry/WriteOnlyRegistry.java | 47 +++++------- .../playpad/settings/GlobalSettings.java | 28 +++---- .../de/tobias/playpad/settings/keys/Key.java | 2 +- .../GlobalSettingsTabViewController.java | 3 +- .../ProfileSettingsTabViewController.java | 3 +- .../ProjectSettingsTabViewController.java | 3 +- .../tobias/playpad/volume/VolumeFilter.java | 6 +- 12 files changed, 114 insertions(+), 134 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 05483570..d16470eb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> + <component name="JavadocGenerationManager"> + <option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/out/docs" /> + <option name="OPTION_SCOPE" value="protected" /> + <option name="OPTION_HIERARCHY" value="true" /> + <option name="OPTION_NAVIGATOR" value="true" /> + <option name="OPTION_INDEX" value="true" /> + <option name="OPTION_SEPARATE_INDEX" value="true" /> + <option name="OPTION_DOCUMENT_TAG_USE" value="false" /> + <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" /> + <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" /> + <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" /> + <option name="OPTION_DEPRECATED_LIST" value="true" /> + <option name="OTHER_OPTIONS" /> + <option name="HEAP_SIZE" /> + <option name="LOCALE" /> + <option name="OPEN_IN_BROWSER" value="true" /> + <option name="OPTION_INCLUDE_LIBS" value="false" /> + </component> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/out" /> </component> diff --git a/PlayWall/src/de/tobias/playpad/update/Updates.java b/PlayWall/src/de/tobias/playpad/update/Updates.java index 76dbd21d..37f02e8a 100644 --- a/PlayWall/src/de/tobias/playpad/update/Updates.java +++ b/PlayWall/src/de/tobias/playpad/update/Updates.java @@ -24,13 +24,13 @@ public class Updates { private static final String CACHE_FOLER = "Updates"; // Name der Updater Datei - private static String JAR_NAME = "PlayWallUp.jar"; - private static String EXE_NAME = "PlayWallUp.exe"; + private static final String JAR_NAME = "PlayWallUp.jar"; + private static final String EXE_NAME = "PlayWallUp.exe"; /** * Sollte in einem Extra Thread gemacht werden, da der Updater gedownloaded wird. - * - * @throws IOException + * + * @throws IOException Internal Error */ public static void startUpdate() throws IOException { App app = ApplicationUtils.getApplication(); @@ -84,7 +84,7 @@ public class Updates { private static void downloadUpdater(String updaterURL, Path path) throws IOException, MalformedURLException { URL url = new URL(updaterURL); InputStream iStr = url.openStream(); - + if (Files.notExists(path)) { Files.createDirectories(path.getParent()); } diff --git a/PlayWallCore/src/de/tobias/playpad/PlayPad.java b/PlayWallCore/src/de/tobias/playpad/PlayPad.java index 4f08b132..46e5d4ed 100644 --- a/PlayWallCore/src/de/tobias/playpad/PlayPad.java +++ b/PlayWallCore/src/de/tobias/playpad/PlayPad.java @@ -15,111 +15,102 @@ import javafx.scene.image.Image; /** * Hauptfunktionen für Listener und zur Programmsteuerung für Plugins. - * + * * @author tobias - * * @since 5.0.0 - * */ public interface PlayPad { /** * Fügt einen Listener für das Hauptfenster hinzu. - * - * @param listener - * + * + * @param listener MainView Listener * @since 2.0.0 */ - public void addMainViewListener(WindowListener<IMainViewController> listener); + void addMainViewListener(WindowListener<IMainViewController> listener); /** * Fügt einen Settings Listener hinzu. - * - * @param listener - * + * + * @param listener Settings Listener * @since 2.0.0 */ - public void addSettingsListener(SettingsListener listener); + void addSettingsListener(SettingsListener listener); /** * Entfernt einen Settings Listener. - * - * @param listener - * + * + * @param listener Settings Listener * @since 2.0.0 */ - public void removeSettingsListener(SettingsListener listener); + void removeSettingsListener(SettingsListener listener); /** * Gibt alle SettingListener zurück. - * + * * @return Settingslistener */ - public List<SettingsListener> getSettingsListener(); + List<SettingsListener> getSettingsListener(); /** * Fügt ein PadListener zum System hinzu. Der Listener gilt für alle Pads. - * - * @param listener - * Listener + * + * @param listener Listener * @since 5.0.0 */ - public void addPadListener(PadListener listener); + void addPadListener(PadListener listener); /** * Entfernt ein Pad Listener. - * - * @param listener - * Listener + * + * @param listener Listener */ - public void removePadListener(PadListener listener); + void removePadListener(PadListener listener); /** * Gibt alle PadListener zurück. - * + * * @return PadListener - * */ - public List<PadListener> getPadListener(); + List<PadListener> getPadListener(); /** * Gibt eine Refernz auf das Hauptfenster zurück. - * + * * @return Main ViewController */ - public IMainViewController getMainViewController(); + IMainViewController getMainViewController(); /** * Gibt das Programm Icon zurück. - * + * * @return Programmicon */ - public Optional<Image> getIcon(); + Optional<Image> getIcon(); /** * Beendet PlayWall. */ - public void shutdown(); + void shutdown(); /** * Lädt ein Plugin sofort ins System. - * - * @param uri - * Quelle des Plugin + * + * @param uri Quelle des Plugin */ - public void loadPlugin(URI uri); + void loadPlugin(URI uri); /** * Gibt die globalen Einstellungen zurück. - * + * * @return Global Settings */ - public GlobalSettings getGlobalSettings(); + GlobalSettings getGlobalSettings(); /** * Gibt alle aktiven Module zurück. - * + * * @return Module */ - public Collection<Module> getModules(); + Collection<Module> getModules(); } diff --git a/PlayWallCore/src/de/tobias/playpad/pad/content/PadContent.java b/PlayWallCore/src/de/tobias/playpad/pad/content/PadContent.java index aaf592ba..e819e298 100644 --- a/PlayWallCore/src/de/tobias/playpad/pad/content/PadContent.java +++ b/PlayWallCore/src/de/tobias/playpad/pad/content/PadContent.java @@ -22,7 +22,7 @@ import de.tobias.utils.util.ZipFile; */ public abstract class PadContent implements Cloneable { - // Refrence + // reference private Pad pad; public PadContent(Pad pad) { @@ -35,7 +35,7 @@ public abstract class PadContent implements Cloneable { /** * Never use this. only for cloning - * @param pad + * @param pad cloned pad */ public void setPad(Pad pad) { this.pad = pad; @@ -100,27 +100,27 @@ public abstract class PadContent implements Cloneable { /** * Gibt den richtigen Pfad einer Datei zurück, basierend auf den Einstellungen. * - * @param orrginal + * @param original * orginal path * @return new path * @throws IOException * IO Fehler * @since 5.1.0 */ - public Path getRealPath(Path orginal) throws IOException { + public Path getRealPath(Path original) throws IOException { ProjectSettings settings = getPad().getProject().getSettings(); if (settings.isUseMediaPath()) { Path mediaFolder = settings.getMediaPath(); - Path newPath = mediaFolder.resolve(orginal.getFileName()); + Path newPath = mediaFolder.resolve(original.getFileName()); if (Files.notExists(mediaFolder)) { Files.createDirectories(mediaFolder); } - Files.copy(orginal, newPath, StandardCopyOption.REPLACE_EXISTING); + Files.copy(original, newPath, StandardCopyOption.REPLACE_EXISTING); return newPath; } - return orginal; + return original; } @Override diff --git a/PlayWallCore/src/de/tobias/playpad/profile/ref/ProfileReference.java b/PlayWallCore/src/de/tobias/playpad/profile/ref/ProfileReference.java index fbde1db0..f715ccf7 100644 --- a/PlayWallCore/src/de/tobias/playpad/profile/ref/ProfileReference.java +++ b/PlayWallCore/src/de/tobias/playpad/profile/ref/ProfileReference.java @@ -15,9 +15,8 @@ import javafx.beans.property.StringProperty; /** * Container für Profile Referenzen - * + * * @author tobias - * * @see Profile * @since 5.0.0 */ @@ -29,9 +28,8 @@ public class ProfileReference implements Displayable { /** * Erstellt eine neue Referenz mit einer Random UUID. - * - * @param name - * Name + * + * @param name Name */ public ProfileReference(String name) { this(UUID.randomUUID(), name); @@ -39,11 +37,9 @@ public class ProfileReference implements Displayable { /** * Erstellt eine neue Referenz mit Namen und UUID. - * - * @param uuid - * UUID - * @param name - * Name + * + * @param uuid UUID + * @param name Name */ public ProfileReference(UUID uuid, String name) { this.uuid = uuid; @@ -54,11 +50,10 @@ public class ProfileReference implements Displayable { /** * Erstellt eine neue Referenz mit Namen und UUID. - * - * @param uuid - * UUID - * @param name - * Name + * + * @param uuid UUID + * @param name Name + * @param requestedModules List of requested modules */ public ProfileReference(UUID uuid, String name, Set<Module> requestedModules) { this(uuid, name); @@ -67,7 +62,7 @@ public class ProfileReference implements Displayable { /** * Gibt den Namen zurück - * + * * @return Name */ public String getName() { @@ -76,7 +71,7 @@ public class ProfileReference implements Displayable { /** * Gibt die UUID zurück - * + * * @return uudi */ public UUID getUuid() { @@ -85,9 +80,8 @@ public class ProfileReference implements Displayable { /** * Setzt einen neuen Namen. - * - * @param name - * Neuer Name + * + * @param name Neuer Name */ public void setName(String name) { this.name = name; @@ -104,9 +98,8 @@ public class ProfileReference implements Displayable { /** * Gibt einen Pfad für einen Dateinamen in diesem Profile zurück. - * - * @param name - * Name der Datei + * + * @param name Name der Datei * @return Path für die Datei */ public Path getCustomFilePath(String name) { @@ -115,7 +108,7 @@ public class ProfileReference implements Displayable { /** * Gibt den internen (File-) Namen des Profiles zurück. - * + * * @return Ordnernamen */ public String getFileName() { diff --git a/PlayWallCore/src/de/tobias/playpad/registry/WriteOnlyRegistry.java b/PlayWallCore/src/de/tobias/playpad/registry/WriteOnlyRegistry.java index 90260f89..a430d641 100644 --- a/PlayWallCore/src/de/tobias/playpad/registry/WriteOnlyRegistry.java +++ b/PlayWallCore/src/de/tobias/playpad/registry/WriteOnlyRegistry.java @@ -11,47 +11,36 @@ import de.tobias.playpad.plugin.Module; /** * Eine Schnittstelle um Komponenten zu registrieren, aber nicht auszulesen. - * - * @author tobias * - * @param <C> - * Item - * + * @param <C> Item + * @author tobias * @since 5.1.0 */ public interface WriteOnlyRegistry<C> { /** * Registriert eine Komponente zu einer ID. - * - * @param component - * Komponente - * @param module - * Module zu dem diese Komponente gehört - * @throws IllegalArgumentException - * Die Komponete gibt es bereits. + * + * @param component Komponente + * @param module Module zu dem diese Komponente gehört + * @throws IllegalArgumentException Die Komponete gibt es bereits. */ void registerComponent(C component, Module module) throws IllegalArgumentException; /** * Lädt aus einer XML Datei die Komponenten Deklaration und registriert diese automatisch. - * - * @param url - * URL zur Deklaration - * @param loader - * ClassLoader - * @param module - * Module zu dem diese Komponente gehört - * @throws IOException - * Fehler beim Laden der Datei. - * @throws DocumentException - * Fehler beim Laden des XML Documents - * @throws ClassNotFoundException - * Die Klasse wurde nicht gefunden - * @throws IllegalAccessException - * Unerlaubte Sichtbarkeit - * @throws InstantiationException - * Die Klasse konnte nicht instanziert werden + * + * @param url URL zur Deklaration + * @param loader ClassLoader + * @param module Module zu dem diese Komponente gehört + * @param resourceBundle Resource Bundle + * @throws IOException Fehler beim Laden der Datei. + * @throws DocumentException Fehler beim Laden des XML Documents + * @throws ClassNotFoundException Die Klasse wurde nicht gefunden + * @throws IllegalAccessException Unerlaubte Sichtbarkeit + * @throws InstantiationException Die Klasse konnte nicht instanziert werden + * @throws NoSuchMethodException Internal Error + * @throws InvocationTargetException Internal Error */ void loadComponentsFromFile(URL url, ClassLoader loader, Module module, ResourceBundle resourceBundle) throws IOException, DocumentException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException; diff --git a/PlayWallCore/src/de/tobias/playpad/settings/GlobalSettings.java b/PlayWallCore/src/de/tobias/playpad/settings/GlobalSettings.java index 477780f8..5e80f641 100644 --- a/PlayWallCore/src/de/tobias/playpad/settings/GlobalSettings.java +++ b/PlayWallCore/src/de/tobias/playpad/settings/GlobalSettings.java @@ -23,13 +23,10 @@ import de.tobias.utils.settings.Storable; /** * Globale Einstellungen für das Programm. Eine Instanz von diesen Einstellungen wird in {@link PlayPad} verwaltet. - * + * * @author tobias - * - * @since 5.1.0 - * * @see PlayPad#getGlobalSettings() - * + * @since 5.1.0 */ public class GlobalSettings { @@ -161,12 +158,11 @@ public class GlobalSettings { /** * Lädt eine neue Instanz der Globalen Einstellungen. - * + * + * @param savePath path to be saved * @return GlobalSettings - * @throws DocumentException - * XML Fehler - * @throws IOException - * Fehler bei IO + * @throws DocumentException XML Fehler + * @throws IOException Fehler bei IO */ public static GlobalSettings load(Path savePath) throws DocumentException, IOException { GlobalSettings settings = new GlobalSettings(); @@ -209,7 +205,7 @@ public class GlobalSettings { if (root.element(CACHE_PATH_ELEMENT) != null) { settings.setCachePath(Paths.get(root.element(CACHE_PATH_ELEMENT).getStringValue())); } - + // Dialogs if (root.element(IGNORE_SAVE_DIALOG_ELEMENT) != null) { settings.setIgnoreSaveDialog(Boolean.valueOf(root.element(IGNORE_SAVE_DIALOG_ELEMENT).getStringValue())); @@ -220,11 +216,9 @@ public class GlobalSettings { /** * Speichert die Globalen Einstellungen - * - * @throws UnsupportedEncodingException - * Fehler bei XML - * @throws IOException - * Fehler bei IO + * + * @throws UnsupportedEncodingException Fehler bei XML + * @throws IOException Fehler bei IO */ public void save() throws UnsupportedEncodingException, IOException { Document document = DocumentHelper.createDocument(); @@ -252,7 +246,7 @@ public class GlobalSettings { // Dialogs root.addElement(IGNORE_SAVE_DIALOG_ELEMENT).addText(String.valueOf(ignoreSaveDialog)); - + XMLWriter writer = new XMLWriter(Files.newOutputStream(savePath), OutputFormat.createPrettyPrint()); writer.write(document); writer.close(); diff --git a/PlayWallCore/src/de/tobias/playpad/settings/keys/Key.java b/PlayWallCore/src/de/tobias/playpad/settings/keys/Key.java index a3d75334..19db1c9a 100644 --- a/PlayWallCore/src/de/tobias/playpad/settings/keys/Key.java +++ b/PlayWallCore/src/de/tobias/playpad/settings/keys/Key.java @@ -115,7 +115,7 @@ public class Key implements Displayable { /** * Gibt die Tastenkombination als String für das Menü in JavaFX zurück. * - * @return + * @return KeyCombination Readable */ public String getKeyCode() { StringBuilder builder = new StringBuilder(); diff --git a/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/GlobalSettingsTabViewController.java b/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/GlobalSettingsTabViewController.java index 09ce9cf0..fb0c6822 100644 --- a/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/GlobalSettingsTabViewController.java +++ b/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/GlobalSettingsTabViewController.java @@ -33,8 +33,7 @@ public abstract class GlobalSettingsTabViewController extends NVC { public abstract void saveSettings(GlobalSettings settings); /** - * Gibt <code>true</code> zurück, wenn im Hauptprogramm etwas neu geladen werden muss. Der eigentliche Reload wird - * in {@link #reload(Profile, Project, IMainViewController)} ausgeführt. + * Gibt <code>true</code> zurück, wenn im Hauptprogramm etwas neu geladen werden muss. * * @return <code>true</code> Benötigt Reload */ diff --git a/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProfileSettingsTabViewController.java b/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProfileSettingsTabViewController.java index ea57bb4d..1478c5ad 100644 --- a/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProfileSettingsTabViewController.java +++ b/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProfileSettingsTabViewController.java @@ -38,8 +38,7 @@ public abstract class ProfileSettingsTabViewController extends NVC { public abstract void saveSettings(Profile profile); /** - * Gibt <code>true</code> zurück, wenn im Hauptprogramm etwas neu geladen werden muss. Der eigentliche Reload wird - * in {@link #reload(Profile, Project, IMainViewController)} ausgeführt. + * Gibt <code>true</code> zurück, wenn im Hauptprogramm etwas neu geladen werden muss. * * @return <code>true</code> Benötigt Reload */ diff --git a/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProjectSettingsTabViewController.java b/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProjectSettingsTabViewController.java index 2d6aba60..c914fa27 100644 --- a/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProjectSettingsTabViewController.java +++ b/PlayWallCore/src/de/tobias/playpad/viewcontroller/option/ProjectSettingsTabViewController.java @@ -40,8 +40,7 @@ public abstract class ProjectSettingsTabViewController extends NVC { public abstract void saveSettings(ProjectSettings settings); /** - * Gibt <code>true</code> zurück, wenn im Hauptprogramm etwas neu geladen werden muss. Der eigentliche Reload wird - * in {@link #reload(Profile, Project, IMainViewController)} ausgeführt. + * Gibt <code>true</code> zurück, wenn im Hauptprogramm etwas neu geladen werden muss. * * @return <code>true</code> Benötigt Reload */ diff --git a/PlayWallCore/src/de/tobias/playpad/volume/VolumeFilter.java b/PlayWallCore/src/de/tobias/playpad/volume/VolumeFilter.java index 805fc438..09acc604 100644 --- a/PlayWallCore/src/de/tobias/playpad/volume/VolumeFilter.java +++ b/PlayWallCore/src/de/tobias/playpad/volume/VolumeFilter.java @@ -4,12 +4,10 @@ import de.tobias.playpad.pad.Pad; /** * Interface, um das Volume eines Pad zu beeinflussen. Es muss dem VolumeManager hinzugefügt werden. - * - * @author tobias * - * @sinve 6.0.0 - * + * @author tobias * @see VolumeManager#addFilter(VolumeFilter) + * @since 6.0.0 */ @FunctionalInterface public interface VolumeFilter { -- GitLab