|
@@ -58,12 +58,20 @@ public class ProfileManagerDialog extends StandardDialog {
|
58
|
58
|
private final JList<MutableProfile> profileList = new JList<>(new DefaultListModel<>());
|
59
|
59
|
/** List of nicknames for a profile. */
|
60
|
60
|
private final ReorderableJList<String> nicknames = new ReorderableJList<>();
|
|
61
|
+ /** List of highlights for a profile. */
|
|
62
|
+ private final ReorderableJList<String> highlights = new ReorderableJList<>();
|
61
|
63
|
/** Adds a new nickname to the active profile. */
|
62
|
64
|
private final JButton addNickname = new JButton("Add");
|
63
|
65
|
/** Edits the active nickname in the active profile. */
|
64
|
66
|
private final JButton editNickname = new JButton("Edit");
|
65
|
67
|
/** Deletes the selected nickname from the active profile. */
|
66
|
68
|
private final JButton deleteNickname = new JButton("Delete");
|
|
69
|
+ /** Adds a new highlight to the active profile. */
|
|
70
|
+ private final JButton addHighlight = new JButton("Add");
|
|
71
|
+ /** Edits the active highlight in the active profile. */
|
|
72
|
+ private final JButton editHighlight = new JButton("Edit");
|
|
73
|
+ /** Deletes the selected highlight from the active profile. */
|
|
74
|
+ private final JButton deleteHighlight = new JButton("Delete");
|
67
|
75
|
/** Edits the name of the active profile. */
|
68
|
76
|
private final JTextField name = new JTextField();
|
69
|
77
|
/** Edits the realname for the active profile. */
|
|
@@ -101,9 +109,10 @@ public class ProfileManagerDialog extends StandardDialog {
|
101
|
109
|
add(new TextLabel("Profiles describe the information needed to connect " +
|
102
|
110
|
"to a server. You can use a different profile for each " + "connection."),
|
103
|
111
|
"spanx 3");
|
104
|
|
- add(new JScrollPane(profileList), "spany 3, growy, " + "wmin 200, wmax 200");
|
105
|
|
- add(addProfile, "grow");
|
106
|
|
- add(deleteProfile, "grow, wrap");
|
|
112
|
+ add(new JScrollPane(profileList), "spany 7, split 3, growy, pushy, "
|
|
113
|
+ + "wmin 200, wmax 200");
|
|
114
|
+ add(addProfile, "growx");
|
|
115
|
+ add(deleteProfile, "growx, wrap");
|
107
|
116
|
add(new JLabel("Name: "), "align label, span 2, split 2, flowx, sgx label");
|
108
|
117
|
add(ValidationFactory
|
109
|
118
|
.getValidatorPanel(name, model.getSelectedProfileNameValidator(), iconManager),
|
|
@@ -123,6 +132,14 @@ public class ProfileManagerDialog extends StandardDialog {
|
123
|
132
|
add(new JLabel("Ident: "), "align label, span 2, split 2, flowx, sgx label");
|
124
|
133
|
add(ValidationFactory.getValidatorPanel(ident, model.getIdentValidator(), iconManager),
|
125
|
134
|
"growx, pushx, sgx textinput");
|
|
135
|
+ add(new JLabel("Highlight: "),
|
|
136
|
+ "align label, span 2, split 2, flowx, sgx label, aligny 50%");
|
|
137
|
+ add(ValidationFactory.getValidatorPanel(new JScrollPane(highlights), highlights,
|
|
138
|
+ model.getHighlightsValidator(), iconManager), "grow, push");
|
|
139
|
+ add(Box.createGlue(), "flowx, span 4, split 4, sgx label");
|
|
140
|
+ add(addHighlight, "grow");
|
|
141
|
+ add(editHighlight, "grow");
|
|
142
|
+ add(deleteHighlight, "grow");
|
126
|
143
|
add(getLeftButton(), "flowx, split 2, right, sg button");
|
127
|
144
|
add(getRightButton(), "right, sg button");
|
128
|
145
|
}
|
|
@@ -172,4 +189,20 @@ public class ProfileManagerDialog extends StandardDialog {
|
172
|
189
|
public JButton getDeleteProfile() {
|
173
|
190
|
return deleteProfile;
|
174
|
191
|
}
|
|
192
|
+
|
|
193
|
+ public ReorderableJList<String> getProfileHighlights() {
|
|
194
|
+ return highlights;
|
|
195
|
+ }
|
|
196
|
+
|
|
197
|
+ public JButton getProfileAddHighlight() {
|
|
198
|
+ return addHighlight;
|
|
199
|
+ }
|
|
200
|
+
|
|
201
|
+ public JButton getProfileEditHighlight() {
|
|
202
|
+ return editHighlight;
|
|
203
|
+ }
|
|
204
|
+
|
|
205
|
+ public JButton getProfileDeleteHighlight() {
|
|
206
|
+ return deleteHighlight;
|
|
207
|
+ }
|
175
|
208
|
}
|