|
@@ -46,6 +46,7 @@ import javax.swing.JLabel;
|
46
|
46
|
import javax.swing.JMenuItem;
|
47
|
47
|
import javax.swing.JPanel;
|
48
|
48
|
import javax.swing.JPopupMenu;
|
|
49
|
+import javax.swing.JSeparator;
|
49
|
50
|
import javax.swing.JTextField;
|
50
|
51
|
|
51
|
52
|
import net.miginfocom.swing.MigLayout;
|
|
@@ -95,11 +96,11 @@ public class ListableConfigDialog extends JDialog implements ItemListener, KeyLi
|
95
|
96
|
this.parser = new ListableParser(sample.getClass());
|
96
|
97
|
|
97
|
98
|
this.retrievables = parser.getRetrievableNames();
|
98
|
|
-
|
|
99
|
+
|
99
|
100
|
this.configPanel = new JPanel(new MigLayout("fill", "[fill]"));
|
100
|
101
|
this.previewPanel = new JPanel(new MigLayout("fill", "[fill]", "[fill]"));
|
101
|
|
-
|
102
|
|
- configPanel.setBorder(BorderFactory.createTitledBorder("Configuration"));
|
|
102
|
+
|
|
103
|
+ configPanel.setBorder(BorderFactory.createTitledBorder("Information"));
|
103
|
104
|
previewPanel.setBorder(BorderFactory.createTitledBorder("Preview"));
|
104
|
105
|
|
105
|
106
|
this.panel = new ListablePanel(sample, parser, config);
|
|
@@ -123,6 +124,11 @@ public class ListableConfigDialog extends JDialog implements ItemListener, KeyLi
|
123
|
124
|
components.put("tr", getComponents(config.topRight));
|
124
|
125
|
components.put("bl", getComponents(config.bottomLeft));
|
125
|
126
|
components.put("br", getComponents(config.bottomRight));
|
|
127
|
+ components.put("group", getComponents(config.group));
|
|
128
|
+
|
|
129
|
+ for (int i = 0; i < config.sortOrder.length; i++) {
|
|
130
|
+ components.put("sort_" + i, getComponents(config.sortOrder[i]));
|
|
131
|
+ }
|
126
|
132
|
}
|
127
|
133
|
|
128
|
134
|
protected void layoutConfigPanel() {
|
|
@@ -131,6 +137,15 @@ public class ListableConfigDialog extends JDialog implements ItemListener, KeyLi
|
131
|
137
|
JButton addButton = new JButton("+");
|
132
|
138
|
addButton.addActionListener(new ButtonActionListener("tl"));
|
133
|
139
|
addButton.setMaximumSize(new Dimension(35, 100));
|
|
140
|
+ configPanel.add(new JLabel("Group by:", JLabel.RIGHT));
|
|
141
|
+ addComponents("group");
|
|
142
|
+ configPanel.add(addButton, "span, al right");
|
|
143
|
+
|
|
144
|
+ configPanel.add(new JSeparator(), "gaptop 10, gapbottom 10, newline, span, growx");
|
|
145
|
+
|
|
146
|
+ addButton = new JButton("+");
|
|
147
|
+ addButton.addActionListener(new ButtonActionListener("tl"));
|
|
148
|
+ addButton.setMaximumSize(new Dimension(35, 100));
|
134
|
149
|
configPanel.add(new JLabel("Top left:", JLabel.RIGHT));
|
135
|
150
|
addComponents("tl");
|
136
|
151
|
configPanel.add(addButton, "span, al right");
|
|
@@ -155,7 +170,7 @@ public class ListableConfigDialog extends JDialog implements ItemListener, KeyLi
|
155
|
170
|
configPanel.add(new JLabel("Bottom right:", JLabel.RIGHT), "newline");
|
156
|
171
|
addComponents("br");
|
157
|
172
|
configPanel.add(addButton, "span, al right");
|
158
|
|
-
|
|
173
|
+
|
159
|
174
|
configPanel.revalidate();
|
160
|
175
|
pack();
|
161
|
176
|
}
|