branch develop updated (48a11de -> f12d21a)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jtimer. See http://git.chorem.org/jtimer.git from 48a11de fixes #1319: Remplace json format by yaml new f12d21a fixes #1333: Add option to display tree angles lines The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit f12d21afdd66c8cf3b76e091fb62a7ba7db1c892 Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 2 14:58:49 2016 +0100 fixes #1333: Add option to display tree angles lines Summary of changes: src/main/java/org/chorem/jtimer/JTimer.java | 34 +++++++++++++++++++++- src/main/java/org/chorem/jtimer/JTimerConfig.java | 20 +++++++++++++ .../org/chorem/jtimer/resources/JTimer.properties | 3 ++ .../chorem/jtimer/resources/JTimer_fr.properties | 3 ++ 4 files changed, 59 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jtimer. See http://git.chorem.org/jtimer.git commit f12d21afdd66c8cf3b76e091fb62a7ba7db1c892 Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Mar 2 14:58:49 2016 +0100 fixes #1333: Add option to display tree angles lines --- src/main/java/org/chorem/jtimer/JTimer.java | 34 +++++++++++++++++++++- src/main/java/org/chorem/jtimer/JTimerConfig.java | 20 +++++++++++++ .../org/chorem/jtimer/resources/JTimer.properties | 3 ++ .../chorem/jtimer/resources/JTimer_fr.properties | 3 ++ 4 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/chorem/jtimer/JTimer.java b/src/main/java/org/chorem/jtimer/JTimer.java index b89e4e8..7474769 100644 --- a/src/main/java/org/chorem/jtimer/JTimer.java +++ b/src/main/java/org/chorem/jtimer/JTimer.java @@ -312,6 +312,9 @@ public class JTimer extends SingleFrameApplication implements imap.remove(keyToRemove); imap = imap.getParent(); } + + // default lines are non visible + changeTreeShowLineOption(); return projectsAndTasksTable; } @@ -395,7 +398,14 @@ public class JTimer extends SingleFrameApplication implements showClosedItem.setSelected(config.isShowClosed()); showClosedItem.setIcon(null); menu.add(showClosedItem); - + + // showTreeLines + JMenuItem showTreeLinesItem = new JCheckBoxMenuItem(); + showTreeLinesItem.setAction(getAction("isShowTreeLines")); + showTreeLinesItem.setSelected(config.isShowTreeLines()); + showTreeLinesItem.setIcon(null); + menu.add(showTreeLinesItem); + // close to systray JMenuItem closeToSysItem = new JCheckBoxMenuItem(); closeToSysItem.setAction(getAction("isCloseToSystray")); @@ -869,6 +879,28 @@ public class JTimer extends SingleFrameApplication implements projectsAndTasksTable.setShowClosed(showClosed); config.setShowClosed(showClosed); } + + /** + * Change show tree lines option. + * + * @param event action event + */ + @Action + public void isShowTreeLines(ActionEvent event) { + JCheckBoxMenuItem source = (JCheckBoxMenuItem) event.getSource(); + boolean showTreeLines = source.isSelected(); + config.setShowTreeLines(showTreeLines); + changeTreeShowLineOption(); + projectsAndTasksTable.repaint(); + } + + /** + * Change property "JTree.lineStyle" of the tree. + */ + protected void changeTreeShowLineOption() { + projectsAndTasksTable.putClientProperty("JTree.lineStyle", + config.isShowTreeLines() ? "Angled" : "None"); + } /** * Change close to systray option. diff --git a/src/main/java/org/chorem/jtimer/JTimerConfig.java b/src/main/java/org/chorem/jtimer/JTimerConfig.java index ac98d49..e87aa68 100644 --- a/src/main/java/org/chorem/jtimer/JTimerConfig.java +++ b/src/main/java/org/chorem/jtimer/JTimerConfig.java @@ -154,6 +154,25 @@ public class JTimerConfig { } /** + * Show angles lines on main ui tree. + * + * @return show closed project + */ + public boolean isShowTreeLines() { + return appConfig.getOptionAsBoolean(JTimerOption.UI_SHOW_TREELINES.key); + } + + /** + * Set show closed option. + * + * @param showTreeLines showTreeLines + */ + public void setShowTreeLines(boolean showTreeLines) { + appConfig.setOption(JTimerOption.UI_SHOW_TREELINES.key, String.valueOf(showTreeLines)); + appConfig.saveForUser(); + } + + /** * Get task template from configuration. * * @return task template as map @@ -226,6 +245,7 @@ public class JTimerConfig { UI_TEMPLATE_DIRECTORY("jtimer.ui.template.directory", "${jtimer.io.saver.directory}/templates"), UI_IDLE_TIME("jtimer.ui.idletime", "300"), UI_SHOW_CLOSED("jtimer.ui.showclosed", "false"), + UI_SHOW_TREELINES("jtimer.ui.showtreelines", "false"), UI_CLOSE_TO_SYSTRAY("jtimer.ui.closetosystray", "true"), UI_REPORT_FIRSTDAYOFWEEK("jtimer.ui.report.firstdayofweek", "0"); diff --git a/src/main/resources/org/chorem/jtimer/resources/JTimer.properties b/src/main/resources/org/chorem/jtimer/resources/JTimer.properties index 33baae2..0e3f8c9 100644 --- a/src/main/resources/org/chorem/jtimer/resources/JTimer.properties +++ b/src/main/resources/org/chorem/jtimer/resources/JTimer.properties @@ -124,6 +124,9 @@ makeReport.Action.shortDescription = Create report isShowClosed.Action.text = Show closed isShowClosed.Action.shortDescription = Show closed task and project +isShowTreeLines.Action.text = Show tree lines +isShowTreeLines.Action.shortDescription = Show tree lines + isCloseToSystray.Action.text = Close to systray isCloseToSystray.Action.shortDescription = Reduce application to system tray instead of closing diff --git a/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties b/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties index 2f29bd7..6abc8b7 100644 --- a/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties +++ b/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties @@ -92,6 +92,9 @@ makeReport.Action.shortDescription = Cr\u00E9er un rapport isShowClosed.Action.text = Afficher les cach\u00E9s isShowClosed.Action.shortDescription = Affiche les projets et t\u00E2ches ferm\u00E9s +isShowTreeLines.Action.text = Afficher les lignes de l'arbre +isShowTreeLines.Action.shortDescription = Afficher les lignes de l'arbre + isCloseToSystray.Action.text = Fermer vers le systray isCloseToSystray.Action.shortDescription = R\u00E9duit l'application dans le systray au lieu de la fermer -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm