branch feature/sync updated (dd7a312 -> 9e7d6d2)
This is an automated email from the git hooks/post-receive script. New change to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git from dd7a312 corrected formatting and asserts new 1c61069 removed unreachable case new 9e7d6d2 changed component into scrollpane The 2 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 9e7d6d2779c08b0e63d5e1bb05c9b5962a3afdaf Author: servantie <servantie.c@gmail.com> Date: Mon Jul 25 13:53:36 2016 +0200 changed component into scrollpane commit 1c61069d1800ef314fca3fbcfe69cbdea05a9b7b Author: servantie <servantie.c@gmail.com> Date: Mon Jul 25 10:24:44 2016 +0200 removed unreachable case Summary of changes: .../chorem/jtimer/entities/TimerTaskHelper.java | 7 ++--- .../jtimer/ui/report/TimerTaskSyncInfoEditor.java | 36 +++++++++++++--------- 2 files changed, 24 insertions(+), 19 deletions(-) -- 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 feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 1c61069d1800ef314fca3fbcfe69cbdea05a9b7b Author: servantie <servantie.c@gmail.com> Date: Mon Jul 25 10:24:44 2016 +0200 removed unreachable case --- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 7 +++---- .../java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index c2cd0bc..cb36da5 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; +import org.apache.commons.lang3.time.DateUtils; import org.nuiton.util.DateUtil; /** @@ -347,7 +348,7 @@ public class TimerTaskHelper { */ public static List<JsonObject> taskToJSONFormat(TimerTask task, boolean withAnnotations, String timezone) { Date startDate = task.getAllDaysAndTimes().firstKey(); - Date endDate = DateUtil.createDateAfterToday(1,0,0); + Date endDate = DateUtils.ceiling(new Date(), Calendar.DAY_OF_MONTH); //get the current day too by making endDate a day later endDate.setTime(endDate.getTime()); List<JsonObject> resultingJSON = taskToJSONFormat(task, startDate, endDate, withAnnotations, timezone); @@ -448,9 +449,7 @@ public class TimerTaskHelper { JsonObject resultingObject = new JsonObject(); if (task.getAllDaysAndTimes().size() > 0) { Date startDate = task.getAllDaysAndTimes().firstKey(); - Date endDate = new Date(); - //get the current day too by making endDate a day later - endDate.setTime(endDate.getTime() + 86400 * 1000L); + Date endDate = DateUtils.ceiling(new Date(), Calendar.DAY_OF_MONTH); resultingObject = taskURLToJSONObject(task, url, startDate, endDate, withAnnotations, timezone); } return resultingObject; diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java index 76e5a2c..e2f7e29 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java @@ -305,9 +305,6 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener case 2: syncInfo.setWithAnnotations((Boolean) value); break; - case 3: - syncInfo.setWithAnnotations((Boolean) value); - break; } core.getData().syncInfoChanged(task, syncInfo); } -- 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 feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 9e7d6d2779c08b0e63d5e1bb05c9b5962a3afdaf Author: servantie <servantie.c@gmail.com> Date: Mon Jul 25 13:53:36 2016 +0200 changed component into scrollpane --- .../jtimer/ui/report/TimerTaskSyncInfoEditor.java | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java index e2f7e29..175c2c7 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java @@ -35,7 +35,10 @@ import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.JPanel; +import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.ScrollPaneConstants; +import javax.swing.ScrollPaneLayout; import javax.swing.table.AbstractTableModel; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableColumnModel; @@ -124,11 +127,11 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener */ protected JComponent getMainComponent() { - JPanel configComponent = new JPanel(); - configComponent.setLayout(new BorderLayout(5, 5)); + JScrollPane mainScrollPane = new JScrollPane(); + + JPanel mainPanel = new JPanel(); + mainPanel.setLayout(new BorderLayout(5, 5)); - JPanel urlPanel = new JPanel(); - urlPanel.setLayout(new BorderLayout(5, 5)); urlJTable = new JTable(new SyncInfoTableModel()); //try to have coherent width of columns @@ -136,13 +139,15 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener tableColModel.getColumn(0).setPreferredWidth(200); tableColModel.getColumn(1).setPreferredWidth(40); tableColModel.getColumn(2).setPreferredWidth(60); - tableColModel.getColumn(3).setPreferredWidth(200); + tableColModel.getColumn(3).setPreferredWidth(100); + //render the date properly tableColModel.getColumn(3).setCellRenderer(new DateRenderer()); //add the headers and the table + JPanel urlPanel = new JPanel(new BorderLayout()); urlPanel.add(urlJTable.getTableHeader(), BorderLayout.NORTH); - urlPanel.add(urlJTable, BorderLayout.CENTER); + urlPanel.add(urlJTable, BorderLayout.SOUTH); //panel to hold the buttons JPanel buttonPane = new JPanel(); @@ -163,21 +168,25 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener buttonPane.add(addButton); buttonPane.add(testSyncUrlButton); buttonPane.add(deleteButton); + // button to close JButton closeButton = new JButton(); closeButton.setAction(getContext().getActionMap(this).get("closeView")); //adding components to the main one - configComponent.add(urlPanel, BorderLayout.NORTH); - configComponent.add(buttonPane, BorderLayout.CENTER); - configComponent.add(closeButton, BorderLayout.SOUTH); + mainPanel.add(urlPanel, BorderLayout.NORTH); + mainPanel.add(buttonPane, BorderLayout.CENTER); + mainPanel.add(closeButton, BorderLayout.SOUTH); // color fix on linux ? - configComponent.setBackground(urlPanel.getBackground()); + mainPanel.setBackground(urlPanel.getBackground()); // set minimum size to prevent "packed size" (too big) - configComponent.setMinimumSize(new Dimension(100, 100)); + mainPanel.setMinimumSize(new Dimension(100, 100)); + + //adding the component to the viewport of the scrollpane + mainScrollPane.setViewportView(mainPanel); - return configComponent; + return mainScrollPane; } /** -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm