Skip to content

Commit

Permalink
Button Korrektur für alle Dialoge (#114)
Browse files Browse the repository at this point in the history
Buttons für alle Dialoge unter de.jost_net.JVerein.gui.dialogs angepasst:
- Großschrift
- Icons für Ok, Abbrechen etc. eingefügt
- Entfernen/Löschen Icon durch user-trash-full.png ersetzt. Dieses wird auch in Hibiscus dafür verwendet
  • Loading branch information
JohannMaierhofer authored Jan 23, 2024
1 parent 26b3d02 commit 11028df
Show file tree
Hide file tree
Showing 20 changed files with 89 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void handleAction(Object context)
{
close();
}
}, null, false, "window-close.png");
}, null, false, "process-stop.png");
b.paint(parent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package de.jost_net.JVerein.gui.dialogs;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
Expand Down Expand Up @@ -60,7 +61,7 @@ public BuchungsjournalSortDialog(int position)
super(position);

setTitle("Buchungsjournal-Sortierung");
setSize(300, 200);
setSize(300, 140);
}

@Override
Expand All @@ -69,22 +70,22 @@ protected void paint(Composite parent) throws Exception
LabelGroup options = new LabelGroup(parent, "Ihre Auswahl");
options.addInput(this.getSortierung());
ButtonArea b = new ButtonArea();
b.addButton("weiter", new Action()
b.addButton("Weiter", new Action()
{
@Override
public void handleAction(Object context)
{
close();
}
});
b.addButton("abbrechen", new Action()
}, null, false, "go-next.png");
b.addButton("Abbrechen", new Action()
{
@Override
public void handleAction(Object context)
{
throw new OperationCanceledException();
}
});
}, null, false, "process-stop.png");
b.paint(parent);
}

Expand Down
8 changes: 4 additions & 4 deletions src/de/jost_net/JVerein/gui/dialogs/DokumentDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected void paint(Composite parent) throws Exception
{
getPart().paint(parent);
ButtonArea b = new ButtonArea();
b.addButton("speichern", new Action()
b.addButton("Speichern", new Action()
{
@Override
public void handleAction(Object context)
Expand All @@ -70,15 +70,15 @@ public void handleAction(Object context)
}
close();
}
});
b.addButton("abbrechen", new Action()
}, null, true, "ok.png");
b.addButton("Abbrechen", new Action()
{
@Override
public void handleAction(Object context)
{
throw new OperationCanceledException();
}
});
}, null, false, "process-stop.png");
b.paint(parent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void handleAction(Object context)
}
close();
}
});
}, null, true, "ok.png");
buttons.paint(parent);
}

Expand Down
2 changes: 1 addition & 1 deletion src/de/jost_net/JVerein/gui/dialogs/ExportDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void handleAction(Object context)
{
close();
}
}, null, false, "stop-circle.png");
}, null, false, "process-stop.png");
group.addButtonArea(buttons);

getShell()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected void paint(Composite parent) throws Exception
lgBank.addLabelPair("BIC", control.getBic());
// lgBank.addLabelPair("Kontoinhaber", control.getKontoinhaber());
ButtonArea b = new ButtonArea();
b.addButton("weiter", new Action()
b.addButton("Weiter", new Action()
{

@Override
Expand Down Expand Up @@ -130,16 +130,16 @@ public void handleAction(Object context)
return;
}
}
});
b.addButton("abbrechen", new Action()
}, null, true, "go-next.png");
b.addButton("Abbrechen", new Action()
{

@Override
public void handleAction(Object context)
{
throw new OperationCanceledException();
}
});
}, null, false, "process-stop.png");
b.paint(parent);
}

Expand Down
2 changes: 1 addition & 1 deletion src/de/jost_net/JVerein/gui/dialogs/ImportDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void handleAction(Object context)
{
throw new OperationCanceledException();
}
}, null, false, "stop-circle.png");
}, null, false, "process-stop.png");
group.addButtonArea(buttons);
getShell()
.setMinimumSize(getShell().computeSize(WINDOW_WIDTH, SWT.DEFAULT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void handleAction(Object context)
ueberschr = true;
close();
}
}, null, false, "undo.png");
}, null, false, "user-trash-full.png");
buttons.addButton("Abbrechen", new Action()
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public MailEmpfaengerAuswahlDialog(MailControl control, int position)
super(position);
this.control = control;
setTitle("Mail-Empfänger");
setSize(1000, 450);
setSize(650, 450);
}

@Override
Expand Down Expand Up @@ -92,23 +92,17 @@ public void handleAction(Object context) throws ApplicationException
}
}
});

