|
|
|
@ -12,6 +12,7 @@ import java.util.HashMap;
@@ -12,6 +12,7 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.TreeSet; |
|
|
|
|
import java.util.Vector; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
@ -91,12 +92,14 @@ public class Toolbar extends JPanel {
@@ -91,12 +92,14 @@ public class Toolbar extends JPanel {
|
|
|
|
|
add(input("Pfad",pathPicker = pathPicker())); |
|
|
|
|
addFormatSelector(); |
|
|
|
|
add(scanButton()); |
|
|
|
|
add(externButton()); |
|
|
|
|
add(new JPanel()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addFormatSelector() { |
|
|
|
|
JPanel dummy = new JPanel(); |
|
|
|
|
dummy.setLayout(new BorderLayout()); |
|
|
|
|
dummy.setMaximumSize(new Dimension(600, 40)); |
|
|
|
|
|
|
|
|
|
dummy.add(new JLabel("Breite:"),BorderLayout.WEST); |
|
|
|
|
dummy.add(width = new JTextField(209+""),BorderLayout.CENTER); |
|
|
|
@ -105,6 +108,7 @@ public class Toolbar extends JPanel {
@@ -105,6 +108,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
|
|
|
|
|
dummy = new JPanel(); |
|
|
|
|
dummy.setLayout(new BorderLayout()); |
|
|
|
|
dummy.setMaximumSize(new Dimension(600, 40)); |
|
|
|
|
|
|
|
|
|
dummy.add(new JLabel("Höhe:"),BorderLayout.WEST); |
|
|
|
|
dummy.add(height = new JTextField(297+""),BorderLayout.CENTER); |
|
|
|
@ -184,12 +188,6 @@ public class Toolbar extends JPanel {
@@ -184,12 +188,6 @@ public class Toolbar extends JPanel {
|
|
|
|
|
date.addActionListener(ev -> dateListeners.forEach(listener -> listener.setDate(date.getSelectedDate()))); |
|
|
|
|
return date; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JButton externButton() { |
|
|
|
|
JButton btn = new JButton("extern öffnen"); |
|
|
|
|
return btn; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Date getDate() { |
|
|
|
|
return date.getSelectedDate(); |
|
|
|
@ -206,6 +204,7 @@ public class Toolbar extends JPanel {
@@ -206,6 +204,7 @@ public class Toolbar extends JPanel {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel input(String caption, Component component) { |
|
|
|
|
component.setMaximumSize(new Dimension(600, 40)); |
|
|
|
|
JPanel panel = new JPanel(); |
|
|
|
|
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS)); |
|
|
|
|
panel.add(new JLabel(caption+" ")); |
|
|
|
@ -258,8 +257,8 @@ public class Toolbar extends JPanel {
@@ -258,8 +257,8 @@ public class Toolbar extends JPanel {
|
|
|
|
|
path = prefix+"fields."+fieldName; |
|
|
|
|
|
|
|
|
|
JSONArray arr = config.getOrCreateArray(path); |
|
|
|
|
HashSet<Object> values = new HashSet<>(); |
|
|
|
|
arr.forEach(values::add); |
|
|
|
|
TreeSet<Object> values = new TreeSet<>(); |
|
|
|
|
arr.forEach(elem -> values.add(elem.toString().trim())); |
|
|
|
|
SelectComboBox selector = getSelector(additonalComponents.get(fieldName)); |
|
|
|
|
if (selector != null) selector.setElements(values); |
|
|
|
|
} |
|
|
|
|