This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 8a7047ea99c3c6e529e06fe90eeefe8e0af31aaf Author: CHRE <CHATELLIER@codelutin.com> Date: Wed Jun 8 13:29:05 2016 +0200 Use default methods to remove a lot of empty implemented methods --- .../org/chorem/jtimer/data/CommonVetoable.java | 141 ++++----------- .../org/chorem/jtimer/data/DataEventListener.java | 108 +++++++---- .../jtimer/data/VetoableDataEventListener.java | 82 +++++---- .../chorem/jtimer/io/GTimerIncrementalSaver.java | 61 ------- src/main/java/org/chorem/jtimer/ui/StatusBar.java | 40 ----- .../chorem/jtimer/ui/systray/SystrayManager.java | 198 +-------------------- .../jtimer/ui/treetable/ProjectsAndTasksModel.java | 20 --- .../ProjectsAndTasksRunningCellRenderer.java | 123 ------------- 8 files changed, 165 insertions(+), 608 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/data/CommonVetoable.java b/src/main/java/org/chorem/jtimer/data/CommonVetoable.java index 0e6914f..8510936 100644 --- a/src/main/java/org/chorem/jtimer/data/CommonVetoable.java +++ b/src/main/java/org/chorem/jtimer/data/CommonVetoable.java @@ -2,7 +2,7 @@ * #%L * jTimer * %% - * Copyright (C) 2007 - 2011 CodeLutin, Chatellier Eric + * Copyright (C) 2007 - 2016 CodeLutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -23,7 +23,6 @@ package org.chorem.jtimer.data; import java.util.Collection; -import java.util.Date; import java.util.List; import org.apache.commons.logging.Log; @@ -34,39 +33,46 @@ import org.chorem.jtimer.entities.TimerTaskHelper; /** * Common jtimer vetoable politics. - * - * Check that: - * - a task name doesn't appears twice in the same level. - * - creation - * - modification - * - move * - * @author chatellier - * @version $Revision$ - * - * Last update : $Date$ - * By : $Author$ + * Check that: + * - a task name doesn't appears twice in the same level. + * - creation + * - modification + * - move */ public class CommonVetoable implements VetoableDataEventListener { /** log. */ private static Log log = LogFactory.getLog(CommonVetoable.class); - /** Duplicated project violation key. */ + /** + * Duplicated project violation key. + */ protected static final String DUPLICATED_PROJECT_VIOLATION = "vetoable.common.duplicated.project.name"; - /** Duplicated task violation key. */ + + /** + * Duplicated task violation key. + */ protected static final String DUPLICATED_TASK_VIOLATION = "vetoable.common.duplicated.task.name"; - /** Violation if try to move project into task. */ + + /** + * Violation if try to move project into task. + */ protected static final String MOVE_INVALID_TYPES_VIOLATION = "vetoable.common.move.invalid.types"; - /** Violation if try to merge task and project. */ + + /** + * Violation if try to merge task and project. + */ protected static final String MERGE_INVALID_TYPES_VIOLATION = "vetoable.common.merge.invalid.types"; - /** Data manager */ + /** + * Data manager. + */ protected TimerDataManager manager; /** * Constructor. - * + * * @param manager data manager */ public CommonVetoable(TimerDataManager manager) { @@ -75,13 +81,13 @@ public class CommonVetoable implements VetoableDataEventListener { /** * Test if task name is found is tasks list. - * - * @param task task to check + * + * @param task task to check * @param tasks tasks list to search into * @return founded */ protected boolean isSameTaskName(TimerTask task, - List<? extends TimerTask> tasks) { + List<? extends TimerTask> tasks) { boolean found = false; for (TimerTask currentTask : tasks) { @@ -93,9 +99,6 @@ public class CommonVetoable implements VetoableDataEventListener { return found; } - /* - * {@inheritDoc} - */ @Override public void checkAddProject(TimerProject project) { @@ -104,14 +107,10 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Duplicated name, checkAddProject won't pass"); } - throw new DataViolationException("Can't add project", - DUPLICATED_PROJECT_VIOLATION); + throw new DataViolationException("Can't add project", DUPLICATED_PROJECT_VIOLATION); } } - /* - * {@inheritDoc} - */ @Override public void checkAddTask(TimerTask parent, TimerTask task) { @@ -120,38 +119,10 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Duplicated name, checkAddTask won't pass"); } - throw new DataViolationException("Can't add task", - DUPLICATED_TASK_VIOLATION); + throw new DataViolationException("Can't add task", DUPLICATED_TASK_VIOLATION); } } - /* - * {@inheritDoc} - */ - @Override - public void checkChangeClosedState(TimerTask task) { - - } - - /* - * {@inheritDoc} - */ - @Override - public void checkDeleteProject(TimerProject project) { - - } - - /* - * {@inheritDoc} - */ - @Override - public void checkDeleteTask(TimerTask task) { - - } - - /* - * {@inheritDoc} - */ @Override public void checkModifyProject(TimerProject project) { @@ -160,14 +131,10 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Duplicated name, checkModifyProject won't pass"); } - throw new DataViolationException("Can't modify project", - DUPLICATED_PROJECT_VIOLATION); + throw new DataViolationException("Can't modify project", DUPLICATED_PROJECT_VIOLATION); } } - /* - * {@inheritDoc} - */ @Override public void checkModifyTask(TimerTask task) { @@ -176,15 +143,11 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Duplicated name, checkModifyTask won't pass"); } - throw new DataViolationException("Can't modify task", - DUPLICATED_TASK_VIOLATION); + throw new DataViolationException("Can't modify task", DUPLICATED_TASK_VIOLATION); } } - /* - * {@inheritDoc} - */ @Override public void checkMoveTask(TimerTask destination, Collection<TimerTask> tasksToMove) { @@ -194,8 +157,7 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Move task into himself, impossible"); } - throw new DataViolationException("Can't move task into himself", - MOVE_INVALID_TYPES_VIOLATION); + throw new DataViolationException("Can't move task into himself", MOVE_INVALID_TYPES_VIOLATION); } for (TimerTask taskToMove : tasksToMove) { @@ -205,8 +167,7 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Move project, impossible"); } - throw new DataViolationException("Can't move project", - MOVE_INVALID_TYPES_VIOLATION); + throw new DataViolationException("Can't move project", MOVE_INVALID_TYPES_VIOLATION); } // check duplicated task name @@ -214,55 +175,31 @@ public class CommonVetoable implements VetoableDataEventListener { if (log.isDebugEnabled()) { log.debug("Duplicated name, checkMoveTask won't pass"); } - throw new DataViolationException("Can't move task", - DUPLICATED_TASK_VIOLATION); + throw new DataViolationException("Can't move task", DUPLICATED_TASK_VIOLATION); } } } - /* - * {@inheritDoc} - */ - @Override - public void checkSetAnnotation(TimerTask task, Date date, String value) { - - } - - /* - * {@inheritDoc} - */ - @Override - public void checkSetTaskTime(TimerTask task, Date date, Long value) { - - } - - /* - * {@inheritDoc} - */ @Override public void checkMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { + List<TimerTask> otherTasks) { // tous les taches sont des projets if (destinationTask instanceof TimerProject) { for (TimerTask otherTask : otherTasks) { if (!(otherTask instanceof TimerProject)) { - throw new DataViolationException("Can't merge task", - MERGE_INVALID_TYPES_VIOLATION); + throw new DataViolationException("Can't merge task", MERGE_INVALID_TYPES_VIOLATION); } } - } - else { + } else { // ou toutes des taches for (TimerTask otherTask : otherTasks) { if (otherTask instanceof TimerProject) { - throw new DataViolationException("Can't merge task", - MERGE_INVALID_TYPES_VIOLATION); + throw new DataViolationException("Can't merge task", MERGE_INVALID_TYPES_VIOLATION); } } // mais pas une combinaison des deux } } - } diff --git a/src/main/java/org/chorem/jtimer/data/DataEventListener.java b/src/main/java/org/chorem/jtimer/data/DataEventListener.java index 961b5df..78a30b5 100644 --- a/src/main/java/org/chorem/jtimer/data/DataEventListener.java +++ b/src/main/java/org/chorem/jtimer/data/DataEventListener.java @@ -42,119 +42,151 @@ public interface DataEventListener extends EventListener { /** * Add project event. - * + * * @param project project to add */ - void addProject(TimerProject project); + default void addProject(TimerProject project) { + + } /** * Add task event. - * + * * @param task task to add */ - void addTask(TimerTask task); + default void addTask(TimerTask task) { + + } /** * Modify project. - * + * * @param project modified project */ - void modifyProject(TimerProject project); + default void modifyProject(TimerProject project) { + + } /** * Modify task. - * + * * @param task modified task */ - void modifyTask(TimerTask task); - + default void modifyTask(TimerTask task) { + + } + /** * Delete project. - * + * * @param project deleted project */ - void deleteProject(TimerProject project); + default void deleteProject(TimerProject project) { + + } /** * Delete task. - * + * * @param task deleted task */ - void deleteTask(TimerTask task); + default void deleteTask(TimerTask task) { + + } /** * Add annotation. - * - * @param task task where annotation is changed - * @param date date + * + * @param task task where annotation is changed + * @param date date * @param annotation new annotation value */ - void setAnnotation(TimerTask task, Date date, String annotation); + default void setAnnotation(TimerTask task, Date date, String annotation) { + + } /** * Set task time. - * + * * @param task task where time is changed * @param date date * @param time task time */ - void setTaskTime(TimerTask task, Date date, Long time); + default void setTaskTime(TimerTask task, Date date, Long time) { + + } /** * Change task state. - * + * * @param task task */ - void changeClosedState(TimerTask task); + default void changeClosedState(TimerTask task) { + + } /** * Pre move task. - * + * * @param task task */ - void preMoveTask(TimerTask task); + default void preMoveTask(TimerTask task) { + + } /** * Post move task. - * + * * @param task task */ - void moveTask(TimerTask task); - + default void moveTask(TimerTask task) { + + } + /** * Pre merge task. - * + * * @param destinationTask task where all other task will be merged - * @param otherTasks other tasks to merge + * @param otherTasks other tasks to merge */ - void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks); + default void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks) { + + } /** * Post merge task. - * + * * @param destinationTask task where all other task will be merged - * @param otherTasks other tasks to merge + * @param otherTasks other tasks to merge */ - void postMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks); + default void postMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks) { + + } /** * Start task. - * + * * @param task started task */ - void startTask(TimerTask task); + default void startTask(TimerTask task) { + + } /** * Stop task. - * + * * @param task stopped task */ - void stopTask(TimerTask task); + default void stopTask(TimerTask task) { + + } /** * All data loaded. - * + * * @param projects projects collection */ - void dataLoaded(Collection<TimerProject> projects); + default void dataLoaded(Collection<TimerProject> projects) { + + } } diff --git a/src/main/java/org/chorem/jtimer/data/VetoableDataEventListener.java b/src/main/java/org/chorem/jtimer/data/VetoableDataEventListener.java index 0f8a9da..ac7a801 100644 --- a/src/main/java/org/chorem/jtimer/data/VetoableDataEventListener.java +++ b/src/main/java/org/chorem/jtimer/data/VetoableDataEventListener.java @@ -2,7 +2,7 @@ * #%L * jTimer * %% - * Copyright (C) 2008 - 2010 CodeLutin, Chatellier Eric + * Copyright (C) 2008 - 2016 CodeLutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -42,86 +42,108 @@ public interface VetoableDataEventListener extends EventListener { /** * Check add project. - * + * * @param project project to add */ - void checkAddProject(TimerProject project); + default void checkAddProject(TimerProject project) { + + } /** * Check add task. - * + * * @param parent parent task - * @param task task to add + * @param task task to add */ - void checkAddTask(TimerTask parent, TimerTask task); + default void checkAddTask(TimerTask parent, TimerTask task) { + + } /** * Check modify project. - * + * * @param project modified project */ - void checkModifyProject(TimerProject project); + default void checkModifyProject(TimerProject project) { + + } /** * Check modify task. - * + * * @param task modified task */ - void checkModifyTask(TimerTask task); + default void checkModifyTask(TimerTask task) { + + } /** * Check delete project. - * + * * @param project deleted project */ - void checkDeleteProject(TimerProject project); + default void checkDeleteProject(TimerProject project) { + + } /** * Check delete task. - * + * * @param task deleted task */ - void checkDeleteTask(TimerTask task); + default void checkDeleteTask(TimerTask task) { + + } /** * Check update task annotation. - * - * @param task task to update - * @param date day of change + * + * @param task task to update + * @param date day of change * @param value new annotation */ - void checkSetAnnotation(TimerTask task, Date date, String value); + default void checkSetAnnotation(TimerTask task, Date date, String value) { + + } /** * Check update task time. - * - * @param task task to update - * @param date day of change + * + * @param task task to update + * @param date day of change * @param value new time in seconds */ - void checkSetTaskTime(TimerTask task, Date date, Long value); + default void checkSetTaskTime(TimerTask task, Date date, Long value) { + + } /** * Check change task state. - * + * * @param task task */ - void checkChangeClosedState(TimerTask task); + default void checkChangeClosedState(TimerTask task) { + + } /** * Check move task. - * + * * @param destination task to move to * @param tasksToMove tasks to move */ - void checkMoveTask(TimerTask destination, Collection<TimerTask> tasksToMove); - + default void checkMoveTask(TimerTask destination, Collection<TimerTask> tasksToMove) { + + } + /** * Check merge task. - * + * * @param destinationTask task result of merge - * @param otherTasks other task to merge + * @param otherTasks other task to merge */ - void checkMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks); + default void checkMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks) { + + } } diff --git a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java index 59d47dc..67f2f01 100644 --- a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java +++ b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java @@ -1184,11 +1184,6 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, } @Override - public void dataLoaded(Collection<TimerProject> projects) { - // do nothing - } - - @Override public void deleteProject(TimerProject project) { deleteTaskOrProject(project, GTIMER_PROJECT_EXTENSION); } @@ -1312,13 +1307,6 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, } @Override - public void preMoveTask(TimerTask task) { - if (log.isDebugEnabled()) { - log.debug("preMoveTask event received"); - } - } - - @Override public void moveTask(TimerTask task) { if (log.isDebugEnabled()) { @@ -1343,11 +1331,6 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, } @Override - public void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks) { - - } - - @Override public void startTask(TimerTask task) { if (log.isDebugEnabled()) { @@ -1390,11 +1373,6 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, } @Override - public void checkSetAnnotation(TimerTask task, Date date, String value) { - - } - - @Override public void checkAddProject(TimerProject project) { checkName(project); } @@ -1421,43 +1399,4 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, } } - @Override - public void checkChangeClosedState(TimerTask task) { - - } - - @Override - public void checkDeleteProject(TimerProject project) { - - } - - @Override - public void checkDeleteTask(TimerTask task) { - - } - - @Override - public void checkModifyProject(TimerProject project) { - - } - - @Override - public void checkModifyTask(TimerTask task) { - checkName(task); - } - - @Override - public void checkMoveTask(TimerTask destination, Collection<TimerTask> tasksToMove) { - - } - - @Override - public void checkSetTaskTime(TimerTask task, Date date, Long value) { - - } - - @Override - public void checkMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks) { - - } } diff --git a/src/main/java/org/chorem/jtimer/ui/StatusBar.java b/src/main/java/org/chorem/jtimer/ui/StatusBar.java index 8a86311..cd069c0 100644 --- a/src/main/java/org/chorem/jtimer/ui/StatusBar.java +++ b/src/main/java/org/chorem/jtimer/ui/StatusBar.java @@ -25,7 +25,6 @@ package org.chorem.jtimer.ui; import java.awt.GridLayout; import java.util.Collection; import java.util.Date; -import java.util.List; import javax.swing.BorderFactory; import javax.swing.JLabel; @@ -149,40 +148,23 @@ public class StatusBar extends JPanel implements DataEventListener { } @Override - public void modifyProject(TimerProject project) { - - } - - @Override public void setTaskTime(TimerTask task, Date date, Long time) { modifyTask(task); } @Override - public void setAnnotation(TimerTask task, Date date, String annotation) { - - } - - @Override public void modifyTask(TimerTask task) { updateTodayTime(); } @Override - public void changeClosedState(TimerTask task) { - - } - - @Override public void startTask(TimerTask task) { startStopTask(task, true); - } @Override public void stopTask(TimerTask task) { startStopTask(task, false); - } /** @@ -213,26 +195,4 @@ public class StatusBar extends JPanel implements DataEventListener { } lblMessage.setText(message); } - - @Override - public void moveTask(TimerTask task) { - - } - - @Override - public void preMoveTask(TimerTask task) { - - } - - @Override - public void postMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { - - } - - @Override - public void preMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { - - } } diff --git a/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java b/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java index c3fc5f8..700b0b8 100644 --- a/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java +++ b/src/main/java/org/chorem/jtimer/ui/systray/SystrayManager.java @@ -30,11 +30,9 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; -import java.util.Collection; -import java.util.Date; -import java.util.List; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; @@ -43,7 +41,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.JTimer; import org.chorem.jtimer.data.DataEventListener; -import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; import org.chorem.jtimer.ui.widget.JPopupTrayIcon; import org.jdesktop.application.ApplicationContext; @@ -59,8 +56,8 @@ import org.jdesktop.application.ResourceMap; * Last update : $Date$ * By : $Author$ */ -public class SystrayManager implements ActionListener, DataEventListener, - MouseListener, Runnable, WindowListener { +public class SystrayManager extends WindowAdapter implements ActionListener, DataEventListener, + MouseListener, Runnable { /** Log. */ private static Log log = LogFactory.getLog(SystrayManager.class); @@ -197,81 +194,11 @@ public class SystrayManager implements ActionListener, DataEventListener, } } - /* - * @see org.chorem.jtimer.data.event.DataEventListener#addProject(org.chorem.jtimer.entities.TimerProject) - */ - @Override - public void addProject(TimerProject project) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#addTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void addTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#dataLoaded(java.util.Collection) - */ - @Override - public void dataLoaded(Collection<TimerProject> projects) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#deleteProject(org.chorem.jtimer.entities.TimerProject) - */ - @Override - public void deleteProject(TimerProject project) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#deleteTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void deleteTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#modifyProject(org.chorem.jtimer.entities.TimerProject) - */ - @Override - public void modifyProject(TimerProject project) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#modifyTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void modifyTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#changeClosedState(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void changeClosedState(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.ui.systray.SystrayManager#startTask(org.chorem.jtimer.entities.TimerTask) - */ @Override public void startTask(TimerTask task) { startStopTask(task, true); } - /* - * @see org.chorem.jtimer.ui.systray.SystrayManager#stopTask(org.chorem.jtimer.entities.TimerTask) - */ @Override public void stopTask(TimerTask task) { startStopTask(task, false); @@ -350,9 +277,7 @@ public class SystrayManager implements ActionListener, DataEventListener, } } - /* - * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) - */ + @Override public void actionPerformed(ActionEvent e) { // This is only popop menu action here @@ -377,58 +302,6 @@ public class SystrayManager implements ActionListener, DataEventListener, } - /* - * @see org.chorem.jtimer.event.DataEventListener#setAnnotation(org.chorem.jtimer.entities.TimerTask, java.util.Date, java.lang.String) - */ - @Override - public void setAnnotation(TimerTask task, Date date, String annotation) { - - } - - /* - * @see org.chorem.jtimer.event.DataEventListener#setTaskTime(org.chorem.jtimer.entities.TimerTask, java.util.Calendar, java.lang.Long) - */ - public void setTaskTime(TimerTask task, Date date, Long time) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#postMoveTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void moveTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#preMoveTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void preMoveTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.DataEventListener#postMergeTasks(org.chorem.jtimer.entities.TimerTask, java.util.List) - */ - @Override - public void postMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { - - } - - /* - * @see org.chorem.jtimer.data.DataEventListener#preMergeTasks(org.chorem.jtimer.entities.TimerTask, java.util.List) - */ - @Override - public void preMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { - - } - - /* - * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent) - */ @Override public void mouseClicked(MouseEvent e) { @@ -457,41 +330,26 @@ public class SystrayManager implements ActionListener, DataEventListener, } } - /* - * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent) - */ @Override public void mouseEntered(MouseEvent e) { } - /* - * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent) - */ @Override public void mouseExited(MouseEvent e) { } - /* - * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent) - */ @Override public void mousePressed(MouseEvent e) { } - /* - * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent) - */ @Override public void mouseReleased(MouseEvent e) { } - /* - * @see java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent) - */ @Override public void windowClosing(WindowEvent e) { @@ -505,52 +363,4 @@ public class SystrayManager implements ActionListener, DataEventListener, parent.exit(e); } } - - /* - * @see java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent) - */ - @Override - public void windowActivated(WindowEvent e) { - - } - - /* - * @see java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent) - */ - @Override - public void windowClosed(WindowEvent e) { - - } - - /* - * @see java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent) - */ - @Override - public void windowDeactivated(WindowEvent e) { - - } - - /* - * @see java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent) - */ - @Override - public void windowDeiconified(WindowEvent e) { - - } - - /* - * @see java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent) - */ - @Override - public void windowIconified(WindowEvent e) { - - } - - /* - * @see java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent) - */ - @Override - public void windowOpened(WindowEvent e) { - - } } diff --git a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java index abe1601..3a167ec 100644 --- a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java +++ b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java @@ -396,11 +396,6 @@ public class ProjectsAndTasksModel extends AbstractTreeTableModel implements } @Override - public void setAnnotation(TimerTask task, Date date, String annotation) { - - } - - @Override public void setTaskTime(TimerTask task, Date date, Long time) { notifyTaskChanged(task, OPERATION_MODIFY); } @@ -428,16 +423,6 @@ public class ProjectsAndTasksModel extends AbstractTreeTableModel implements } } - @Override - public void startTask(TimerTask task) { - - } - - @Override - public void stopTask(TimerTask task) { - - } - /** * Change closed task property. * @@ -468,9 +453,4 @@ public class ProjectsAndTasksModel extends AbstractTreeTableModel implements notifyTaskChanged(otherTask, OPERATION_DELETE); } } - - @Override - public void preMergeTasks(TimerTask destinationTask, List<TimerTask> otherTasks) { - - } } diff --git a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksRunningCellRenderer.java b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksRunningCellRenderer.java index 1ee3b36..905fa9d 100644 --- a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksRunningCellRenderer.java +++ b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksRunningCellRenderer.java @@ -29,9 +29,7 @@ import java.awt.image.ImageObserver; import java.net.URL; import java.util.Collection; import java.util.Collections; -import java.util.Date; import java.util.HashSet; -import java.util.List; import java.util.Set; import javax.swing.ImageIcon; @@ -41,7 +39,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.data.DataEventListener; import org.chorem.jtimer.data.TimerCore; -import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; import org.jdesktop.swingx.JXTreeTable; @@ -159,73 +156,6 @@ public class ProjectsAndTasksRunningCellRenderer extends ProjectsAndTasksCellRen } } - /* - * @see org.chorem.jtimer.data.event.DataEventListener#addProject(org.chorem.jtimer.entities.TimerProject) - */ - @Override - public void addProject(TimerProject project) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#addTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void addTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#dataLoaded(java.util.Collection) - */ - @Override - public void dataLoaded(Collection<TimerProject> projects) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#deleteProject(org.chorem.jtimer.entities.TimerProject) - */ - @Override - public void deleteProject(TimerProject project) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#deleteTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void deleteTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#modifyProject(org.chorem.jtimer.entities.TimerProject) - */ - @Override - public void modifyProject(TimerProject project) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#modifyTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void modifyTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#changeClosedState(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void changeClosedState(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#startTask(org.chorem.jtimer.entities.TimerTask) - */ @Override public void startTask(TimerTask task) { @@ -237,9 +167,6 @@ public class ProjectsAndTasksRunningCellRenderer extends ProjectsAndTasksCellRen runningTasks.add(task); } - /* - * @see org.chorem.jtimer.data.event.DataEventListener#stopTask(org.chorem.jtimer.entities.TimerTask) - */ @Override public void stopTask(TimerTask task) { @@ -250,54 +177,4 @@ public class ProjectsAndTasksRunningCellRenderer extends ProjectsAndTasksCellRen // remember don't running task runningTasks.remove(task); } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#postMoveTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void moveTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.event.DataEventListener#preMoveTask(org.chorem.jtimer.entities.TimerTask) - */ - @Override - public void preMoveTask(TimerTask task) { - - } - - /* - * @see org.chorem.jtimer.data.DataEventListener#postMergeTasks(org.chorem.jtimer.entities.TimerTask, java.util.List) - */ - @Override - public void postMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { - - } - - /* - * @see org.chorem.jtimer.data.DataEventListener#preMergeTasks(org.chorem.jtimer.entities.TimerTask, java.util.List) - */ - @Override - public void preMergeTasks(TimerTask destinationTask, - List<TimerTask> otherTasks) { - - } - - /* - * @see org.chorem.jtimer.event.DataEventListener#setTaskTime(org.chorem.jtimer.entities.TimerTask, java.util.Date, java.lang.Long) - */ - @Override - public void setTaskTime(TimerTask task, Date date, Long time) { - - } - - /* - * @see org.chorem.jtimer.event.DataEventListener#setAnnotation(org.chorem.jtimer.entities.TimerTask, java.util.Date, java.lang.String) - */ - @Override - public void setAnnotation(TimerTask task, Date date, String annotation) { - - } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.