b.addButton("aktive Mitglieder", new Action()
b.addButton("Alle", new Action()
{
@Override
public void handleAction(Object context)
{
try
{
Date stichtag = new Date();
for (Object o : control.getMitgliedMitMail().getItems(false))
{
Mitglied m = (Mitglied) o;
if (m.getAdresstyp().getJVereinid() == 1
&& m.isAngemeldet(stichtag))
{
control.getMitgliedMitMail().setChecked(o, true);
}
control.getMitgliedMitMail().setChecked(o, true);
}
}
catch (RemoteException e)
Expand All @@ -118,22 +112,16 @@ public void handleAction(Object context)
}
});

b.addButton("inaktive Mitglieder", new Action()
b.addButton("Keinen", new Action()
{
@Override
public void handleAction(Object context)
{
try
{
Date stichtag = new Date();
for (Object o : control.getMitgliedMitMail().getItems(false))
{
Mitglied m = (Mitglied) o;
if (m.getAdresstyp().getJVereinid() == 1
&& !m.isAngemeldet(stichtag))
{
control.getMitgliedMitMail().setChecked(o, true);
}
control.getMitgliedMitMail().setChecked(o, false);
}
}
catch (RemoteException e)
Expand All @@ -142,18 +130,20 @@ public void handleAction(Object context)
}
}
});

b.addButton("alle Adressen", new Action()
b.addButton("Aktive Mitglieder", new Action()
{
@Override
public void handleAction(Object context)
{
try
{
Date stichtag = new Date();
for (Object o : control.getMitgliedMitMail().getItems(false))
{
Mitglied m = (Mitglied) o;
if (m.getAdresstyp().getJVereinid() != 1)
if (m.getAdresstyp().getJVereinid() == 1
&& m.isAngemeldet(stichtag))
{
control.getMitgliedMitMail().setChecked(o, true);
}
Expand All @@ -166,7 +156,7 @@ public void handleAction(Object context)
}
});

b.addButton("aktive Mitglieder und Adressen", new Action()
b.addButton("Inaktive Mitglieder", new Action()
{
@Override
public void handleAction(Object context)
Expand All @@ -177,9 +167,8 @@ public void handleAction(Object context)
for (Object o : control.getMitgliedMitMail().getItems(false))
{
Mitglied m = (Mitglied) o;
if (m.getAdresstyp().getJVereinid() != 1
|| (m.getAdresstyp().getJVereinid() == 1
&& m.isAngemeldet(stichtag)))
if (m.getAdresstyp().getJVereinid() == 1
&& !m.isAngemeldet(stichtag))
{
control.getMitgliedMitMail().setChecked(o, true);
}
Expand All @@ -192,10 +181,7 @@ public void handleAction(Object context)
}
});

b.paint(parent);

ButtonArea c = new ButtonArea();
c.addButton("alle", new Action()
b.addButton("Alle Adressen", new Action()
{
@Override
public void handleAction(Object context)
Expand All @@ -204,7 +190,11 @@ public void handleAction(Object context)
{
for (Object o : control.getMitgliedMitMail().getItems(false))
{
control.getMitgliedMitMail().setChecked(o, true);
Mitglied m = (Mitglied) o;
if (m.getAdresstyp().getJVereinid() != 1)
{
control.getMitgliedMitMail().setChecked(o, true);
}
}
}
catch (RemoteException e)
Expand All @@ -214,16 +204,23 @@ public void handleAction(Object context)
}
});

c.addButton("keinen", new Action()
b.addButton("Aktive Mitglieder und Adressen", new Action()
{
@Override
public void handleAction(Object context)
{
try
{
Date stichtag = new Date();
for (Object o : control.getMitgliedMitMail().getItems(false))
{
control.getMitgliedMitMail().setChecked(o, false);
Mitglied m = (Mitglied) o;
if (m.getAdresstyp().getJVereinid() != 1
|| (m.getAdresstyp().getJVereinid() == 1
&& m.isAngemeldet(stichtag)))
{
control.getMitgliedMitMail().setChecked(o, true);
}
}
}
catch (RemoteException e)
Expand All @@ -232,7 +229,11 @@ public void handleAction(Object context)
}
}
});
c.addButton("übernehmen", new Action()

b.paint(parent);

ButtonArea c = new ButtonArea();
c.addButton("Übernehmen", new Action()
{

@Override
Expand All @@ -255,16 +256,16 @@ public void handleAction(Object context)
}
close();
}
});
}, null, true, "ok.png");

c.addButton("abbrechen", new Action()
c.addButton("Abbrechen", new Action()
{
@Override
public void handleAction(Object context)
{
throw new OperationCanceledException();
}
});
}, null, false, "process-stop.png");

c.paint(parent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected void paint(Composite parent) throws Exception
control.getMailVorlageTable().paint(parent);

ButtonArea b = new ButtonArea();
b.addButton("verwenden", new Action()
b.addButton("Verwenden", new Action()
{

@Override
Expand All @@ -69,16 +69,16 @@ public void handleAction(Object context) throws ApplicationException
}
close();
}
});
b.addButton("ohne Mail-Vorlage", new Action()
}, null, true, "ok.png");
b.addButton("Ohne Mail-Vorlage", new Action()
{

@Override
public void handleAction(Object context)
{
close();
}
});
}, null, true, "go-next.png");
b.paint(parent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void handleAction(Object context)
{
close();
}
});
}, null, false, "process-stop.png");
b.paint(parent);
}

Expand Down
Loading

0 comments on commit 11028df

Please sign in to comment.