|
|
|
@ -220,6 +220,16 @@ public class Toolbar extends JPanel {
@@ -220,6 +220,16 @@ public class Toolbar extends JPanel {
|
|
|
|
|
return date; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<Object> deleteValue(JSONArray arr, String tx) { |
|
|
|
|
for (int i = 0; i<arr.length(); i++) { |
|
|
|
|
if (arr.get(i).equals(tx)) { |
|
|
|
|
arr.remove(i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return arr.toList(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void dropCategory(String catName) { |
|
|
|
|
LOG.debug("dropCategory({})",catName); |
|
|
|
|
Object o = config.get("app.categories"); |
|
|
|
@ -234,6 +244,10 @@ public class Toolbar extends JPanel {
@@ -234,6 +244,10 @@ public class Toolbar extends JPanel {
|
|
|
|
|
return date.getSelectedDate(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getResolution() { |
|
|
|
|
return resolution; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public SelectComboBox getSelector(JPanel panel) { |
|
|
|
|
if (panel != null && panel.getComponentCount()>1) { |
|
|
|
@ -263,6 +277,10 @@ public class Toolbar extends JPanel {
@@ -263,6 +277,10 @@ public class Toolbar extends JPanel {
|
|
|
|
|
paths.add("$HOME/$JAHR/$MONAT-$TAG - $KATEGORIE"); |
|
|
|
|
return new SelectComboBox(paths).onUpdateText(this::updatePath); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void readyToScan(boolean val) { |
|
|
|
|
scanButton.setEnabled(val); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Component scanButton() { |
|
|
|
|
scanButton = new JButton("scannen!"); |
|
|
|
@ -274,9 +292,7 @@ public class Toolbar extends JPanel {
@@ -274,9 +292,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
scanListeners.forEach(l->l.actionPerformed(evt)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void readyToScanX(boolean val) { |
|
|
|
|
scanButton.setEnabled(val); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void updateCat(String newCat) { |
|
|
|
@ -313,15 +329,7 @@ public class Toolbar extends JPanel {
@@ -313,15 +329,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
} else LOG.debug("newCat is empty!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<Object> deleteValue(JSONArray arr, String tx) { |
|
|
|
|
for (int i = 0; i<arr.length(); i++) { |
|
|
|
|
if (arr.get(i).equals(tx)) { |
|
|
|
|
arr.remove(i); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return arr.toList(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void updateDimensions() { |
|
|
|
@ -348,7 +356,5 @@ public class Toolbar extends JPanel {
@@ -348,7 +356,5 @@ public class Toolbar extends JPanel {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getResolution() { |
|
|
|
|
return resolution; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|