/**
* @see de.willuhn.jameica.gui.dialogs.AbstractDialog#paint(org.eclipse.swt.widgets.Composite)
*/
protected void paint(Composite parent) throws Exception
{
SimpleContainer group = new SimpleContainer(parent);
group.addText(i18n.tr("Bitte drucken Sie den INI-Brief aus und senden Ihn unterschrieben an Ihre Bank.\n" +
"Nach der Freischaltung durch Ihr Geldinstitut kann dieser Schl�ssel verwendet werden."),true);
group.addHeadline(i18n.tr("Hashwert"));
group.addText(HBCIUtils.data2hex(iniletter.getKeyHashDisplay()).toUpperCase(),true,Color.ERROR);
group.addHeadline(i18n.tr("Exponent"));
group.addText(HBCIUtils.data2hex(iniletter.getKeyExponentDisplay()).toUpperCase(),true);
group.addHeadline(i18n.tr("Modulus"));
group.addText(HBCIUtils.data2hex(iniletter.getKeyModulusDisplay()).toUpperCase(),true);
Input printers = getPrinterList();
group.addText("\n",true);
group.addInput(printers);
group.addInput(getError());
ButtonArea buttons = new ButtonArea();
Button print = new Button(i18n.tr("Drucken"),new Action()
{
public void handleAction(Object context) throws ApplicationException
{
print();
close();
}
},null,true,"document-print.png");
print.setEnabled((printers instanceof SelectInput)); // Drucken nur moeglich, wenn Drucker vorhanden.
buttons.addButton(print);
buttons.addButton(i18n.tr("Speichern unter..."),new Action()
{
public void handleAction(Object context) throws ApplicationException
{
save();
}
},null,false,"document-save.png");
buttons.addButton(i18n.tr("Abbrechen"), new Action()
{
public void handleAction(Object context) throws ApplicationException
{
throw new OperationCanceledException("cancelled in ini letter dialog");
}
},null,false,"process-stop.png");
group.addButtonArea(buttons);
getShell().setMinimumSize(getShell().computeSize(WINDOW_WIDTH,SWT.DEFAULT));
}