|
|
|
@ -36,6 +36,8 @@ import de.srsoftware.belegscanner.Constants;
@@ -36,6 +36,8 @@ import de.srsoftware.belegscanner.Constants;
|
|
|
|
|
import de.srsoftware.tools.gui.DateChooser; |
|
|
|
|
import de.srsoftware.tools.gui.SelectComboBox; |
|
|
|
|
|
|
|
|
|
import static de.srsoftware.belegscanner.Application.*; |
|
|
|
|
|
|
|
|
|
public class Toolbar extends JPanel { |
|
|
|
|
|
|
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(Toolbar.class); |
|
|
|
@ -93,8 +95,8 @@ public class Toolbar extends JPanel {
@@ -93,8 +95,8 @@ public class Toolbar extends JPanel {
|
|
|
|
|
this.config = config; |
|
|
|
|
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
|
|
|
|
add(datePicker()); |
|
|
|
|
add(input("Kategorie",catPicker = categoryPicker(config))); |
|
|
|
|
add(input("Pfad",pathPicker = pathPicker())); |
|
|
|
|
add(input(t("Category"),catPicker = categoryPicker(config))); |
|
|
|
|
add(input(t("Path"),pathPicker = pathPicker())); |
|
|
|
|
addFormatSelector(); |
|
|
|
|
add(resolutionSelector()); |
|
|
|
|
add(scanButton()); |
|
|
|
@ -133,7 +135,7 @@ public class Toolbar extends JPanel {
@@ -133,7 +135,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
dummy.setLayout(new BorderLayout()); |
|
|
|
|
dummy.setMaximumSize(new Dimension(600, 40)); |
|
|
|
|
|
|
|
|
|
dummy.add(new JLabel("Breite: "),BorderLayout.WEST); |
|
|
|
|
dummy.add(new JLabel(t("width")+": "),BorderLayout.WEST); |
|
|
|
|
dummy.add(width = new JTextField(209+""),BorderLayout.CENTER); |
|
|
|
|
dummy.add(new JLabel("px"),BorderLayout.EAST); |
|
|
|
|
add(dummy); |
|
|
|
@ -142,7 +144,7 @@ public class Toolbar extends JPanel {
@@ -142,7 +144,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
dummy.setLayout(new BorderLayout()); |
|
|
|
|
dummy.setMaximumSize(new Dimension(600, 40)); |
|
|
|
|
|
|
|
|
|
dummy.add(new JLabel("Höhe: "),BorderLayout.WEST); |
|
|
|
|
dummy.add(new JLabel(t("height")+": "),BorderLayout.WEST); |
|
|
|
|
dummy.add(height = new JTextField(297+""),BorderLayout.CENTER); |
|
|
|
|
dummy.add(new JLabel("px"),BorderLayout.EAST); |
|
|
|
|
add(dummy); |
|
|
|
@ -260,7 +262,7 @@ public class Toolbar extends JPanel {
@@ -260,7 +262,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
|
|
|
|
|
private JPanel input(String caption, JComponent component) { |
|
|
|
|
component.setMaximumSize(new Dimension(600, 40)); |
|
|
|
|
component.setToolTipText("Drücken Sie Umschalt + Entf um einen Eintrag zu löschen"); |
|
|
|
|
component.setToolTipText(t("Press Shift + Delete to remove an entry.")); |
|
|
|
|
JPanel panel = new JPanel(); |
|
|
|
|
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); |
|
|
|
|
panel.add(new JLabel(caption+": ")); |
|
|
|
@ -274,7 +276,7 @@ public class Toolbar extends JPanel {
@@ -274,7 +276,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
JSONObject catInfo = cats.getJSONObject(catName); |
|
|
|
|
if (catInfo.has("path")) paths.add(catInfo.get("path")); |
|
|
|
|
} |
|
|
|
|
paths.add("$HOME/$JAHR/$MONAT-$TAG - $KATEGORIE"); |
|
|
|
|
paths.add("$"+t("HOME")+"/$"+t("YEAR")+"/$"+t("MONTH")+"-$"+t("DAY")+" - $"+t("CATEGORY")); |
|
|
|
|
return new SelectComboBox(paths).onUpdateText(this::updatePath); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|