Skip to content

Commit 5a2e661

Browse files
Gerhard GenuitGerhard Genuit
authored andcommitted
changes in Anh49AbscheiderModel
1 parent 0a714f5 commit 5a2e661

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

src/de/bielefeld/umweltamt/aui/module/objektpanels/Anh49Panel.java

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private class Anh49AbscheiderModel extends ListTableModel {
134134
* "Abscheider", "Von", "Lage" und "Bemerkung".
135135
*/
136136
public Anh49AbscheiderModel() {
137-
super(new String[] {"Abscheider", "Von", "Lage", "Nenngröße", "Hersteller", "Bemerkung"},
137+
super(new String[] {"Nr", "Lage", "Nenngröße", "Hersteller", "Bemerkung"},
138138
false, true);
139139
}
140140

@@ -159,18 +159,15 @@ public Object getColumnValue(Object objectAtRow, int columnIndex) {
159159
tmp = details.getAbscheidernr();
160160
break;
161161
case 1:
162-
tmp = details.getVon();
163-
break;
164-
case 2:
165162
tmp = details.getLage();
166163
break;
167-
case 3:
164+
case 2:
168165
tmp = details.getNenngroesse();
169166
break;
170-
case 4:
167+
case 3:
171168
tmp = details.getHersteller();
172169
break;
173-
case 5:
170+
case 4:
174171
tmp = details.getBemerkung();
175172
break;
176173
default:
@@ -219,12 +216,13 @@ public Anh49Abscheiderdetails getRow(int rowIndex) {
219216
private final String AENDERUNGSGENEHMIGUNGSDATUM = "Änderungsgen.-datum:";
220217
private final String ABGEMELDET = "abgemeldet";
221218
private final String ABWASSERFREI = "abwasserfrei";
222-
private final String E_SATZUNG = "E-Satzung";
219+
private final String E_SATZUNG = "Überwachung nach E-Satzung";
223220
private final String SICHERHEITSABSCHEIDER = "Sicherheitsabscheider";
224221
private final String WIEDERVORLAGEDATUM = "Wiedervorlagedatum:";
225222
/* Widgets - bottom */
226223
private final String SPEICHERN = "Speichern";
227224

225+
private JButton neuerAbscheider = null;
228226
private JButton saveAnh49Button = null;
229227

230228
// Daten
@@ -359,7 +357,7 @@ public void mouseReleased(MouseEvent e) {
359357

360358
/* Bottom */
361359
builder.add(ComponentFactory.buildRightAlignedBar(
362-
getSaveAnh49Button()), cc.xyw(labelCol,
360+
getNeuerAbscheiderButton(), getSaveAnh49Button()), cc.xyw(labelCol,
363361
row, cols));
364362

365363
/* Right column */
@@ -543,15 +541,16 @@ private JTable getAbscheiderTabelle() {
543541
if (i == 0) {
544542
// Die erste Spalte soll zentriert sein...
545543
column.setCellRenderer(centeredRenderer);
546-
547-
column.setMaxWidth(100);
548-
column.setPreferredWidth(75);
544+
column.setMaxWidth(50);
545+
column.setPreferredWidth(30);
549546
} else if (i == 1) {
550-
// ... die zweite auch
551-
column.setCellRenderer(centeredRenderer);
552-
553-
column.setMaxWidth(80);
547+
column.setPreferredWidth(100);
548+
} else if (i == 2) {
554549
column.setPreferredWidth(60);
550+
} else if (i == 3) {
551+
column.setPreferredWidth(100);
552+
} else if (i == 4) {
553+
column.setPreferredWidth(100);
555554
}
556555
}
557556

@@ -755,6 +754,22 @@ public void completeObjekt() {
755754
}
756755
}
757756

757+
private JButton getNeuerAbscheiderButton() {
758+
if (this.neuerAbscheider == null) {
759+
this.neuerAbscheider = new JButton("Neuer Abscheider");
760+
761+
this.neuerAbscheider.addActionListener(new ActionListener() {
762+
@Override
763+
public void actionPerformed(ActionEvent e) {
764+
Anh49Abscheiderdetails neuerAbscheider = new Anh49Abscheiderdetails();
765+
neuerAbscheider.setAnh49Fachdaten(fachdaten);
766+
editAbscheider(neuerAbscheider);
767+
}
768+
});
769+
}
770+
return this.neuerAbscheider;
771+
}
772+
758773
private JButton getSaveAnh49Button() {
759774
if (this.saveAnh49Button == null) {
760775
this.saveAnh49Button = new JButton("Speichern");

0 commit comments

Comments
 (0)