From: David ‘Bombe’ Roden Date: Sun, 26 Aug 2012 19:53:59 +0000 (+0200) Subject: Add missing @Override annotations. X-Git-Tag: 0.11^2~21 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=593eba180ca6538a680810651f127fbcf0a620a3;p=jSite.git Add missing @Override annotations. --- diff --git a/src/de/todesbaum/jsite/application/KeyDialog.java b/src/de/todesbaum/jsite/application/KeyDialog.java index 4b64f72..cd628e7 100644 --- a/src/de/todesbaum/jsite/application/KeyDialog.java +++ b/src/de/todesbaum/jsite/application/KeyDialog.java @@ -185,6 +185,7 @@ public class KeyDialog extends JDialog { private void createActions() { okAction = new AbstractAction(I18n.getMessage("jsite.general.ok")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionOk(); @@ -195,6 +196,7 @@ public class KeyDialog extends JDialog { cancelAction = new AbstractAction(I18n.getMessage("jsite.general.cancel")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionCancel(); @@ -205,6 +207,7 @@ public class KeyDialog extends JDialog { generateAction = new AbstractAction(I18n.getMessage("jsite.key-dialog.button.generate")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionGenerate(); @@ -261,6 +264,7 @@ public class KeyDialog extends JDialog { I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { keysLabel.setText(I18n.getMessage("jsite.key-dialog.label.keys")); privateKeyLabel.setText(I18n.getMessage("jsite.key-dialog.label.private-key")); diff --git a/src/de/todesbaum/jsite/application/Project.java b/src/de/todesbaum/jsite/application/Project.java index fa0b774..d9a193c 100644 --- a/src/de/todesbaum/jsite/application/Project.java +++ b/src/de/todesbaum/jsite/application/Project.java @@ -386,6 +386,7 @@ public class Project implements Comparable { *

* Projects are compared by their name only. */ + @Override public int compareTo(Project project) { return name.compareToIgnoreCase(project.name); } diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index b5f2e16..a3fb0da 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -443,6 +443,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { /** * {@inheritDoc} */ + @Override public void run() { fireProjectInsertStarted(); List files = fileScanner.getFiles(); @@ -548,6 +549,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { /** * {@inheritDoc} */ + @Override public void fileScannerFinished(FileScanner fileScanner) { if (!fileScanner.isError()) { new Thread(this).start(); @@ -597,6 +599,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { /** * {@inheritDoc} */ + @Override public Iterator iterator() { return issues.iterator(); } diff --git a/src/de/todesbaum/jsite/application/UpdateChecker.java b/src/de/todesbaum/jsite/application/UpdateChecker.java index c49f166..01960b8 100644 --- a/src/de/todesbaum/jsite/application/UpdateChecker.java +++ b/src/de/todesbaum/jsite/application/UpdateChecker.java @@ -191,6 +191,7 @@ public class UpdateChecker implements Runnable { /** * {@inheritDoc} */ + @Override public void run() { Connection connection = freenetInterface.getConnection("jSite-" + ++counter + "-UpdateChecker"); try { diff --git a/src/de/todesbaum/jsite/gui/FileScanner.java b/src/de/todesbaum/jsite/gui/FileScanner.java index 1790fbf..1ce8d6c 100644 --- a/src/de/todesbaum/jsite/gui/FileScanner.java +++ b/src/de/todesbaum/jsite/gui/FileScanner.java @@ -110,6 +110,7 @@ public class FileScanner implements Runnable { * * @see FileScannerListener#fileScannerFinished(FileScanner) */ + @Override public void run() { files = new ArrayList(); error = false; @@ -154,6 +155,7 @@ public class FileScanner implements Runnable { private void scanFiles(File rootDir, List fileList) throws IOException { File[] files = rootDir.listFiles(new FileFilter() { + @Override @SuppressWarnings("synthetic-access") public boolean accept(File file) { return !project.isIgnoreHiddenFiles() || !file.isHidden(); @@ -335,6 +337,7 @@ public class FileScanner implements Runnable { /** * {@inheritDoc} */ + @Override public int compareTo(ScannedFile scannedFile) { return filename.compareTo(scannedFile.filename); } diff --git a/src/de/todesbaum/jsite/gui/NodeManagerPage.java b/src/de/todesbaum/jsite/gui/NodeManagerPage.java index 8e44129..49c25bc 100644 --- a/src/de/todesbaum/jsite/gui/NodeManagerPage.java +++ b/src/de/todesbaum/jsite/gui/NodeManagerPage.java @@ -103,6 +103,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene setDescription(I18n.getMessage("jsite.node-manager.description")); I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { setHeading(I18n.getMessage("jsite.node-manager.heading")); setDescription(I18n.getMessage("jsite.node-manager.description")); @@ -160,6 +161,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene private void createActions() { addNodeAction = new AbstractAction(I18n.getMessage("jsite.node-manager.add-node")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { addNode(); @@ -168,6 +170,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene deleteNodeAction = new AbstractAction(I18n.getMessage("jsite.node-manager.delete-node")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { deleteNode(); @@ -177,6 +180,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { addNodeAction.putValue(Action.NAME, I18n.getMessage("jsite.node-manager.add-node")); deleteNodeAction.putValue(Action.NAME, I18n.getMessage("jsite.node-manager.delete-node")); @@ -238,6 +242,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { nodeInformationLabel.setText("" + I18n.getMessage("jsite.node-manager.node-information") + ""); nodeNameLabel.setText(I18n.getMessage("jsite.node-manager.name") + ":"); @@ -374,6 +379,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene /** * {@inheritDoc} */ + @Override @SuppressWarnings("null") public void valueChanged(ListSelectionEvent e) { Object source = e.getSource(); @@ -406,6 +412,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene /** * {@inheritDoc} */ + @Override public void insertUpdate(DocumentEvent e) { updateTextField(e); } @@ -413,6 +420,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene /** * {@inheritDoc} */ + @Override public void removeUpdate(DocumentEvent e) { updateTextField(e); } @@ -420,6 +428,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene /** * {@inheritDoc} */ + @Override public void changedUpdate(DocumentEvent e) { updateTextField(e); } @@ -431,6 +440,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene /** * {@inheritDoc} */ + @Override public void stateChanged(ChangeEvent e) { Object source = e.getSource(); Node selectedNode = getSelectedNode(); diff --git a/src/de/todesbaum/jsite/gui/PreferencesPage.java b/src/de/todesbaum/jsite/gui/PreferencesPage.java index 5cf258a..914e74b 100644 --- a/src/de/todesbaum/jsite/gui/PreferencesPage.java +++ b/src/de/todesbaum/jsite/gui/PreferencesPage.java @@ -131,6 +131,7 @@ public class PreferencesPage extends TWizardPage { /** * {@inheritDoc} */ + @Override public void run() { setHeading(I18n.getMessage("jsite.preferences.heading")); setDescription(I18n.getMessage("jsite.preferences.description")); @@ -317,6 +318,7 @@ public class PreferencesPage extends TWizardPage { /** * {@inheritDoc} */ + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { selectDefaultTempDirectory(); @@ -327,6 +329,7 @@ public class PreferencesPage extends TWizardPage { /** * {@inheritDoc} */ + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { selectCustomTempDirectory(); @@ -334,6 +337,7 @@ public class PreferencesPage extends TWizardPage { }; chooseTempDirectoryAction = new AbstractAction(I18n.getMessage("jsite.preferences.temp-directory.choose")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent e) { chooseTempDirectory(); @@ -341,6 +345,7 @@ public class PreferencesPage extends TWizardPage { }; nextToJarFileAction = new AbstractAction(I18n.getMessage("jsite.preferences.config-directory.jar")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionevent) { configurationLocation = ConfigurationLocation.NEXT_TO_JAR_FILE; @@ -348,6 +353,7 @@ public class PreferencesPage extends TWizardPage { }; homeDirectoryAction = new AbstractAction(I18n.getMessage("jsite.preferences.config-directory.home")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionevent) { configurationLocation = ConfigurationLocation.HOME_DIRECTORY; @@ -355,6 +361,7 @@ public class PreferencesPage extends TWizardPage { }; customDirectoryAction = new AbstractAction(I18n.getMessage("jsite.preferences.config-directory.custom")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { configurationLocation = ConfigurationLocation.CUSTOM; @@ -362,6 +369,7 @@ public class PreferencesPage extends TWizardPage { }; useEarlyEncodeAction = new AbstractAction(I18n.getMessage("jsite.preferences.insert-options.use-early-encode")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { useEarlyEncode = useEarlyEncodeCheckBox.isSelected(); @@ -369,6 +377,7 @@ public class PreferencesPage extends TWizardPage { }; priorityAction = new AbstractAction(I18n.getMessage("jsite.preferences.insert-options.priority")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { priority = (PriorityClass) insertPriorityComboBox.getSelectedItem(); @@ -377,6 +386,7 @@ public class PreferencesPage extends TWizardPage { I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { selectDefaultTempDirectoryAction.putValue(Action.NAME, I18n.getMessage("jsite.preferences.temp-directory.default")); @@ -467,6 +477,7 @@ public class PreferencesPage extends TWizardPage { /** * {@inheritDoc} */ + @Override public void run() { tempDirectoryLabel.setText("" + I18n.getMessage("jsite.preferences.temp-directory") + ""); configurationDirectoryLabel.setText("" + I18n.getMessage("jsite.preferences.config-directory") + ""); diff --git a/src/de/todesbaum/jsite/gui/ProjectFilesPage.java b/src/de/todesbaum/jsite/gui/ProjectFilesPage.java index 80bb52c..06f01b1 100644 --- a/src/de/todesbaum/jsite/gui/ProjectFilesPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectFilesPage.java @@ -132,6 +132,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis private void createActions() { scanAction = new AbstractAction(I18n.getMessage("jsite.project-files.action.rescan")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionScan(); @@ -142,6 +143,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { scanAction.putValue(Action.NAME, I18n.getMessage("jsite.project-files.action.rescan")); @@ -262,14 +264,17 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis } } + @Override public void changedUpdate(DocumentEvent documentEvent) { storeText(documentEvent); } + @Override public void insertUpdate(DocumentEvent documentEvent) { storeText(documentEvent); } + @Override public void removeUpdate(DocumentEvent documentEvent) { storeText(documentEvent); } @@ -292,6 +297,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { ignoreHiddenFilesCheckBox.setText(I18n.getMessage("jsite.project-files.ignore-hidden-files")); @@ -330,6 +336,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis ignoreHiddenFilesCheckBox.setSelected(project.isIgnoreHiddenFiles()); I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { setHeading(MessageFormat.format(I18n.getMessage("jsite.project-files.heading"), project.getName())); setDescription(I18n.getMessage("jsite.project-files.description")); @@ -362,12 +369,14 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis *

* Updates the file list. */ + @Override public void fileScannerFinished(FileScanner fileScanner) { final boolean error = fileScanner.isError(); if (!error) { final List files = fileScanner.getFiles(); SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { projectFileList.setListData(files.toArray()); @@ -397,6 +406,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis } SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { wizard.setPreviousEnabled(true); @@ -428,6 +438,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * {@inheritDoc} */ + @Override public void actionPerformed(ActionEvent actionEvent) { Object source = actionEvent.getSource(); if ((source instanceof JCheckBox) && ("ignore-hidden-files".equals(((JCheckBox) source).getName()))) { @@ -487,6 +498,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * {@inheritDoc} */ + @Override @SuppressWarnings("null") public void valueChanged(ListSelectionEvent e) { ScannedFile scannedFile = (ScannedFile) projectFileList.getSelectedValue(); @@ -556,6 +568,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * {@inheritDoc} */ + @Override public void changedUpdate(DocumentEvent documentEvent) { processDocumentUpdate(documentEvent); } @@ -563,6 +576,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * {@inheritDoc} */ + @Override public void insertUpdate(DocumentEvent documentEvent) { processDocumentUpdate(documentEvent); } @@ -570,6 +584,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis /** * {@inheritDoc} */ + @Override public void removeUpdate(DocumentEvent documentEvent) { processDocumentUpdate(documentEvent); } diff --git a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java index bfd8b89..c0a02d0 100644 --- a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java @@ -111,6 +111,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl setDescription(I18n.getMessage("jsite.insert.description")); I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { setHeading(I18n.getMessage("jsite.insert.heading")); setDescription(I18n.getMessage("jsite.insert.description")); @@ -126,6 +127,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl private void createActions() { copyURIAction = new AbstractAction(I18n.getMessage("jsite.project.action.copy-uri")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionCopyURI(); @@ -137,6 +139,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { copyURIAction.putValue(Action.NAME, I18n.getMessage("jsite.project.action.copy-uri")); @@ -185,6 +188,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { projectInformationLabel.setText("" + I18n.getMessage("jsite.insert.project-information") + ""); @@ -224,12 +228,14 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl progressBar.setFont(progressBar.getFont().deriveFont(Font.PLAIN)); projectInserter.start(new ProgressListener() { + @Override public void onProgress(final long copied, final long length) { SwingUtilities.invokeLater(new Runnable() { /** * {@inheritDoc} */ + @Override @SuppressWarnings("synthetic-access") public void run() { int divisor = 1; @@ -275,6 +281,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl projectInserter.setProject(project); SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { requestURITextField.setText(project.getFinalRequestURI(1)); @@ -353,10 +360,12 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + @Override public void projectInsertStarted(final Project project) { SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { startTimeLabel.setText(DateFormat.getDateTimeInstance().format(new Date())); @@ -367,10 +376,12 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + @Override public void projectUploadFinished(Project project) { startTime = System.currentTimeMillis(); SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { progressBar.setString(I18n.getMessage("jsite.insert.starting")); @@ -382,9 +393,11 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + @Override public void projectURIGenerated(Project project, final String uri) { SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { copyURIAction.setEnabled(true); @@ -415,10 +428,12 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + @Override public void projectInsertProgress(Project project, final int succeeded, final int failed, final int fatal, final int total, final boolean finalized) { insertedBlocks = succeeded; SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { if (total == 0) { @@ -444,6 +459,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + @Override public void projectInsertFinished(Project project, boolean success, Throwable cause) { running = false; if (success) { @@ -465,6 +481,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl } SwingUtilities.invokeLater(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { progressBar.setValue(progressBar.getMaximum()); @@ -527,6 +544,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl /** * {@inheritDoc} */ + @Override public void lostOwnership(Clipboard clipboard, Transferable contents) { /* ignore. */ } diff --git a/src/de/todesbaum/jsite/gui/ProjectPage.java b/src/de/todesbaum/jsite/gui/ProjectPage.java index 98ad847..c319e94 100644 --- a/src/de/todesbaum/jsite/gui/ProjectPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectPage.java @@ -143,6 +143,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { setHeading(I18n.getMessage("jsite.project.heading")); setDescription(I18n.getMessage("jsite.project.description")); @@ -206,6 +207,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D private void createActions() { projectLocalPathBrowseAction = new AbstractAction(I18n.getMessage("jsite.project.action.browse")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionLocalPathBrowse(); @@ -217,6 +219,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectAddAction = new AbstractAction(I18n.getMessage("jsite.project.action.add-project")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionAdd(); @@ -227,6 +230,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectDeleteAction = new AbstractAction(I18n.getMessage("jsite.project.action.delete-project")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionDelete(); @@ -238,6 +242,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectCloneAction = new AbstractAction(I18n.getMessage("jsite.project.action.clone-project")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionClone(); @@ -249,6 +254,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectCopyURIAction = new AbstractAction(I18n.getMessage("jsite.project.action.copy-uri")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionCopyURI(); @@ -260,6 +266,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectManageKeysAction = new AbstractAction(I18n.getMessage("jsite.project.action.manage-keys")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionManageKeys(); @@ -271,6 +278,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectResetEditionAction = new AbstractAction(I18n.getMessage("jsite.project.action.reset-edition")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { actionResetEdition(); @@ -282,6 +290,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { projectLocalPathBrowseAction.putValue(Action.NAME, I18n.getMessage("jsite.project.action.browse")); @@ -407,6 +416,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override public void run() { projectInformationLabel.setText("" + I18n.getMessage("jsite.project.project.information") + ""); projectNameLabel.setText(I18n.getMessage("jsite.project.project.name") + ":"); @@ -653,6 +663,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D /** * {@inheritDoc} */ + @Override public void valueChanged(ListSelectionEvent listSelectionEvent) { int selectedRow = projectList.getSelectedIndex(); Project selectedProject = (Project) projectList.getSelectedValue(); @@ -692,6 +703,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D /** * {@inheritDoc} */ + @Override public void insertUpdate(DocumentEvent documentEvent) { setTextField(documentEvent); } @@ -699,6 +711,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D /** * {@inheritDoc} */ + @Override public void removeUpdate(DocumentEvent documentEvent) { setTextField(documentEvent); } @@ -706,6 +719,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D /** * {@inheritDoc} */ + @Override public void changedUpdate(DocumentEvent documentEvent) { setTextField(documentEvent); } @@ -717,6 +731,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D /** * {@inheritDoc} */ + @Override public void lostOwnership(Clipboard clipboard, Transferable contents) { /* ignore. */ } diff --git a/src/de/todesbaum/jsite/i18n/I18nContainer.java b/src/de/todesbaum/jsite/i18n/I18nContainer.java index da2e0c3..9683dd3 100644 --- a/src/de/todesbaum/jsite/i18n/I18nContainer.java +++ b/src/de/todesbaum/jsite/i18n/I18nContainer.java @@ -80,6 +80,7 @@ public class I18nContainer implements Iterable { * Returns a combined list of {@link #i18nRunnables} and * {@link #i18nPostRunnables}, in that order. */ + @Override public Iterator iterator() { List allRunnables = new ArrayList(); allRunnables.addAll(i18nRunnables); diff --git a/src/de/todesbaum/jsite/main/CLI.java b/src/de/todesbaum/jsite/main/CLI.java index 65c9253..c10f7df 100644 --- a/src/de/todesbaum/jsite/main/CLI.java +++ b/src/de/todesbaum/jsite/main/CLI.java @@ -220,6 +220,7 @@ public class CLI implements InsertListener { projectInserter.setProject(currentProject); projectInserter.start(new ProgressListener() { + @Override public void onProgress(long copied, long length) { System.out.print("Uploaded: " + copied + " / " + length + " bytes...\r"); } @@ -243,6 +244,7 @@ public class CLI implements InsertListener { /** * {@inheritDoc} */ + @Override public void projectInsertStarted(Project project) { outputWriter.println("Starting Insert of project \"" + project.getName() + "\"."); } @@ -250,6 +252,7 @@ public class CLI implements InsertListener { /** * {@inheritDoc} */ + @Override public void projectUploadFinished(Project project) { outputWriter.println("Project \"" + project.getName() + "\" has been uploaded, starting insert..."); } @@ -257,6 +260,7 @@ public class CLI implements InsertListener { /** * {@inheritDoc} */ + @Override public void projectURIGenerated(Project project, String uri) { outputWriter.println("URI: " + uri); } @@ -264,6 +268,7 @@ public class CLI implements InsertListener { /** * {@inheritDoc} */ + @Override public void projectInsertProgress(Project project, int succeeded, int failed, int fatal, int total, boolean finalized) { outputWriter.println("Progress: " + succeeded + " done, " + failed + " failed, " + fatal + " fatal, " + total + " total" + (finalized ? " (finalized)" : "") + ", " + ((succeeded + failed + fatal) * 100 / total) + "%"); } @@ -271,6 +276,7 @@ public class CLI implements InsertListener { /** * {@inheritDoc} */ + @Override public void projectInsertFinished(Project project, boolean success, Throwable cause) { outputWriter.println("Request URI: " + project.getFinalRequestURI(0)); finished = true; diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index edbf5e4..7c7d8fd 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -201,6 +201,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen for (final Locale locale : SUPPORTED_LOCALES) { languageActions.put(locale, new AbstractAction(I18n.getMessage("jsite.menu.language." + locale.getLanguage()), IconLoader.loadIcon("/flag-" + locale.getLanguage() + ".png")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { switchLanguage(locale); @@ -209,6 +210,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen } manageNodeAction = new AbstractAction(I18n.getMessage("jsite.menu.nodes.manage-nodes")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { showPage(PageType.PAGE_NODE_MANAGER); @@ -222,6 +224,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { optionsPreferences(); @@ -232,6 +235,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { showLatestUpdate(); @@ -239,6 +243,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen }; aboutAction = new AbstractAction(I18n.getMessage("jsite.menu.help.about")) { + @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.about.message"), getVersion().toString()), null, JOptionPane.INFORMATION_MESSAGE, jSiteIcon); @@ -247,6 +252,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { manageNodeAction.putValue(Action.NAME, I18n.getMessage("jsite.menu.nodes.manage-nodes")); @@ -298,6 +304,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen I18nContainer.getInstance().registerRunnable(new Runnable() { + @Override @SuppressWarnings("synthetic-access") public void run() { languageMenu.setText(I18n.getMessage("jsite.menu.languages")); @@ -493,6 +500,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void valueChanged(ListSelectionEvent e) { JList list = (JList) e.getSource(); int selectedRow = list.getSelectedIndex(); @@ -506,6 +514,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void wizardNextPressed(TWizard wizard) { String pageName = wizard.getPage().getName(); if ("page.node-manager".equals(pageName)) { @@ -585,6 +594,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void wizardPreviousPressed(TWizard wizard) { String pageName = wizard.getPage().getName(); if ("page.project".equals(pageName) || "page.preferences".equals(pageName)) { @@ -600,6 +610,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void wizardQuitPressed(TWizard wizard) { if (((ProjectPage) pages.get(PageType.PAGE_PROJECTS)).wasUriCopied() || ((ProjectInsertPage) pages.get(PageType.PAGE_INSERT_PROJECT)).wasUriCopied()) { JOptionPane.showMessageDialog(wizard, I18n.getMessage("jsite.project.warning.use-clipboard-now")); @@ -635,6 +646,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void nodesUpdated(Node[] nodes) { nodeMenu.removeAll(); ButtonGroup nodeButtonGroup = new ButtonGroup(); @@ -659,6 +671,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void nodeSelected(Node node) { for (Component menuItem : nodeMenu.getMenuComponents()) { if (menuItem instanceof JMenuItem) { @@ -678,6 +691,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source instanceof JRadioButtonMenuItem) { @@ -695,6 +709,7 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ + @Override public void foundUpdateData(Version foundVersion, long versionTimestamp) { logger.log(Level.FINEST, "Found version {0} from {1,date}.", new Object[] { foundVersion, versionTimestamp }); if (foundVersion.compareTo(VERSION) > 0) { diff --git a/src/de/todesbaum/jsite/main/Version.java b/src/de/todesbaum/jsite/main/Version.java index 977836c..373703c 100644 --- a/src/de/todesbaum/jsite/main/Version.java +++ b/src/de/todesbaum/jsite/main/Version.java @@ -99,6 +99,7 @@ public class Version implements Comparable { /** * {@inheritDoc} */ + @Override public int compareTo(Version version) { int lessComponents = Math.min(components.length, version.components.length); for (int index = 0; index < lessComponents; index++) {