Example usage for org.eclipse.jface.dialogs MessageDialog openQuestion

List of usage examples for org.eclipse.jface.dialogs MessageDialog openQuestion

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs MessageDialog openQuestion.

Prototype

public static boolean openQuestion(Shell parent, String title, String message) 

Source Link

Document

Convenience method to open a simple Yes/No question dialog.

Usage

From source file:at.rc.tacos.client.controller.PersonalDeleteEntryAction.java

License:Open Source License

@Override
public void run() {
    // the selection
    ISelection selection = viewer.getSelection();
    // get the selected entry
    RosterEntry entry = (RosterEntry) ((IStructuredSelection) selection).getFirstElement();
    // confirm the cancel
    boolean cancelConfirmed = MessageDialog.openQuestion(
            PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Dienstplaneintrag lschen",
            "Mchten Sie den Dienstplaneintrag wirklich lschen?");
    if (!cancelConfirmed)
        return;/*from www .j av a2 s . com*/

    // sign out the entry to reject assigned staff member from vehicle
    // get the hour and the minutes
    Calendar cal = Calendar.getInstance();
    // the hour and the minutes
    int hour = cal.get(Calendar.HOUR_OF_DAY);
    int minutes = cal.get(Calendar.MINUTE);

    // now set up a new calendar with the current time and overwrite the
    // minutes and the hours
    cal = Calendar.getInstance();
    cal.set(Calendar.HOUR_OF_DAY, hour);
    cal.set(Calendar.MINUTE, minutes);
    // send the update message
    entry.setRealEndOfWork(cal.getTimeInMillis());
    NetWrapper.getDefault().sendUpdateMessage(RosterEntry.ID, entry);

    // request to delete
    NetWrapper.getDefault().sendRemoveMessage(RosterEntry.ID, entry);
}

From source file:at.rc.tacos.client.controller.PersonalEditEntryAction.java

License:Open Source License

@Override
public void run() {
    // the selection
    ISelection selection = viewer.getSelection();
    // get the selected entry
    RosterEntry entry = (RosterEntry) ((IStructuredSelection) selection).getFirstElement();

    // check if the object is currenlty locked
    String resultLockMessage = LockManager.sendLock(RosterEntry.ID, entry.getRosterId());

    // check the result of the lock
    if (resultLockMessage != null) {
        boolean forceEdit = MessageDialog.openQuestion(Display.getCurrent().getActiveShell(),
                "Information: Eintrag wird bearbeitet",
                "Der Eintrag den Sie bearbeiten mchten wird bereits von " + resultLockMessage + " bearbeitet\n"
                        + "Ein gleichzeitiges Bearbeiten kann zu unerwarteten Fehlern fhren!\n\n"
                        + "Mchten Sie den Eintrag trotzdem bearbeiten?");
        if (!forceEdit)
            return;
        // logg the override of the lock
        String username = SessionManager.getInstance().getLoginInformation().getUsername();
        Activator.getDefault().log("Der Eintrag " + entry + " wird trotz Sperrung durch " + resultLockMessage
                + " von " + username + " bearbeitet", Status.WARNING);
    }/*  www . j a va  2 s. c  o  m*/

    // open the editor
    Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

    // get the parent and the window shell
    RosterEntryForm window = new RosterEntryForm(parent, entry);
    window.create();

    // get the shell and resize
    Shell myShell = window.getShell();
    myShell.setSize(540, 620);

    // calculate and draw centered
    Rectangle workbenchSize = parent.getBounds();
    Rectangle mySize = myShell.getBounds();
    int locationX, locationY;
    locationX = (workbenchSize.width - mySize.width) / 2 + workbenchSize.x;
    locationY = (workbenchSize.height - mySize.height) / 2 + workbenchSize.y;
    myShell.setLocation(locationX, locationY);

    // now open the window
    myShell.open();
    myShell.setVisible(true);
}

From source file:at.rc.tacos.client.controller.VehicleTableEditAction.java

License:Open Source License

/**
 * Shows the view to edit a vehicle// w w  w.j a v  a 2 s  .c om
 */
@Override
public void run() {
    // the selection
    ISelection selection = viewer.getSelection();
    // get the selected entry
    VehicleDetail vehicle = (VehicleDetail) ((IStructuredSelection) selection).getFirstElement();

    // check if the object is currenlty locked
    String resultLockMessage = LockManager.sendLock(VehicleDetail.ID, vehicle.getVehicleName());

    // check the result of the lock
    if (resultLockMessage != null) {
        boolean forceEdit = MessageDialog.openQuestion(Display.getCurrent().getActiveShell(),
                "Information: Eintrag wird bearbeitet",
                "Das Fahrzeug das Sie bearbeiten mchten wird bereits von " + resultLockMessage
                        + " bearbeitet\n"
                        + "Ein gleichzeitiges Bearbeiten kann zu unerwarteten Fehlern fhren!\n\n"
                        + "Mchten Sie den Eintrag trotzdem bearbeiten?");
        if (!forceEdit)
            return;
        // log the override of the lock
        String username = SessionManager.getInstance().getLoginInformation().getUsername();
        Activator.getDefault().log("Der Eintrag " + vehicle + " wird trotz Sperrung durch " + resultLockMessage
                + " von " + username + " bearbeitet", Status.WARNING);
    }

    // get the active shell
    Shell parent = PlatformUI.getWorkbench().getDisplay().getActiveShell();

    // create the window
    VehicleForm window = new VehicleForm(parent, vehicle);
    window.create();

    // get the shell and resize
    Shell myShell = window.getShell();
    myShell.setSize(500, 620);

    // calculate and draw centered
    Rectangle workbenchSize = parent.getBounds();
    Rectangle mySize = myShell.getBounds();
    int locationX, locationY;
    locationX = (workbenchSize.width - mySize.width) / 2 + workbenchSize.x;
    locationY = (workbenchSize.height - mySize.height) / 2 + workbenchSize.y;
    myShell.setLocation(locationX, locationY);

    // now open the window
    myShell.open();
}

From source file:at.rc.tacos.client.view.RosterEntryForm.java

License:Open Source License

@Override
public boolean close() {
    // check if the user wants to close the window
    if (getReturnCode() == CANCEL) {
        // confirm exit
        boolean exit = MessageDialog.openQuestion(getShell(), "Abbrechen", "Wollen Sie wirklich abbrechen?");
        // check the result
        if (!exit)
            return false;
    }// ww w.  j  ava2 s. co  m

    // remove the lock from the object
    if (!createNew)
        LockManager.removeLock(RosterEntry.ID, rosterEntry.getRosterId());

    // cleanup the listeners
    ModelFactory.getInstance().getStaffManager().removePropertyChangeListener(this);
    ModelFactory.getInstance().getLocationManager().removePropertyChangeListener(this);
    ModelFactory.getInstance().getJobList().removePropertyChangeListener(this);
    ModelFactory.getInstance().getServiceManager().removePropertyChangeListener(this);

    return super.close();
}

From source file:at.rc.tacos.client.view.TransportForm.java

License:Open Source License

/**
 * Creates the planing section//from  w ww. j a va2 s .  co  m
 */
private void createTransportSection(Composite parent) {
    client = new Composite(parent, SWT.NONE);
    client.setLayout(new FormLayout());
    // calendar
    dateTime = new DateTime(client, SWT.CALENDAR);
    final FormData fd_dateTime = new FormData();
    fd_dateTime.bottom = new FormAttachment(0, 160);
    fd_dateTime.top = new FormAttachment(0, 10);
    fd_dateTime.right = new FormAttachment(0, 187);
    fd_dateTime.left = new FormAttachment(0, 10);
    dateTime.setLayoutData(fd_dateTime);

    // group 'Transportdaten'
    transportdatenGroup = new Group(client, SWT.NONE);
    transportdatenGroup.setLayout(new FormLayout());
    final FormData fd_transportdatenGroup = new FormData();
    fd_transportdatenGroup.bottom = new FormAttachment(0, 160);
    fd_transportdatenGroup.top = new FormAttachment(0, 10);
    fd_transportdatenGroup.right = new FormAttachment(0, 1056);
    fd_transportdatenGroup.left = new FormAttachment(0, 194);
    transportdatenGroup.setLayoutData(fd_transportdatenGroup);
    transportdatenGroup.setForeground(Util.getColor(128, 128, 128));
    transportdatenGroup.setText("Transportdaten");

    final Label vonLabel = new Label(transportdatenGroup, SWT.NONE);
    vonLabel.setFont(CustomColors.SUBHEADER_FONT);
    final FormData fd_vonLabel = new FormData();
    fd_vonLabel.bottom = new FormAttachment(0, 42);
    fd_vonLabel.top = new FormAttachment(0, 29);
    fd_vonLabel.right = new FormAttachment(0, 32);
    fd_vonLabel.left = new FormAttachment(0, 7);

    vonLabel.setLayoutData(fd_vonLabel);
    vonLabel.setForeground(Util.getColor(0, 0, 255));
    vonLabel.setText("von:");

    textToStreet = new Text(transportdatenGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_comboNachStrasse = new FormData();
    fd_comboNachStrasse.right = new FormAttachment(0, 260);
    fd_comboNachStrasse.bottom = new FormAttachment(0, 74);
    fd_comboNachStrasse.top = new FormAttachment(0, 53);
    fd_comboNachStrasse.left = new FormAttachment(0, 38);
    textToStreet.setLayoutData(fd_comboNachStrasse);
    textToStreet.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            // no action when the enter key is pressed
            if (e.keyCode == 13) {
                e.doit = false;
                return;
            }
            // go to the next field when the tab is pressed
            if (e.keyCode == 9) {
                textToCity.setFocus();
                e.doit = false;
                return;
            }
            inputChanged(textToStreet.getText(), IFilterTypes.SEARCH_STRING_STREET);
        }
    });
    acToStreet = new AutoCompleteField(textToStreet, new TextContentAdapter(), new String[] {});

    final Button buttonAddressFrom = new Button(transportdatenGroup, SWT.NONE);
    final FormData fd_buttonAddressFrom = new FormData();
    fd_buttonAddressFrom.bottom = new FormAttachment(0, 47);
    fd_buttonAddressFrom.top = new FormAttachment(0, 26);
    fd_buttonAddressFrom.right = new FormAttachment(0, 452);
    fd_buttonAddressFrom.left = new FormAttachment(0, 422);
    buttonAddressFrom.setLayoutData(fd_buttonAddressFrom);
    buttonAddressFrom.setText("...");
    buttonAddressFrom.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            // setup and prepare the initial value
            String initStreetValue = textFromStreet.getText();
            String initCityValue = textFromCity.getText();

            // open the selection dialog to choose a address
            AddressSelectionDialog selectionDialog = new AddressSelectionDialog(initStreetValue, initCityValue,
                    getShell());
            selectionDialog.open();
            Address selectedAddress = (Address) selectionDialog.getResult()[0];

            // assert valid
            if (selectedAddress == null)
                return;

            // fill in the form fields
            if (selectedAddress.getStreet() != null)
                textFromStreet.setText(selectedAddress.getStreet());
            if (selectedAddress.getCity() != null)
                textFromCity.setText(selectedAddress.getCity());
        }
    });

    final Button buttonAddressTo = new Button(transportdatenGroup, SWT.NONE);
    final FormData fd_buttonAddressTo = new FormData();
    fd_buttonAddressTo.bottom = new FormAttachment(0, 74);
    fd_buttonAddressTo.top = new FormAttachment(0, 53);
    fd_buttonAddressTo.right = new FormAttachment(0, 452);
    fd_buttonAddressTo.left = new FormAttachment(0, 422);
    buttonAddressTo.setLayoutData(fd_buttonAddressTo);
    buttonAddressTo.setText("...");
    buttonAddressTo.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            // setup and prepare the initial value
            String initStreetValue = textToStreet.getText();
            String initCityValue = textToCity.getText();

            // open the selection dialog to choose a address
            AddressSelectionDialog selectionDialog = new AddressSelectionDialog(initStreetValue, initCityValue,
                    getShell());
            selectionDialog.open();
            Address selectedAddress = (Address) selectionDialog.getResult()[0];

            // assert valid
            if (selectedAddress == null)
                return;

            // fill in the form fields
            if (selectedAddress.getStreet() != null)
                textToStreet.setText(selectedAddress.getStreet());
            if (selectedAddress.getCity() != null)
                textToCity.setText(selectedAddress.getCity());
        }
    });

    textFromStreet = new Text(transportdatenGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_comboVonStrasse = new FormData();
    fd_comboVonStrasse.right = new FormAttachment(0, 260);
    fd_comboVonStrasse.bottom = new FormAttachment(0, 47);
    fd_comboVonStrasse.top = new FormAttachment(0, 26);
    fd_comboVonStrasse.left = new FormAttachment(0, 38);
    textFromStreet.setLayoutData(fd_comboVonStrasse);
    textFromStreet.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            // no action when the enter key is pressed
            if (e.keyCode == 13) {
                e.doit = false;
                return;
            }
            // go to the next field when the tab is pressed
            if (e.keyCode == 9) {
                textFromCity.setFocus();
                e.doit = false;
                return;
            }
            inputChanged(textFromStreet.getText(), IFilterTypes.SEARCH_STRING_STREET);
        }
    });
    acFromStreet = new AutoCompleteField(textFromStreet, new TextContentAdapter(), new String[] {});

    final Label nachLabel = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_nachLabel = new FormData();
    fd_nachLabel.bottom = new FormAttachment(0, 69);
    fd_nachLabel.top = new FormAttachment(0, 56);
    fd_nachLabel.right = new FormAttachment(0, 32);
    fd_nachLabel.left = new FormAttachment(0, 7);
    nachLabel.setLayoutData(fd_nachLabel);
    nachLabel.setForeground(Util.getColor(128, 128, 128));
    nachLabel.setText("nach:");

    final Label label = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_label = new FormData();
    fd_label.bottom = new FormAttachment(0, 20);
    fd_label.top = new FormAttachment(0, 7);
    fd_label.right = new FormAttachment(0, 94);
    fd_label.left = new FormAttachment(0, 38);
    label.setLayoutData(fd_label);
    label.setForeground(Util.getColor(128, 128, 128));
    label.setText("Strae");

    textFromCity = new Text(transportdatenGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_comboVonOrt = new FormData();
    fd_comboVonOrt.left = new FormAttachment(0, 264);
    fd_comboVonOrt.bottom = new FormAttachment(0, 47);
    fd_comboVonOrt.top = new FormAttachment(0, 26);
    fd_comboVonOrt.right = new FormAttachment(0, 420);
    textFromCity.setLayoutData(fd_comboVonOrt);
    textFromCity.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            // no action when the enter key is pressed
            if (e.keyCode == 13) {
                e.doit = false;
                return;
            }
            // go to the next field when the tab is pressed
            if (e.keyCode == 9) {
                patientLastName.setFocus();
                e.doit = false;
                return;
            }
            inputChanged(textFromCity.getText(), IFilterTypes.SEARCH_STRING_CITY);
        }
    });
    acFromCity = new AutoCompleteField(textFromCity, new TextContentAdapter(), new String[] {});

    textToCity = new Text(transportdatenGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_comboNachOrt = new FormData();
    fd_comboNachOrt.left = new FormAttachment(0, 264);
    fd_comboNachOrt.bottom = new FormAttachment(0, 74);
    fd_comboNachOrt.top = new FormAttachment(0, 53);
    fd_comboNachOrt.right = new FormAttachment(0, 420);
    textToCity.setLayoutData(fd_comboNachOrt);
    textToCity.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            // no action when the enter key is pressed
            if (e.keyCode == 13) {
                e.doit = false;
                return;
            }
            // go to the next field when the tab is pressed
            if (e.keyCode == 9) {
                ruecktransportMoeglichButton.setFocus();
                e.doit = false;
                return;
            }
            inputChanged(textToCity.getText(), IFilterTypes.SEARCH_STRING_CITY);
        }
    });
    acToCity = new AutoCompleteField(textToCity, new TextContentAdapter(), new String[] {});

    final Label ortLabel = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_ortLabel = new FormData();
    fd_ortLabel.bottom = new FormAttachment(0, 20);
    fd_ortLabel.top = new FormAttachment(0, 7);
    fd_ortLabel.right = new FormAttachment(0, 344);
    fd_ortLabel.left = new FormAttachment(0, 319);
    ortLabel.setLayoutData(fd_ortLabel);
    ortLabel.setForeground(Util.getColor(128, 128, 128));
    ortLabel.setText("Ort");

    patientLastName = new Text(transportdatenGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_comboNachname = new FormData();
    fd_comboNachname.bottom = new FormAttachment(0, 47);
    fd_comboNachname.top = new FormAttachment(0, 26);
    fd_comboNachname.right = new FormAttachment(0, 635);
    fd_comboNachname.left = new FormAttachment(0, 464);
    patientLastName.setLayoutData(fd_comboNachname);
    patientLastName.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            // no action when the enter key is pressed
            if (e.keyCode == 13) {
                e.doit = false;
                return;
            }
            // go to the next field when the tab is pressed
            if (e.keyCode == 9) {
                patientFirstName.setFocus();
                e.doit = false;
                return;
            }
        }
    });

    final Label nachnameLabel = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_nachnameLabel = new FormData();
    fd_nachnameLabel.bottom = new FormAttachment(0, 20);
    fd_nachnameLabel.top = new FormAttachment(0, 7);
    fd_nachnameLabel.right = new FormAttachment(0, 520);
    fd_nachnameLabel.left = new FormAttachment(0, 464);
    nachnameLabel.setLayoutData(fd_nachnameLabel);
    nachnameLabel.setForeground(Util.getColor(128, 128, 128));
    nachnameLabel.setText("Nachname");

    patientFirstName = new Text(transportdatenGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_vornameVorname = new FormData();
    fd_vornameVorname.bottom = new FormAttachment(0, 47);
    fd_vornameVorname.top = new FormAttachment(0, 26);
    fd_vornameVorname.right = new FormAttachment(0, 812);
    fd_vornameVorname.left = new FormAttachment(0, 641);
    patientFirstName.setLayoutData(fd_vornameVorname);
    patientFirstName.addKeyListener(new KeyAdapter() {

        @Override
        public void keyPressed(KeyEvent e) {
            // no action when the enter key is pressed
            if (e.keyCode == 13) {
                e.doit = false;
                return;
            }
            // go to the next field when the tab is pressed
            if (e.keyCode == 9) {
                combokindOfTransport.setFocus();
                e.doit = false;
                return;
            }
        }
    });

    final Button buttonPatientendatenPruefen = new Button(transportdatenGroup, SWT.NONE);
    final FormData fd_buttonPatientendatenPruefen = new FormData();
    fd_buttonPatientendatenPruefen.bottom = new FormAttachment(0, 47);
    fd_buttonPatientendatenPruefen.top = new FormAttachment(0, 24);
    fd_buttonPatientendatenPruefen.right = new FormAttachment(0, 850);
    fd_buttonPatientendatenPruefen.left = new FormAttachment(0, 818);
    buttonPatientendatenPruefen.setLayoutData(fd_buttonPatientendatenPruefen);
    buttonPatientendatenPruefen.setText("...");
    buttonPatientendatenPruefen.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            if (Login.AUTH_ADMIN.equalsIgnoreCase(authorization) && "journal".equalsIgnoreCase(editingType)) {
                if (patientLastName.getText() == null || patientLastName.getText().trim().isEmpty()) {
                    // getShell().getDisplay().beep();
                    setErrorMessage(
                            "Der Nachname kann beim Anlegen eines Patienten in der Patientendatenbank nicht leer gelassen werden.");
                    return;
                }

                // confirm the cancel
                boolean cancelConfirmed = MessageDialog.openQuestion(
                        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Patient hinzufgen",
                        "Mchten Sie diesen Patienten zur Patientendatenbank hinzufgen?");
                if (!cancelConfirmed)
                    return;

                // TODO: add the patient data as new sick person, but check
                // before!!
                SickPerson person = new SickPerson();
                person.setLastName(patientLastName.getText());
                person.setFirstName(patientFirstName.getText());
                person.setCityname(textFromCity.getText());
                person.setStreetname(textFromStreet.getText());
                person.setKindOfTransport(combokindOfTransport.getText());

                NetWrapper.getDefault().sendAddMessage(SickPerson.ID, person);
            } else {
                // open the selection dialog to choose a patient
                PatientSelectionDialog selectionDialog = new PatientSelectionDialog(patientLastName.getText(),
                        getShell());
                selectionDialog.open();
                SickPerson selectedPerson = (SickPerson) selectionDialog.getResult()[0];

                // assert valid
                if (selectedPerson == null)
                    return;

                if (selectedPerson.getFirstName() != null)
                    patientFirstName.setText(selectedPerson.getFirstName());
                if (selectedPerson.getLastName() != null)
                    patientLastName.setText(selectedPerson.getLastName());
                if (selectedPerson.getStreetname() != null)
                    textFromStreet.setText(selectedPerson.getStreetname());
                if (selectedPerson.getCityname() != null)
                    textFromCity.setText(selectedPerson.getCityname());
                if (selectedPerson.getKindOfTransport() != null)
                    combokindOfTransport.setText(selectedPerson.getKindOfTransport());
                if (selectedPerson.getNotes() != null)
                    textAnmerkungen.setText(selectedPerson.getNotes());
            }
        }
    });

    // no sick person editing from the journal transport form if the user is
    // a normal user
    if ("journal".equalsIgnoreCase(editingType))
        buttonPatientendatenPruefen.setEnabled(false);

    if (Login.AUTH_ADMIN.equalsIgnoreCase(authorization) && "journal".equalsIgnoreCase(editingType)) {
        buttonPatientendatenPruefen.setImage(ImageFactory.getInstance().getRegisteredImage("admin.patientAdd"));
        buttonPatientendatenPruefen.setEnabled(true);
    }

    final Label nachnameLabel_1 = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_nachnameLabel_1 = new FormData();
    fd_nachnameLabel_1.bottom = new FormAttachment(0, 20);
    fd_nachnameLabel_1.top = new FormAttachment(0, 7);
    fd_nachnameLabel_1.right = new FormAttachment(0, 697);
    fd_nachnameLabel_1.left = new FormAttachment(0, 641);
    nachnameLabel_1.setLayoutData(fd_nachnameLabel_1);
    nachnameLabel_1.setForeground(Util.getColor(128, 128, 128));
    nachnameLabel_1.setText("Vorname");

    final Label label_kind = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_label_kind = new FormData();
    fd_label_kind.left = new FormAttachment(0, 680);
    fd_label_kind.bottom = new FormAttachment(0, 69);
    fd_label_kind.top = new FormAttachment(0, 56);
    fd_label_kind.right = new FormAttachment(0, 752);
    label_kind.setLayoutData(fd_label_kind);
    label_kind.setText("Transportart:");

    combokindOfTransport = new Combo(transportdatenGroup, SWT.READ_ONLY);
    // set possible priorities
    String[] kindsOfTransport = { TRANSPORT_KIND_GEHEND, TRANSPORT_KIND_TRAGSESSEL, TRANSPORT_KIND_KRANKENTRAGE,
            TRANSPORT_KIND_ROLLSTUHL };
    combokindOfTransport.setItems(kindsOfTransport);

    final FormData fd_comboTransportKind = new FormData();
    fd_comboTransportKind.bottom = new FormAttachment(0, 74);
    fd_comboTransportKind.top = new FormAttachment(0, 53);
    fd_comboTransportKind.right = new FormAttachment(0, 850);
    fd_comboTransportKind.left = new FormAttachment(0, 753);
    combokindOfTransport.setLayoutData(fd_comboTransportKind);

    begleitpersonButton = new Button(transportdatenGroup, SWT.CHECK);
    final FormData fd_begleitpersonButton = new FormData();
    fd_begleitpersonButton.bottom = new FormAttachment(0, 116);
    fd_begleitpersonButton.top = new FormAttachment(0, 100);
    fd_begleitpersonButton.right = new FormAttachment(0, 583);
    fd_begleitpersonButton.left = new FormAttachment(0, 462);
    begleitpersonButton.setLayoutData(fd_begleitpersonButton);
    begleitpersonButton.setToolTipText("Begleitperson");
    begleitpersonButton.setText("Begleitperson");

    ruecktransportMoeglichButton = new Button(transportdatenGroup, SWT.CHECK);
    final FormData fd_button_1 = new FormData();
    fd_button_1.bottom = new FormAttachment(0, 96);
    fd_button_1.top = new FormAttachment(0, 80);
    fd_button_1.right = new FormAttachment(0, 159);
    fd_button_1.left = new FormAttachment(0, 38);
    ruecktransportMoeglichButton.setLayoutData(fd_button_1);
    ruecktransportMoeglichButton.setText("Rcktransport mglich");

    final Label anruferLabel = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_anruferLabel = new FormData();
    fd_anruferLabel.bottom = new FormAttachment(0, 95);
    fd_anruferLabel.top = new FormAttachment(0, 82);
    fd_anruferLabel.right = new FormAttachment(0, 657);
    fd_anruferLabel.left = new FormAttachment(0, 610);
    anruferLabel.setLayoutData(fd_anruferLabel);
    anruferLabel.setForeground(Util.getColor(128, 128, 128));
    anruferLabel.setText("Anrufer:");

    textAnrufer = new Text(transportdatenGroup, SWT.BORDER);
    final FormData fd_textAnrufer = new FormData();
    fd_textAnrufer.bottom = new FormAttachment(0, 97);
    fd_textAnrufer.top = new FormAttachment(0, 76);
    fd_textAnrufer.right = new FormAttachment(0, 850);
    fd_textAnrufer.left = new FormAttachment(0, 663);
    textAnrufer.setLayoutData(fd_textAnrufer);

    final Label telefonLabel = new Label(transportdatenGroup, SWT.NONE);
    final FormData fd_telefonLabel = new FormData();
    fd_telefonLabel.bottom = new FormAttachment(0, 115);
    fd_telefonLabel.top = new FormAttachment(0, 102);
    fd_telefonLabel.right = new FormAttachment(0, 657);
    fd_telefonLabel.left = new FormAttachment(0, 610);
    telefonLabel.setLayoutData(fd_telefonLabel);
    telefonLabel.setForeground(Util.getColor(128, 128, 128));
    telefonLabel.setText("Telefon:");

    textTelefonAnrufer = new Text(transportdatenGroup, SWT.BORDER);
    final FormData fd_textTelefonAnrufer = new FormData();
    fd_textTelefonAnrufer.bottom = new FormAttachment(0, 120);
    fd_textTelefonAnrufer.top = new FormAttachment(0, 99);
    fd_textTelefonAnrufer.right = new FormAttachment(0, 850);
    fd_textTelefonAnrufer.left = new FormAttachment(0, 663);
    textTelefonAnrufer.setLayoutData(fd_textTelefonAnrufer);

    rufhilfepatientButton = new Button(transportdatenGroup, SWT.CHECK);
    final FormData fd_rufhilfepatientButton = new FormData();
    fd_rufhilfepatientButton.bottom = new FormAttachment(0, 96);
    fd_rufhilfepatientButton.top = new FormAttachment(0, 80);
    fd_rufhilfepatientButton.right = new FormAttachment(0, 547);
    fd_rufhilfepatientButton.left = new FormAttachment(0, 462);
    rufhilfepatientButton.setLayoutData(fd_rufhilfepatientButton);
    rufhilfepatientButton.setText("Rufhilfepatient");

    final Label label_6 = new Label(transportdatenGroup, SWT.NONE);
    label_6.setFont(CustomColors.SUBHEADER_FONT);
    final FormData fd_label_6 = new FormData();
    fd_label_6.bottom = new FormAttachment(0, 122);
    fd_label_6.top = new FormAttachment(0, 105);
    fd_label_6.right = new FormAttachment(0, 315);
    fd_label_6.left = new FormAttachment(0, 200);
    label_6.setLayoutData(fd_label_6);
    label_6.setForeground(Util.getColor(0, 0, 255));
    label_6.setText("Zustndige Ortsstelle:");

    Combo comboZustaendigeOrtsstelle = new Combo(transportdatenGroup, SWT.READ_ONLY);
    zustaendigeOrtsstelle = new ComboViewer(comboZustaendigeOrtsstelle);
    zustaendigeOrtsstelle.setContentProvider(new StationContentProvider());
    zustaendigeOrtsstelle.setLabelProvider(new StationLabelProvider());
    zustaendigeOrtsstelle.setInput(ModelFactory.getInstance().getLocationManager());

    final FormData fd_comboZustaendigeOrtsstelle = new FormData();
    fd_comboZustaendigeOrtsstelle.bottom = new FormAttachment(0, 121);
    fd_comboZustaendigeOrtsstelle.top = new FormAttachment(0, 100);
    fd_comboZustaendigeOrtsstelle.right = new FormAttachment(0, 431);
    fd_comboZustaendigeOrtsstelle.left = new FormAttachment(0, 319);
    comboZustaendigeOrtsstelle.setLayoutData(fd_comboZustaendigeOrtsstelle);

    transportdatenGroup.setTabList(new Control[] { textFromStreet, textFromCity, patientLastName,
            patientFirstName, combokindOfTransport, textToStreet, textToCity, ruecktransportMoeglichButton,
            rufhilfepatientButton, begleitpersonButton, textAnrufer, textTelefonAnrufer,
            comboZustaendigeOrtsstelle });

    planungGroup = new Group(client, SWT.NONE);
    planungGroup.setLayout(new FormLayout());
    final FormData fd_planungGroup = new FormData();
    fd_planungGroup.bottom = new FormAttachment(0, 348);
    fd_planungGroup.top = new FormAttachment(0, 166);
    fd_planungGroup.right = new FormAttachment(0, 187);
    fd_planungGroup.left = new FormAttachment(0, 10);
    planungGroup.setLayoutData(fd_planungGroup);
    planungGroup.setText("Zeiten/Richtung");

    // group 'Zeiten/Richtung'
    final Label abfLabel = new Label(planungGroup, SWT.NONE);
    abfLabel.setFont(CustomColors.SUBHEADER_FONT);
    final FormData fd_abfLabel = new FormData();
    fd_abfLabel.bottom = new FormAttachment(0, 37);
    fd_abfLabel.top = new FormAttachment(0, 24);
    fd_abfLabel.right = new FormAttachment(0, 32);
    fd_abfLabel.left = new FormAttachment(0, 7);
    abfLabel.setLayoutData(fd_abfLabel);
    abfLabel.setForeground(Util.getColor(0, 0, 255));
    abfLabel.setText("Abf:");

    final Label beiPatLabel = new Label(planungGroup, SWT.NONE);
    final FormData fd_beiPatLabel = new FormData();
    fd_beiPatLabel.bottom = new FormAttachment(0, 64);
    fd_beiPatLabel.top = new FormAttachment(0, 51);
    fd_beiPatLabel.right = new FormAttachment(0, 32);
    fd_beiPatLabel.left = new FormAttachment(0, 7);
    beiPatLabel.setLayoutData(fd_beiPatLabel);
    beiPatLabel.setForeground(Util.getColor(128, 128, 128));
    beiPatLabel.setText("Pat.:");

    final Label terminLabel = new Label(planungGroup, SWT.NONE);
    final FormData fd_terminLabel = new FormData();
    fd_terminLabel.bottom = new FormAttachment(0, 91);
    fd_terminLabel.top = new FormAttachment(0, 78);
    fd_terminLabel.right = new FormAttachment(0, 35);
    fd_terminLabel.left = new FormAttachment(0, 7);
    terminLabel.setLayoutData(fd_terminLabel);
    terminLabel.setForeground(Util.getColor(128, 128, 128));
    terminLabel.setText("Term.");

    textBeiPat = new Text(planungGroup, SWT.BORDER);
    final FormData fd_textBeiPat = new FormData();
    fd_textBeiPat.bottom = new FormAttachment(0, 69);
    fd_textBeiPat.top = new FormAttachment(0, 48);
    fd_textBeiPat.right = new FormAttachment(0, 79);
    fd_textBeiPat.left = new FormAttachment(0, 38);
    textBeiPat.setLayoutData(fd_textBeiPat);
    textBeiPat.setToolTipText("Geplante Ankunftszeit beim Patienten");

    textTermin = new Text(planungGroup, SWT.BORDER);
    final FormData fd_textTermin = new FormData();
    fd_textTermin.bottom = new FormAttachment(0, 96);
    fd_textTermin.top = new FormAttachment(0, 75);
    fd_textTermin.right = new FormAttachment(0, 79);
    fd_textTermin.left = new FormAttachment(0, 38);
    textTermin.setLayoutData(fd_textTermin);
    textTermin.setToolTipText("Termin am Zielort");

    textAbf = new Text(planungGroup, SWT.BORDER);
    final FormData fd_textAbf = new FormData();
    fd_textAbf.bottom = new FormAttachment(0, 42);
    fd_textAbf.top = new FormAttachment(0, 21);
    fd_textAbf.right = new FormAttachment(0, 78);
    fd_textAbf.left = new FormAttachment(0, 37);
    textAbf.setLayoutData(fd_textAbf);
    textAbf.setToolTipText("Abfahrt des Fahrzeuges von der Ortsstelle");

    // 'Richtung'
    mariazellButton = new Button(planungGroup, SWT.RADIO);
    final FormData fd_mariazellButton = new FormData();
    mariazellButton.setLayoutData(fd_mariazellButton);
    mariazellButton.setText("Mariazell");

    wienButton = new Button(planungGroup, SWT.RADIO);
    fd_mariazellButton.bottom = new FormAttachment(wienButton, 16, SWT.BOTTOM);
    fd_mariazellButton.top = new FormAttachment(wienButton, 0, SWT.BOTTOM);
    fd_mariazellButton.right = new FormAttachment(wienButton, 71, SWT.LEFT);
    fd_mariazellButton.left = new FormAttachment(wienButton, 0, SWT.LEFT);
    final FormData fd_wienButton = new FormData();
    wienButton.setLayoutData(fd_wienButton);
    wienButton.setText("Wien");

    leobenButton = new Button(planungGroup, SWT.RADIO);
    fd_wienButton.bottom = new FormAttachment(leobenButton, 16, SWT.BOTTOM);
    fd_wienButton.top = new FormAttachment(leobenButton, 0, SWT.BOTTOM);
    fd_wienButton.right = new FormAttachment(leobenButton, 71, SWT.LEFT);
    fd_wienButton.left = new FormAttachment(leobenButton, 0, SWT.LEFT);
    final FormData fd_leobenButton = new FormData();
    leobenButton.setLayoutData(fd_leobenButton);
    leobenButton.setText("Leoben");

    grazButton = new Button(planungGroup, SWT.RADIO);
    fd_leobenButton.bottom = new FormAttachment(grazButton, 16, SWT.BOTTOM);
    fd_leobenButton.top = new FormAttachment(grazButton, 0, SWT.BOTTOM);
    fd_leobenButton.right = new FormAttachment(grazButton, 71, SWT.LEFT);
    fd_leobenButton.left = new FormAttachment(grazButton, 0, SWT.LEFT);
    final FormData fd_grazButton = new FormData();
    grazButton.setLayoutData(fd_grazButton);
    grazButton.setText("Graz");

    bruckButton = new Button(planungGroup, SWT.RADIO);
    final FormData fd_bezirkButton = new FormData();
    fd_bezirkButton.bottom = new FormAttachment(bruckButton, 16, SWT.BOTTOM);
    fd_bezirkButton.top = new FormAttachment(bruckButton, 0, SWT.BOTTOM);
    fd_bezirkButton.right = new FormAttachment(bruckButton, 77, SWT.LEFT);
    fd_bezirkButton.left = new FormAttachment(bruckButton, 0, SWT.LEFT);
    final FormData fd_bruckButton = new FormData();
    bruckButton.setLayoutData(fd_bruckButton);
    bruckButton.setText("Bruck");

    kapfenbergButton = new Button(planungGroup, SWT.RADIO);
    fd_grazButton.bottom = new FormAttachment(kapfenbergButton, 16, SWT.BOTTOM);
    fd_grazButton.top = new FormAttachment(kapfenbergButton, 0, SWT.BOTTOM);
    fd_grazButton.right = new FormAttachment(kapfenbergButton, 71, SWT.LEFT);
    fd_grazButton.left = new FormAttachment(kapfenbergButton, 0, SWT.LEFT);
    final FormData fd_kapfenbergButton = new FormData();
    fd_kapfenbergButton.bottom = new FormAttachment(0, 25);
    fd_kapfenbergButton.top = new FormAttachment(0, 39);
    fd_kapfenbergButton.right = new FormAttachment(0, 166);
    fd_kapfenbergButton.left = new FormAttachment(0, 95);
    kapfenbergButton.setLayoutData(fd_bezirkButton);
    kapfenbergButton.setText("Kapfenberg");

    Label label_2;
    label_2 = new Label(planungGroup, SWT.SEPARATOR);
    fd_bruckButton.bottom = new FormAttachment(label_2, 16, SWT.TOP);
    fd_bruckButton.top = new FormAttachment(label_2, 0, SWT.TOP);
    fd_bruckButton.right = new FormAttachment(label_2, 49, SWT.RIGHT);
    fd_bruckButton.left = new FormAttachment(label_2, 0, SWT.RIGHT);
    final FormData fd_label_2 = new FormData();
    fd_label_2.bottom = new FormAttachment(0, 159);
    fd_label_2.top = new FormAttachment(0, 20);
    fd_label_2.right = new FormAttachment(0, 94);
    fd_label_2.left = new FormAttachment(0, 81);
    label_2.setLayoutData(fd_label_2);

    fernfahrtButton = new Button(planungGroup, SWT.CHECK);
    final FormData fd_fernfahrtButton = new FormData();
    fd_fernfahrtButton.bottom = new FormAttachment(0, 143);
    fd_fernfahrtButton.top = new FormAttachment(0, 127);
    fd_fernfahrtButton.right = new FormAttachment(0, 80);
    fd_fernfahrtButton.left = new FormAttachment(0, 7);
    fernfahrtButton.setLayoutData(fd_fernfahrtButton);
    fernfahrtButton.setText("Fernfahrt");
    fernfahrtButton.setToolTipText("Fernfahrten sind lt. RKT deklariert");
    planungGroup.setTabList(new Control[] { textAbf, textBeiPat, textTermin, fernfahrtButton, bruckButton,
            kapfenbergButton, grazButton, leobenButton, wienButton, mariazellButton });

    // group 'Patientenzustand'
    patientenzustandGroup = new Group(client, SWT.NONE);
    patientenzustandGroup.setLayout(new FormLayout());
    final FormData fd_patientenzustandGroup = new FormData();
    fd_patientenzustandGroup.bottom = new FormAttachment(0, 348);
    fd_patientenzustandGroup.top = new FormAttachment(0, 166);
    fd_patientenzustandGroup.right = new FormAttachment(0, 870);
    fd_patientenzustandGroup.left = new FormAttachment(0, 194);
    patientenzustandGroup.setLayoutData(fd_patientenzustandGroup);
    patientenzustandGroup.setText("Patientenzustand");

    comboErkrankungVerletzung = new Combo(patientenzustandGroup, SWT.READ_ONLY);
    final FormData fd_comboErkrankungVerletzung = new FormData();
    fd_comboErkrankungVerletzung.bottom = new FormAttachment(0, 50);
    fd_comboErkrankungVerletzung.top = new FormAttachment(0, 29);
    fd_comboErkrankungVerletzung.right = new FormAttachment(0, 289);
    fd_comboErkrankungVerletzung.left = new FormAttachment(0, 7);
    comboErkrankungVerletzung.setLayoutData(fd_comboErkrankungVerletzung);
    setErkrVerl = new ComboViewer(comboErkrankungVerletzung);
    setErkrVerl.setContentProvider(new DiseaseContentProvider());
    setErkrVerl.setLabelProvider(new DiseaseLabelProvider());
    setErkrVerl.setInput(ModelFactory.getInstance().getDialyseManager());

    textAnmerkungen = new Text(patientenzustandGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_textAnmerkungen = new FormData();
    fd_textAnmerkungen.bottom = new FormAttachment(0, 159);
    fd_textAnmerkungen.top = new FormAttachment(0, 75);
    fd_textAnmerkungen.right = new FormAttachment(0, 289);
    fd_textAnmerkungen.left = new FormAttachment(0, 7);
    textAnmerkungen.setLayoutData(fd_textAnmerkungen);

    final Label erkrankungverletzungLabel = new Label(patientenzustandGroup, SWT.NONE);
    final FormData fd_erkrankungverletzungLabel = new FormData();
    fd_erkrankungverletzungLabel.bottom = new FormAttachment(0, 24);
    fd_erkrankungverletzungLabel.top = new FormAttachment(0, 11);
    fd_erkrankungverletzungLabel.right = new FormAttachment(0, 134);
    fd_erkrankungverletzungLabel.left = new FormAttachment(0, 7);
    erkrankungverletzungLabel.setLayoutData(fd_erkrankungverletzungLabel);
    erkrankungverletzungLabel.setForeground(Util.getColor(128, 128, 128));
    erkrankungverletzungLabel.setText("Erkrankung/Verletzung");

    final Label anmerkungenLabel = new Label(patientenzustandGroup, SWT.NONE);
    final FormData fd_anmerkungenLabel = new FormData();
    fd_anmerkungenLabel.bottom = new FormAttachment(0, 69);
    fd_anmerkungenLabel.top = new FormAttachment(0, 56);
    fd_anmerkungenLabel.right = new FormAttachment(0, 134);
    fd_anmerkungenLabel.left = new FormAttachment(0, 7);
    anmerkungenLabel.setLayoutData(fd_anmerkungenLabel);
    anmerkungenLabel.setForeground(Util.getColor(128, 128, 128));
    anmerkungenLabel.setText("Anmerkungen");

    textRueckmeldung = new Text(patientenzustandGroup, SWT.WRAP | SWT.MULTI | SWT.BORDER);
    final FormData fd_textRueckmeldung = new FormData();
    fd_textRueckmeldung.bottom = new FormAttachment(0, 159);
    fd_textRueckmeldung.top = new FormAttachment(0, 29);
    fd_textRueckmeldung.right = new FormAttachment(0, 666);
    fd_textRueckmeldung.left = new FormAttachment(0, 355);
    textRueckmeldung.setLayoutData(fd_textRueckmeldung);

    final Label label_3 = new Label(patientenzustandGroup, SWT.NONE);
    final FormData fd_label_3 = new FormData();
    fd_label_3.bottom = new FormAttachment(0, 24);
    fd_label_3.top = new FormAttachment(0, 11);
    fd_label_3.right = new FormAttachment(0, 518);
    fd_label_3.left = new FormAttachment(0, 355);
    label_3.setLayoutData(fd_label_3);
    label_3.setForeground(Util.getColor(128, 128, 128));
    label_3.setText("Rckmeldung");

    bd2Button = new Button(patientenzustandGroup, SWT.CHECK);
    final FormData fd_bd2Button = new FormData();
    fd_bd2Button.bottom = new FormAttachment(0, 25);
    fd_bd2Button.top = new FormAttachment(0, 9);
    fd_bd2Button.right = new FormAttachment(0, 666);
    fd_bd2Button.left = new FormAttachment(0, 623);
    bd2Button.setLayoutData(fd_bd2Button);
    bd2Button.setToolTipText("Sondersignal auf dem Weg zum Transportziel");
    bd2Button.setText("BD 2");

    bd1Button = new Button(patientenzustandGroup, SWT.CHECK);
    final FormData fd_bd1Button = new FormData();
    fd_bd1Button.bottom = new FormAttachment(0, 25);
    fd_bd1Button.top = new FormAttachment(0, 9);
    fd_bd1Button.right = new FormAttachment(0, 500);
    fd_bd1Button.left = new FormAttachment(0, 253);
    bd1Button.setLayoutData(fd_bd1Button);
    bd1Button.setToolTipText("Sondersignal auf dem Weg zum Einsatzort");
    bd1Button.setText("BD 1");

    comboPrioritaet = new Combo(patientenzustandGroup, SWT.READ_ONLY);
    comboPrioritaet.setToolTipText(
            "1 (NEF), 2 (Transport), 3 (Terminfahrt), 4 (Rcktransport), 5 (Heimtransport), 6 (Sonstiges), 7 (NEF extern)");

    // set possible priorities
    if (transportType.equalsIgnoreCase("prebooking"))
        comboPrioritaet.setItems(prebookingPriorities);
    if (transportType.equalsIgnoreCase("emergencyTransport") || transportType.equalsIgnoreCase("both"))
        comboPrioritaet.setItems(emergencyAndTransportPriorities);
    final FormData fd_comboPrioritaet = new FormData();
    fd_comboPrioritaet.bottom = new FormAttachment(0, 73);
    fd_comboPrioritaet.top = new FormAttachment(0, 52);
    fd_comboPrioritaet.right = new FormAttachment(0, 287);
    fd_comboPrioritaet.left = new FormAttachment(0, 193);
    comboPrioritaet.setLayoutData(fd_comboPrioritaet);

    comboPrioritaet.addSelectionListener(new SelectionAdapter() {

        int index;

        public void widgetSelected(final SelectionEvent e) {
            // set possible priorities
            index = comboPrioritaet.getSelectionIndex();
            if (index != -1)
                tmpPriority = comboPrioritaet.getItem(index);
            // automatically set bd1 and bd2 if the priority 1 NEF (A) is
            // choosen

            if (tmpPriority.equalsIgnoreCase("1 NEF")) {
                bd1Button.setSelection(true);
                bd2Button.setSelection(true);
            } else {
                bd1Button.setSelection(false);
                bd2Button.setSelection(false);
            }
        }
    });

    final Label label_4 = new Label(patientenzustandGroup, SWT.NONE);
    label_4.setFont(CustomColors.SUBHEADER_FONT);
    final FormData fd_label_4 = new FormData();
    fd_label_4.left = new FormAttachment(0, 135);
    fd_label_4.bottom = new FormAttachment(0, 69);
    fd_label_4.top = new FormAttachment(0, 56);
    fd_label_4.right = new FormAttachment(0, 255);
    label_4.setLayoutData(fd_label_4);
    label_4.setForeground(Util.getColor(0, 0, 255));
    label_4.setText("Prioritt:");
    patientenzustandGroup.setTabList(new Control[] { setErkrVerl.getControl(), bd1Button, comboPrioritaet,
            textAnmerkungen, textRueckmeldung, bd2Button });

    // group multi transport (only visible if the multi transport button was
    // pressed
    multiTransportGroup = new Group(client, SWT.NONE);
    multiTransportGroup.setLayout(new FormLayout());
    final FormData fd_multitransportGroup = new FormData();
    fd_multitransportGroup.right = new FormAttachment(0, 842);
    fd_multitransportGroup.bottom = new FormAttachment(0, 500);
    fd_multitransportGroup.top = new FormAttachment(0, 360);
    fd_multitransportGroup.left = new FormAttachment(0, 10);
    multiTransportGroup.setLayoutData(fd_multitransportGroup);
    multiTransportGroup.setText("Mehrfachtransport");
    multiTransportGroup.setVisible(false);
    createMultiTransportTable();

    // assign car group
    assignCarGroup = new Group(client, SWT.NONE);
    assignCarGroup.setLayout(new FormLayout());
    final FormData fd_assignCarGroup = new FormData();
    fd_assignCarGroup.right = new FormAttachment(0, 842);
    fd_assignCarGroup.bottom = new FormAttachment(0, 500);
    fd_assignCarGroup.top = new FormAttachment(0, 360);
    fd_assignCarGroup.left = new FormAttachment(0, 10);
    assignCarGroup.setLayoutData(fd_assignCarGroup);
    assignCarGroup.setText("Fahrzeug zuweisen");
    assignCarGroup.setVisible(false);
    createAssignCarTable();

    // group 'Alarmierung'
    planungGroup_1 = new Group(client, SWT.NONE);
    planungGroup_1.setLayout(new FormLayout());
    final FormData fd_planungGroup_1 = new FormData();
    fd_planungGroup_1.bottom = new FormAttachment(0, 348);
    fd_planungGroup_1.top = new FormAttachment(0, 166);
    fd_planungGroup_1.right = new FormAttachment(0, 1056);
    fd_planungGroup_1.left = new FormAttachment(0, 875);
    planungGroup_1.setLayoutData(fd_planungGroup_1);
    planungGroup_1.setText("Alarmierung");

    notarztButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_notarztButton = new FormData();
    fd_notarztButton.bottom = new FormAttachment(0, 19);
    fd_notarztButton.top = new FormAttachment(0, 3);
    fd_notarztButton.right = new FormAttachment(0, 88);
    fd_notarztButton.left = new FormAttachment(0, 5);
    notarztButton.setLayoutData(fd_notarztButton);
    notarztButton.setText("NA extern");
    notarztButton.setToolTipText("Externer! Notarzt fr diesen Transport alarmiert");
    notarztButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (notarztButton.getSelection())
                timestampNA.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampNA.setText("");
        }
    });

    rthButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_rthButton = new FormData();
    fd_rthButton.bottom = new FormAttachment(0, 40);
    fd_rthButton.top = new FormAttachment(0, 24);
    fd_rthButton.right = new FormAttachment(0, 88);
    fd_rthButton.left = new FormAttachment(0, 5);
    rthButton.setLayoutData(fd_rthButton);
    rthButton.setToolTipText("Hubschrauber");
    rthButton.setText("RTH");
    rthButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (rthButton.getSelection())
                timestampRTH.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampRTH.setText("");
        }
    });

    dfButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_dfButton = new FormData();
    fd_dfButton.bottom = new FormAttachment(0, 61);
    fd_dfButton.top = new FormAttachment(0, 45);
    fd_dfButton.right = new FormAttachment(0, 88);
    fd_dfButton.left = new FormAttachment(0, 5);
    dfButton.setLayoutData(fd_dfButton);
    dfButton.setText("DF/Inspektion");
    dfButton.setToolTipText("DF/Inspektionsdienst");
    dfButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (dfButton.getSelection())
                timestampDF.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampDF.setText("");
        }
    });

    brkdtButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_brkdtButton = new FormData();
    fd_brkdtButton.bottom = new FormAttachment(0, 82);
    fd_brkdtButton.top = new FormAttachment(0, 66);
    fd_brkdtButton.right = new FormAttachment(0, 88);
    fd_brkdtButton.left = new FormAttachment(0, 5);
    brkdtButton.setLayoutData(fd_brkdtButton);
    brkdtButton.setToolTipText("Bezirksrettungskommandant");
    brkdtButton.setText("BRKDT");
    brkdtButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (brkdtButton.getSelection())
                timestampBRKDT.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampBRKDT.setText("");
        }
    });

    feuerwehrButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_feuerwehrButton = new FormData();
    fd_feuerwehrButton.bottom = new FormAttachment(0, 103);
    fd_feuerwehrButton.top = new FormAttachment(0, 87);
    fd_feuerwehrButton.right = new FormAttachment(0, 88);
    fd_feuerwehrButton.left = new FormAttachment(0, 5);
    feuerwehrButton.setLayoutData(fd_feuerwehrButton);
    feuerwehrButton.setToolTipText("Feuerwehr");
    feuerwehrButton.setText("FW");
    feuerwehrButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (feuerwehrButton.getSelection())
                timestampFW.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampFW.setText("");
        }
    });

    polizeiButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_polizeiButton = new FormData();
    fd_polizeiButton.bottom = new FormAttachment(0, 124);
    fd_polizeiButton.top = new FormAttachment(0, 108);
    fd_polizeiButton.right = new FormAttachment(0, 88);
    fd_polizeiButton.left = new FormAttachment(0, 5);
    polizeiButton.setLayoutData(fd_polizeiButton);
    polizeiButton.setToolTipText("Polizei");
    polizeiButton.setText("Polizei");
    polizeiButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (polizeiButton.getSelection())
                timestampPolizei.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampPolizei.setText("");
        }
    });

    KITButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_KITButton = new FormData();
    fd_KITButton.bottom = new FormAttachment(0, 166);
    fd_KITButton.top = new FormAttachment(0, 150);
    fd_KITButton.right = new FormAttachment(0, 88);
    fd_KITButton.left = new FormAttachment(0, 5);
    KITButton.setLayoutData(fd_KITButton);
    KITButton.setToolTipText("Kriseninterventionsteam");
    KITButton.setText("KIT");
    KITButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (KITButton.getSelection())
                timestampKIT.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampKIT.setText("");
        }
    });

    bergrettungButton = new Button(planungGroup_1, SWT.CHECK);
    final FormData fd_bergrettungButton = new FormData();
    fd_bergrettungButton.bottom = new FormAttachment(0, 145);
    fd_bergrettungButton.top = new FormAttachment(0, 129);
    fd_bergrettungButton.right = new FormAttachment(0, 88);
    fd_bergrettungButton.left = new FormAttachment(0, 5);
    bergrettungButton.setLayoutData(fd_bergrettungButton);
    bergrettungButton.setText("Bergrettung");
    bergrettungButton.setToolTipText("Bergrettung");
    bergrettungButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            SimpleDateFormat sdf_dateTime = new SimpleDateFormat("dd.MM.yy HH:mm");
            Calendar cal = Calendar.getInstance();
            if (bergrettungButton.getSelection())
                timestampBergrettung.setText(sdf_dateTime.format(cal.getTime()));
            else
                timestampBergrettung.setText("");
        }
    });

    timestampNA = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampNA = new FormData();
    fd_timestampNA.bottom = new FormAttachment(0, 19);
    fd_timestampNA.top = new FormAttachment(0, 3);
    fd_timestampNA.right = new FormAttachment(0, 175);
    fd_timestampNA.left = new FormAttachment(0, 89);
    timestampNA.setLayoutData(fd_timestampNA);
    timestampNA.setToolTipText("Zeitpunkt des letzten Anhakens des Notarzt-Hkchens");

    timestampRTH = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampRTH = new FormData();
    fd_timestampRTH.bottom = new FormAttachment(0, 40);
    fd_timestampRTH.top = new FormAttachment(0, 24);
    fd_timestampRTH.right = new FormAttachment(0, 175);
    fd_timestampRTH.left = new FormAttachment(0, 89);
    timestampRTH.setLayoutData(fd_timestampRTH);
    timestampRTH.setToolTipText("Zeitpunkt des letzten Anhakens des Hubschrauber-Hkchens");

    timestampDF = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampDF = new FormData();
    fd_timestampDF.bottom = new FormAttachment(0, 61);
    fd_timestampDF.top = new FormAttachment(0, 45);
    fd_timestampDF.right = new FormAttachment(0, 175);
    fd_timestampDF.left = new FormAttachment(0, 89);
    timestampDF.setLayoutData(fd_timestampDF);
    timestampDF.setToolTipText("Zeitpunkt des letzten Anhakens des Dienstfhrenden/Insp.-Hkchens");

    timestampBRKDT = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampBRKDT = new FormData();
    fd_timestampBRKDT.bottom = new FormAttachment(0, 82);
    fd_timestampBRKDT.top = new FormAttachment(0, 66);
    fd_timestampBRKDT.right = new FormAttachment(0, 175);
    fd_timestampBRKDT.left = new FormAttachment(0, 89);
    timestampBRKDT.setLayoutData(fd_timestampBRKDT);
    timestampBRKDT.setToolTipText("Zeitpunkt des letzten Anhakens des Bezirksrettungskommandanten-Hkchens");

    timestampFW = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampFW = new FormData();
    fd_timestampFW.bottom = new FormAttachment(0, 103);
    fd_timestampFW.top = new FormAttachment(0, 87);
    fd_timestampFW.right = new FormAttachment(0, 175);
    fd_timestampFW.left = new FormAttachment(0, 89);
    timestampFW.setLayoutData(fd_timestampFW);
    timestampFW.setToolTipText("Zeitpunkt des letzten Anhakens des Feuerwehr-Hkchens");

    timestampPolizei = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampPolizei = new FormData();
    fd_timestampPolizei.bottom = new FormAttachment(0, 124);
    fd_timestampPolizei.top = new FormAttachment(0, 108);
    fd_timestampPolizei.right = new FormAttachment(0, 175);
    fd_timestampPolizei.left = new FormAttachment(0, 89);
    timestampPolizei.setLayoutData(fd_timestampPolizei);
    timestampPolizei.setToolTipText("Zeitpunkt des letzten Anhakens des Polizei-Hkchens");

    timestampBergrettung = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampBergrettung = new FormData();
    fd_timestampBergrettung.bottom = new FormAttachment(0, 145);
    fd_timestampBergrettung.top = new FormAttachment(0, 129);
    fd_timestampBergrettung.right = new FormAttachment(0, 175);
    fd_timestampBergrettung.left = new FormAttachment(0, 89);
    timestampBergrettung.setLayoutData(fd_timestampBergrettung);
    timestampBergrettung.setToolTipText("Zeitpunkt des letzten Anhakens des Bergrettung-Hkchens");

    timestampKIT = new Text(planungGroup_1, SWT.BORDER);
    final FormData fd_timestampKIT = new FormData();
    fd_timestampKIT.bottom = new FormAttachment(0, 166);
    fd_timestampKIT.top = new FormAttachment(0, 150);
    fd_timestampKIT.right = new FormAttachment(0, 175);
    fd_timestampKIT.left = new FormAttachment(0, 89);
    timestampKIT.setLayoutData(fd_timestampKIT);
    timestampKIT.setToolTipText("Zeitpunkt des letzten Anhakens des KIT-Hkchens");

    timestampNA.setEditable(false);
    timestampRTH.setEditable(false);
    timestampDF.setEditable(false);
    timestampBRKDT.setEditable(false);
    timestampFW.setEditable(false);
    timestampPolizei.setEditable(false);
    timestampBergrettung.setEditable(false);
    timestampKIT.setEditable(false);

    planungGroup_1.setTabList(new Control[] { notarztButton, rthButton, dfButton, brkdtButton, feuerwehrButton,
            polizeiButton, bergrettungButton, KITButton });

    final Label label_5 = new Label(client, SWT.SEPARATOR | SWT.HORIZONTAL);
    final FormData fd_label_5 = new FormData();
    fd_label_5.bottom = new FormAttachment(0, 367);
    fd_label_5.top = new FormAttachment(0, 354);
    fd_label_5.right = new FormAttachment(0, 1056);
    fd_label_5.left = new FormAttachment(0, 10);
    label_5.setLayoutData(fd_label_5);

    // group 'Transportdetails'
    transportdetailsGroup = new Group(client, SWT.NONE);
    transportdetailsGroup.setLayout(new FormLayout());
    final FormData fd_transportdetailsGroup = new FormData();
    fd_transportdetailsGroup.bottom = new FormAttachment(0, 501);
    fd_transportdetailsGroup.top = new FormAttachment(0, 373);
    fd_transportdetailsGroup.right = new FormAttachment(0, 187);
    fd_transportdetailsGroup.left = new FormAttachment(0, 10);
    transportdetailsGroup.setLayoutData(fd_transportdetailsGroup);
    transportdetailsGroup.setText("Transportdetails");

    final Label transportnumemmerLabel = new Label(transportdetailsGroup, SWT.NONE);
    final FormData fd_transportnumemmerLabel = new FormData();
    fd_transportnumemmerLabel.bottom = new FormAttachment(0, 27);
    fd_transportnumemmerLabel.top = new FormAttachment(0, 14);
    fd_transportnumemmerLabel.right = new FormAttachment(0, 54);
    fd_transportnumemmerLabel.left = new FormAttachment(0, 7);
    transportnumemmerLabel.setLayoutData(fd_transportnumemmerLabel);
    transportnumemmerLabel.setForeground(Util.getColor(128, 128, 128));
    transportnumemmerLabel.setText("Trsp.Nr.:");

    textTransportNummer = new Text(transportdetailsGroup, SWT.BORDER);
    final FormData fd_textTransportNummer = new FormData();
    fd_textTransportNummer.bottom = new FormAttachment(0, 32);
    fd_textTransportNummer.top = new FormAttachment(0, 11);
    fd_textTransportNummer.right = new FormAttachment(0, 158);
    fd_textTransportNummer.left = new FormAttachment(0, 60);
    textTransportNummer.setLayoutData(fd_textTransportNummer);
    textTransportNummer.setEditable(false);

    final Label ortsstelleLabel = new Label(transportdetailsGroup, SWT.NONE);
    final FormData fd_ortsstelleLabel = new FormData();
    fd_ortsstelleLabel.bottom = new FormAttachment(0, 54);
    fd_ortsstelleLabel.top = new FormAttachment(0, 41);
    fd_ortsstelleLabel.right = new FormAttachment(0, 57);
    fd_ortsstelleLabel.left = new FormAttachment(0, 7);
    ortsstelleLabel.setLayoutData(fd_ortsstelleLabel);
    ortsstelleLabel.setForeground(Util.getColor(25, 25, 112));
    ortsstelleLabel.setText("Ortsstelle:");

    textOrtsstelle = new Text(transportdetailsGroup, SWT.BORDER);
    final FormData fd_textOrtsstelle = new FormData();
    fd_textOrtsstelle.bottom = new FormAttachment(0, 59);
    fd_textOrtsstelle.top = new FormAttachment(0, 38);
    fd_textOrtsstelle.right = new FormAttachment(0, 158);
    fd_textOrtsstelle.left = new FormAttachment(0, 60);
    textOrtsstelle.setLayoutData(fd_textOrtsstelle);
    textOrtsstelle.setEditable(false);

    textFahrzeug = new Text(transportdetailsGroup, SWT.BORDER);
    final FormData fd_textFahrzeug = new FormData();
    fd_textFahrzeug.bottom = new FormAttachment(0, 86);
    fd_textFahrzeug.top = new FormAttachment(0, 65);
    fd_textFahrzeug.right = new FormAttachment(0, 158);
    fd_textFahrzeug.left = new FormAttachment(0, 60);
    textFahrzeug.setLayoutData(fd_textFahrzeug);
    textFahrzeug.setEditable(false);

    final Label farzeugLabel = new Label(transportdetailsGroup, SWT.NONE);
    final FormData fd_farzeugLabel = new FormData();
    fd_farzeugLabel.bottom = new FormAttachment(0, 81);
    fd_farzeugLabel.top = new FormAttachment(0, 68);
    fd_farzeugLabel.right = new FormAttachment(0, 57);
    fd_farzeugLabel.left = new FormAttachment(0, 7);
    farzeugLabel.setLayoutData(fd_farzeugLabel);
    farzeugLabel.setForeground(Util.getColor(128, 128, 128));
    farzeugLabel.setText("Fahrzeug:");
    transportdetailsGroup.setTabList(new Control[] { textTransportNummer, textOrtsstelle, textFahrzeug });

    // group 'Personal am Fahrzeug'
    personalAmFahrzeugGroup = new Group(client, SWT.NONE);
    personalAmFahrzeugGroup.setLayout(new FormLayout());
    final FormData fd_personalAmFahrzeugGroup = new FormData();
    fd_personalAmFahrzeugGroup.bottom = new FormAttachment(0, 501);
    fd_personalAmFahrzeugGroup.top = new FormAttachment(0, 373);
    fd_personalAmFahrzeugGroup.right = new FormAttachment(0, 483);
    fd_personalAmFahrzeugGroup.left = new FormAttachment(0, 194);
    personalAmFahrzeugGroup.setLayoutData(fd_personalAmFahrzeugGroup);
    personalAmFahrzeugGroup.setText("Personal am Fahrzeug");

    Combo textFahrer = new Combo(personalAmFahrzeugGroup, SWT.BORDER);
    final FormData fd_textFahrer = new FormData();
    fd_textFahrer.bottom = new FormAttachment(0, 32);
    fd_textFahrer.top = new FormAttachment(0, 11);
    fd_textFahrer.right = new FormAttachment(0, 276);
    fd_textFahrer.left = new FormAttachment(0, 73);
    textFahrer.setLayoutData(fd_textFahrer);
    setTextFahrer = new ComboViewer(textFahrer);
    setTextFahrer.setContentProvider(new StaffMemberContentProvider());
    setTextFahrer.setLabelProvider(new StaffMemberLabelProvider());
    setTextFahrer.setInput(ModelFactory.getInstance().getStaffManager());

    Combo textSaniI = new Combo(personalAmFahrzeugGroup, SWT.BORDER);
    final FormData fd_textSnaniI = new FormData();
    fd_textSnaniI.bottom = new FormAttachment(0, 59);
    fd_textSnaniI.top = new FormAttachment(0, 38);
    fd_textSnaniI.right = new FormAttachment(0, 276);
    fd_textSnaniI.left = new FormAttachment(0, 73);
    textSaniI.setLayoutData(fd_textSnaniI);
    setTextSaniI = new ComboViewer(textSaniI);
    setTextSaniI.setContentProvider(new StaffMemberContentProvider());
    setTextSaniI.setLabelProvider(new StaffMemberLabelProvider());
    setTextSaniI.setInput(ModelFactory.getInstance().getStaffManager());

    Combo textSaniII = new Combo(personalAmFahrzeugGroup, SWT.BORDER);
    final FormData fd_textSaniII = new FormData();
    fd_textSaniII.bottom = new FormAttachment(0, 86);
    fd_textSaniII.top = new FormAttachment(0, 65);
    fd_textSaniII.right = new FormAttachment(0, 276);
    fd_textSaniII.left = new FormAttachment(0, 73);
    textSaniII.setLayoutData(fd_textSaniII);
    setTextSaniII = new ComboViewer(textSaniII);
    setTextSaniII.setContentProvider(new StaffMemberContentProvider());
    setTextSaniII.setLabelProvider(new StaffMemberLabelProvider());
    setTextSaniII.setInput(ModelFactory.getInstance().getServiceManager());

    final Label driverLabel = new Label(personalAmFahrzeugGroup, SWT.NONE);
    final FormData fd_driverLabel = new FormData();
    fd_driverLabel.bottom = new FormAttachment(0, 27);
    fd_driverLabel.top = new FormAttachment(0, 14);
    fd_driverLabel.right = new FormAttachment(0, 54);
    fd_driverLabel.left = new FormAttachment(0, 7);
    driverLabel.setLayoutData(fd_driverLabel);
    driverLabel.setForeground(Util.getColor(128, 128, 128));
    driverLabel.setText("Fahrer:");

    final Label paramedicILabel = new Label(personalAmFahrzeugGroup, SWT.NONE);
    final FormData fd_paramedicILabel = new FormData();
    fd_paramedicILabel.bottom = new FormAttachment(0, 54);
    fd_paramedicILabel.top = new FormAttachment(0, 41);
    fd_paramedicILabel.right = new FormAttachment(0, 68);
    fd_paramedicILabel.left = new FormAttachment(0, 7);
    paramedicILabel.setLayoutData(fd_paramedicILabel);
    paramedicILabel.setForeground(Util.getColor(128, 128, 128));
    paramedicILabel.setText("Sanitter I:");

    final Label paramedicIILabel = new Label(personalAmFahrzeugGroup, SWT.NONE);
    final FormData fd_paramedicIILabel = new FormData();
    fd_paramedicIILabel.bottom = new FormAttachment(0, 81);
    fd_paramedicIILabel.top = new FormAttachment(0, 68);
    fd_paramedicIILabel.right = new FormAttachment(0, 68);
    fd_paramedicIILabel.left = new FormAttachment(0, 7);
    paramedicIILabel.setLayoutData(fd_paramedicIILabel);
    paramedicIILabel.setForeground(Util.getColor(128, 128, 128));
    paramedicIILabel.setText("Sanitter II:");
    personalAmFahrzeugGroup.setTabList(new Control[] { textFahrer, textSaniI, textSaniII });

    // group 'Statusmeldungen'
    statusmeldungenGroup = new Group(client, SWT.NONE);
    statusmeldungenGroup.setLayout(new FormLayout());
    final FormData fd_statusmeldungenGroup = new FormData();
    fd_statusmeldungenGroup.bottom = new FormAttachment(0, 501);
    fd_statusmeldungenGroup.top = new FormAttachment(0, 373);
    fd_statusmeldungenGroup.right = new FormAttachment(0, 843);
    fd_statusmeldungenGroup.left = new FormAttachment(0, 489);
    statusmeldungenGroup.setLayoutData(fd_statusmeldungenGroup);
    statusmeldungenGroup.setText("Statusmeldungen");

    textAufgen = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textAufgen = new FormData();
    fd_textAufgen.bottom = new FormAttachment(0, 32);
    fd_textAufgen.top = new FormAttachment(0, 11);
    fd_textAufgen.right = new FormAttachment(0, 85);
    fd_textAufgen.left = new FormAttachment(0, 44);
    textAufgen.setLayoutData(fd_textAufgen);

    textAufgen.setEditable(false);

    final Label aufgLabel = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_aufgLabel = new FormData();
    fd_aufgLabel.bottom = new FormAttachment(0, 26);
    fd_aufgLabel.top = new FormAttachment(0, 13);
    fd_aufgLabel.right = new FormAttachment(0, 43);
    fd_aufgLabel.left = new FormAttachment(0, 12);
    aufgLabel.setLayoutData(fd_aufgLabel);
    aufgLabel.setForeground(Util.getColor(128, 128, 128));
    aufgLabel.setText("Aufg.:");

    textAE = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textAE = new FormData();
    fd_textAE.bottom = new FormAttachment(0, 59);
    fd_textAE.top = new FormAttachment(0, 38);
    fd_textAE.right = new FormAttachment(0, 85);
    fd_textAE.left = new FormAttachment(0, 44);
    textAE.setLayoutData(fd_textAE);

    final Label aeLabel = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_aeLabel = new FormData();
    fd_aeLabel.bottom = new FormAttachment(0, 58);
    fd_aeLabel.top = new FormAttachment(0, 45);
    fd_aeLabel.right = new FormAttachment(0, 43);
    fd_aeLabel.left = new FormAttachment(0, 12);
    aeLabel.setLayoutData(fd_aeLabel);
    aeLabel.setForeground(Util.getColor(128, 128, 128));
    aeLabel.setText("AE:");

    textS1 = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textS1 = new FormData();
    fd_textS1.bottom = new FormAttachment(0, 32);
    fd_textS1.top = new FormAttachment(0, 11);
    fd_textS1.right = new FormAttachment(0, 173);
    fd_textS1.left = new FormAttachment(0, 132);
    textS1.setLayoutData(fd_textS1);

    final Label ts1Label = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_ts1Label = new FormData();
    fd_ts1Label.bottom = new FormAttachment(0, 26);
    fd_ts1Label.top = new FormAttachment(0, 13);
    fd_ts1Label.right = new FormAttachment(0, 141);
    fd_ts1Label.left = new FormAttachment(0, 110);
    ts1Label.setLayoutData(fd_ts1Label);
    ts1Label.setForeground(Util.getColor(128, 128, 128));
    ts1Label.setText("S1:");

    textS2 = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textS2 = new FormData();
    fd_textS2.bottom = new FormAttachment(0, 59);
    fd_textS2.top = new FormAttachment(0, 38);
    fd_textS2.right = new FormAttachment(0, 173);
    fd_textS2.left = new FormAttachment(0, 132);
    textS2.setLayoutData(fd_textS2);

    final Label ts2Label = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_ts2Label = new FormData();
    fd_ts2Label.bottom = new FormAttachment(0, 59);
    fd_ts2Label.top = new FormAttachment(0, 46);
    fd_ts2Label.right = new FormAttachment(0, 141);
    fd_ts2Label.left = new FormAttachment(0, 110);
    ts2Label.setLayoutData(fd_ts2Label);
    ts2Label.setForeground(Util.getColor(128, 128, 128));
    ts2Label.setText("S2:");

    textS3 = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textS3 = new FormData();
    fd_textS3.bottom = new FormAttachment(0, 86);
    fd_textS3.top = new FormAttachment(0, 65);
    fd_textS3.right = new FormAttachment(0, 173);
    fd_textS3.left = new FormAttachment(0, 132);
    textS3.setLayoutData(fd_textS3);

    final Label ts3Label = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_ts3Label = new FormData();
    fd_ts3Label.bottom = new FormAttachment(0, 86);
    fd_ts3Label.top = new FormAttachment(0, 73);
    fd_ts3Label.right = new FormAttachment(0, 141);
    fd_ts3Label.left = new FormAttachment(0, 110);
    ts3Label.setLayoutData(fd_ts3Label);
    ts3Label.setForeground(Util.getColor(128, 128, 128));
    ts3Label.setText("S3:");

    textS4 = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textS4 = new FormData();
    fd_textS4.bottom = new FormAttachment(0, 32);
    fd_textS4.top = new FormAttachment(0, 11);
    fd_textS4.right = new FormAttachment(0, 255);
    fd_textS4.left = new FormAttachment(0, 214);
    textS4.setLayoutData(fd_textS4);

    final Label ts4Label = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_ts4Label = new FormData();
    fd_ts4Label.bottom = new FormAttachment(0, 27);
    fd_ts4Label.top = new FormAttachment(0, 14);
    fd_ts4Label.right = new FormAttachment(0, 213);
    fd_ts4Label.left = new FormAttachment(0, 195);
    ts4Label.setLayoutData(fd_ts4Label);
    ts4Label.setForeground(Util.getColor(128, 128, 128));
    ts4Label.setText("S4:");

    textS5 = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textS5 = new FormData();
    fd_textS5.bottom = new FormAttachment(0, 59);
    fd_textS5.top = new FormAttachment(0, 38);
    fd_textS5.right = new FormAttachment(0, 255);
    fd_textS5.left = new FormAttachment(0, 214);
    textS5.setLayoutData(fd_textS5);

    final Label ts5Label = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_ts5Label = new FormData();
    fd_ts5Label.bottom = new FormAttachment(0, 54);
    fd_ts5Label.top = new FormAttachment(0, 41);
    fd_ts5Label.right = new FormAttachment(0, 213);
    fd_ts5Label.left = new FormAttachment(0, 195);
    ts5Label.setLayoutData(fd_ts5Label);
    ts5Label.setForeground(Util.getColor(128, 128, 128));
    ts5Label.setText("S5:");

    textS6 = new Text(statusmeldungenGroup, SWT.BORDER);
    final FormData fd_textS6 = new FormData();
    fd_textS6.bottom = new FormAttachment(0, 86);
    fd_textS6.top = new FormAttachment(0, 65);
    fd_textS6.right = new FormAttachment(0, 255);
    fd_textS6.left = new FormAttachment(0, 214);
    textS6.setLayoutData(fd_textS6);

    final Label ts6Label = new Label(statusmeldungenGroup, SWT.NONE);
    final FormData fd_ts6Label = new FormData();
    fd_ts6Label.bottom = new FormAttachment(0, 81);
    fd_ts6Label.top = new FormAttachment(0, 68);
    fd_ts6Label.right = new FormAttachment(0, 213);
    fd_ts6Label.left = new FormAttachment(0, 195);
    ts6Label.setLayoutData(fd_ts6Label);
    ts6Label.setForeground(Util.getColor(128, 128, 128));
    ts6Label.setText("S6:");

    // set uninteresting groups invisible
    if ("prebooking".equalsIgnoreCase(transportType)) {
        transportdetailsGroup.setVisible(false);
        statusmeldungenGroup.setVisible(false);
        personalAmFahrzeugGroup.setVisible(false);
        planungGroup_1.setVisible(false);
    }

    if ("emergencyTransport".equalsIgnoreCase(transportType)) {
        transportdetailsGroup.setVisible(false);
        statusmeldungenGroup.setVisible(false);
        personalAmFahrzeugGroup.setVisible(false);
        planungGroup.setVisible(false);
        // set dateTime to default and disable editing
        GregorianCalendar gcal = new GregorianCalendar();
        dateTime.setDay(gcal.get(GregorianCalendar.DATE));
        dateTime.setMonth(gcal.get(GregorianCalendar.MONTH));
        dateTime.setYear(gcal.get(GregorianCalendar.YEAR));
        dateTime.setEnabled(false);
    }

    if ("journal".equalsIgnoreCase(editingType)) {
        transportdetailsGroup.setVisible(true);
        statusmeldungenGroup.setVisible(true);
        personalAmFahrzeugGroup.setVisible(true);
    } else if ("both".equalsIgnoreCase(transportType))// in the case of
    // editing a transport
    // from the following
    // views:
    // UnderwayTransportsView,
    // OutstandingTransportsView,
    // PrebookingView
    {
        transportdetailsGroup.setVisible(false);
        statusmeldungenGroup.setVisible(false);
        personalAmFahrzeugGroup.setVisible(false);

        planungGroup.setVisible(true);
        planungGroup_1.setVisible(true);
    } else {
        transportdetailsGroup.setVisible(false);
        statusmeldungenGroup.setVisible(false);
        personalAmFahrzeugGroup.setVisible(false);
    }

    // transport type selection buttons
    formGroup = new Group(client, SWT.NONE);
    formGroup.setLayout(new FormLayout());
    final FormData fd_group = new FormData();
    fd_group.bottom = new FormAttachment(0, 501);
    fd_group.top = new FormAttachment(0, 373);
    fd_group.right = new FormAttachment(0, 1056);
    fd_group.left = new FormAttachment(0, 846);
    formGroup.setLayoutData(fd_group);
    formGroup.setText("Formularansicht");

    buttonNotfall = new Button(formGroup, SWT.NONE);
    final FormData fd_buttonNotfall = new FormData();
    fd_buttonNotfall.bottom = new FormAttachment(0, 25);
    fd_buttonNotfall.top = new FormAttachment(0, 2);
    fd_buttonNotfall.right = new FormAttachment(0, 204);
    fd_buttonNotfall.left = new FormAttachment(0, 104);
    buttonNotfall.setLayoutData(fd_buttonNotfall);
    buttonNotfall.setToolTipText("Blendet alle fr einen Notfall nicht relevanten Felder aus");
    buttonNotfall.addSelectionListener(new SelectionAdapter() {

        int index;

        public void widgetSelected(final SelectionEvent e) {
            planungGroup.setVisible(false);
            planungGroup_1.setVisible(true);
            transportdetailsGroup.setVisible(false);
            statusmeldungenGroup.setVisible(false);
            personalAmFahrzeugGroup.setVisible(false);
            multiTransportGroup.setVisible(false);
            mehrfachtransport = false;
            buttonMehrfachtransport.setEnabled(false);
            buttonADDMehrfachtransport.setEnabled(false);
            buttonAssignCar.setEnabled(true);
            // set dateTime to default and disable editing
            GregorianCalendar gcal = new GregorianCalendar();
            dateTime.setDay(gcal.get(GregorianCalendar.DATE));
            dateTime.setMonth(gcal.get(GregorianCalendar.MONTH));
            dateTime.setYear(gcal.get(GregorianCalendar.YEAR));
            dateTime.setEnabled(false);

            transportType = "emergencyTransport";

            // set possible priorities
            index = comboPrioritaet.getSelectionIndex();
            if (index != -1)
                tmpPriority = comboPrioritaet.getItem(index);

            if (transportType.equalsIgnoreCase("prebooking")) {
                comboPrioritaet.setItems(prebookingPriorities);
                comboPrioritaet.setText(tmpPriority);
            }
            if (transportType.equalsIgnoreCase("emergencyTransport")) {
                comboPrioritaet.setItems(emergencyAndTransportPriorities);
                comboPrioritaet.setText(tmpPriority);
            }

            // remove all transports from the multi transport list
            multiTransportProvider.removeAllTransports();
            viewer.refresh();
        }
    });
    buttonNotfall.setText("Notfall");

    buttonVormerkung = new Button(formGroup, SWT.NONE);
    final FormData fd_buttonVormerkung = new FormData();
    fd_buttonVormerkung.bottom = new FormAttachment(0, 59);
    fd_buttonVormerkung.top = new FormAttachment(0, 36);
    fd_buttonVormerkung.right = new FormAttachment(0, 204);
    fd_buttonVormerkung.left = new FormAttachment(0, 104);
    buttonVormerkung.setLayoutData(fd_buttonVormerkung);
    buttonVormerkung.setToolTipText("Blendet alle fr eine Vormerkung nicht relevanten Felder aus");
    buttonVormerkung.setText("Transport");
    buttonVormerkung.addSelectionListener(new SelectionAdapter() {

        int index;

        public void widgetSelected(final SelectionEvent e) {
            planungGroup_1.setVisible(false);
            planungGroup.setVisible(true);
            transportdetailsGroup.setVisible(false);
            statusmeldungenGroup.setVisible(false);
            personalAmFahrzeugGroup.setVisible(false);
            dateTime.setEnabled(true);
            viewerAssign.getTable().setSelection(-1);// deselect
            assignCarGroup.setVisible(false);
            buttonMehrfachtransport.setEnabled(true);
            buttonADDMehrfachtransport.setEnabled(true);

            transportType = "prebooking";

            // set possible priorities
            index = comboPrioritaet.getSelectionIndex();
            if (index != -1)
                tmpPriority = comboPrioritaet.getItem(index);

            if (transportType.equalsIgnoreCase("prebooking")) {
                comboPrioritaet.setItems(prebookingPriorities);
                comboPrioritaet.setText(tmpPriority);
            }
            if (transportType.equalsIgnoreCase("emergencyTransport")) {
                comboPrioritaet.setItems(emergencyAndTransportPriorities);
                comboPrioritaet.setText(tmpPriority);
            }
        }
    });

    createdBy = new Text(formGroup, SWT.BORDER);
    final FormData fd_crreatedBy = new FormData();
    fd_crreatedBy.bottom = new FormAttachment(0, 108);
    fd_crreatedBy.top = new FormAttachment(0, 88);
    fd_crreatedBy.right = new FormAttachment(0, 102);
    fd_crreatedBy.left = new FormAttachment(0, 2);
    createdBy.setLayoutData(fd_crreatedBy);
    createdBy.setToolTipText("Aufgenommen von");
    createdBy.setEditable(false);

    disposedBy = new Text(formGroup, SWT.BORDER);
    final FormData fd_disposedBy = new FormData();
    fd_disposedBy.bottom = new FormAttachment(0, 108);
    fd_disposedBy.top = new FormAttachment(0, 88);
    fd_disposedBy.right = new FormAttachment(0, 204);
    fd_disposedBy.left = new FormAttachment(0, 104);
    disposedBy.setLayoutData(fd_disposedBy);
    disposedBy.setToolTipText("Disponiert von");
    disposedBy.setEditable(false);

    buttonDialyse = new Button(formGroup, SWT.NONE);
    final FormData fd_buttonDialye = new FormData();
    fd_buttonDialye.bottom = new FormAttachment(0, 25);
    fd_buttonDialye.top = new FormAttachment(0, 2);
    fd_buttonDialye.right = new FormAttachment(0, 102);
    fd_buttonDialye.left = new FormAttachment(0, 2);
    buttonDialyse.setLayoutData(fd_buttonDialye);
    buttonDialyse.setToolTipText("Erstellt einen Dialysetransport");
    buttonDialyse.setText("Dialyse");
    buttonDialyse.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            DialysisPatient dia = new DialysisPatient();
            if (!textFromStreet.getText().equalsIgnoreCase(""))
                dia.setFromStreet(textFromStreet.getText());
            else
                dia.setFromStreet("<bitte ausfllen>");

            if (!textFromCity.getText().equalsIgnoreCase(""))
                dia.setFromCity(textFromCity.getText());
            else
                dia.setFromCity("<bitte ausfllen>");

            dia.setToStreet(textToStreet.getText());

            dia.setToCity(textToCity.getText());
            int index = zustaendigeOrtsstelle.getCombo().getSelectionIndex();
            if (index != -1)
                dia.setLocation((Location) zustaendigeOrtsstelle.getElementAt(index));

            Calendar startTime = convertStringToDate(textAbf.getText());
            if (startTime != null) {
                startTime.set(Calendar.YEAR, dateTime.getYear());
                startTime.set(Calendar.MONTH, dateTime.getMonth());
                startTime.set(Calendar.DAY_OF_MONTH, dateTime.getDay());

                dia.setPlannedStartOfTransport(startTime.getTimeInMillis());
            } else
                dia.setPlannedStartOfTransport(0);

            Calendar patientTime = convertStringToDate(textBeiPat.getText());
            if (patientTime != null) {
                patientTime.set(Calendar.YEAR, dateTime.getYear());
                patientTime.set(Calendar.MONTH, dateTime.getMonth());
                patientTime.set(Calendar.DAY_OF_MONTH, dateTime.getDay());
                dia.setPlannedTimeAtPatient(patientTime.getTimeInMillis());
            } else
                dia.setPlannedTimeAtPatient(0);

            Calendar appointmentTime = convertStringToDate(textTermin.getText());
            if (appointmentTime != null) {
                appointmentTime.set(Calendar.YEAR, dateTime.getYear());
                appointmentTime.set(Calendar.MONTH, dateTime.getMonth());
                appointmentTime.set(Calendar.DAY_OF_MONTH, dateTime.getDay());
                dia.setAppointmentTimeAtDialysis(appointmentTime.getTimeInMillis());
            } else
                dia.setAppointmentTimeAtDialysis(0);

            // the kind of transport
            index = combokindOfTransport.getSelectionIndex();
            if (index != -1)
                dia.setKindOfTransport(combokindOfTransport.getItem(index));

            Patient patient = new Patient(patientFirstName.getText(), patientLastName.getText());
            dia.setPatient(patient);

            DialysisForm form = new DialysisForm(dia, true);
            form.open();

            getShell().close();
        }
    });

    buttonMehrfachtransport = new Button(formGroup, SWT.NONE);
    final FormData fd_buttonMehrfachtransport = new FormData();
    fd_buttonMehrfachtransport.bottom = new FormAttachment(0, 59);
    fd_buttonMehrfachtransport.top = new FormAttachment(0, 36);
    fd_buttonMehrfachtransport.right = new FormAttachment(0, 102);
    fd_buttonMehrfachtransport.left = new FormAttachment(0, 2);
    buttonMehrfachtransport.setLayoutData(fd_buttonMehrfachtransport);
    buttonMehrfachtransport.setToolTipText("Mehrfachtransportfenster ffnen");
    buttonMehrfachtransport.setText("Mehrfachtransport");
    buttonMehrfachtransport.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            hookContextMenu();
            mehrfachtransport = true;
            buttonMehrfachtransport.setEnabled(false);
            buttonADDMehrfachtransport.setEnabled(true);
            multiTransportGroup.setVisible(true);
            assignCarGroup.setVisible(false);
            buttonAssignCar.setEnabled(false);

            // remove all transports from the multi transport list
            multiTransportProvider.removeAllTransports();
            viewer.refresh();
        }
    });

    buttonADDMehrfachtransport = new Button(formGroup, SWT.NONE);
    final FormData fd_buttonADDMehrfachtransport = new FormData();
    fd_buttonADDMehrfachtransport.bottom = new FormAttachment(0, 83);
    fd_buttonADDMehrfachtransport.top = new FormAttachment(0, 60);
    fd_buttonADDMehrfachtransport.right = new FormAttachment(0, 102);
    fd_buttonADDMehrfachtransport.left = new FormAttachment(0, 2);
    buttonADDMehrfachtransport.setLayoutData(fd_buttonADDMehrfachtransport);
    buttonADDMehrfachtransport.setToolTipText("Mehrfachtransport hinzufgen");
    buttonADDMehrfachtransport.setText("hinzufgen");
    buttonADDMehrfachtransport.setEnabled(false);
    buttonADDMehrfachtransport.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            // make a difference between immediate and final transports
            finalMultiTransportKlick = false;
            // check the fields
            if (!handleOK())
                return;

            // copy the transport (don't use the same objects (transport,
            // patient, caller)!!
            Patient newPatient = new Patient();
            CallerDetail newCaller = new CallerDetail();
            if (transport.getPatient() != null) {
                newPatient.setLastname(transport.getPatient().getLastname());
                newPatient.setFirstname(transport.getPatient().getFirstname());
            }
            if (transport.getCallerDetail() != null) {
                newCaller.setCallerName(transport.getCallerDetail().getCallerName());
                newCaller.setCallerTelephoneNumber(transport.getCallerDetail().getCallerTelephoneNumber());
            }
            Transport newTransport = Util.copyTransport(transport);
            newTransport.setPatient(newPatient);
            newTransport.setCallerDetail(newCaller);
            // add the created transport to the table object list
            multiTransportProvider.addTransport(newTransport);

            // refresh the viewer
            viewer.refresh();
        }
    });

    buttonAssignCar = new Button(formGroup, SWT.NONE);
    final FormData fd_buttonAssignCar = new FormData();
    fd_buttonAssignCar.bottom = new FormAttachment(0, 83);
    fd_buttonAssignCar.top = new FormAttachment(0, 60);
    fd_buttonAssignCar.right = new FormAttachment(0, 204);
    fd_buttonAssignCar.left = new FormAttachment(0, 104);
    buttonAssignCar.setLayoutData(fd_buttonAssignCar);
    buttonAssignCar.setToolTipText("Fahrzeug zuweisen");
    buttonAssignCar.setText("Fahrzeug zuweisen");
    buttonAssignCar.setEnabled(false);
    buttonAssignCar.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(final SelectionEvent e) {
            mehrfachtransport = false;
            buttonMehrfachtransport.setEnabled(false);
            buttonADDMehrfachtransport.setEnabled(false);
            multiTransportGroup.setVisible(false);

            // remove all transports from the multi transport list
            multiTransportProvider.removeAllTransports();
            viewer.refresh();

            viewerAssign.refresh();
            assignCarGroup.setVisible(true);
        }
    });
}

From source file:at.spardat.xma.guidesign.presentation.GuidesignEditor.java

License:Open Source License

/**
 * Shows a dialog that asks if conflicting changes should be discarded.
 * @generated/*from  www .j  av a  2s .  c  o m*/
 */
protected boolean handleDirtyConflict() {
    // re-activated that for fleXMA refresh:
    boolean res = MessageDialog.openQuestion(getSite().getShell(), getString("_UI_FileConflict_label"),
            getString("_WARN_FileConflict"));
    return res;
}

From source file:at.spardat.xma.guidesign.presentation.GuidesignEditor.java

License:Open Source License

/**
 * This also changes the editor's input.
 * <!-- begin-user-doc -->/*  w  ww. ja  v  a2  s  . co m*/
 * <!-- end-user-doc -->
 * @generated
 */
public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        if (file != null) {
            if (!file.exists() || MessageDialog.openQuestion(getSite().getShell(),
                    getString("_UI_FileExists_label"), getString("_WARN_FileExists", file.getName()))) {
                ((Resource) editingDomain.getResourceSet().getResources().get(0))
                        .setURI(URI.createPlatformResourceURI(file.getFullPath().toString()));
                IFileEditorInput modelFile = new FileEditorInput(file);
                setInput(modelFile);
                setPartName(file.getName());
                doSave(getActionBars().getStatusLineManager().getProgressMonitor());
            }
        }
    }
}

From source file:au.com.cybersearch2.dialogs.SyncQuestionDialog.java

License:Open Source License

/**
 * Show prompt requiring yes or no response in system dialog
 * @param title The dialog's title/* w  ww .  ja va2  s.com*/
 * @param message The message
 */
public boolean ask(final String title, final String message) {
    final boolean[] responseHolder = new boolean[1];
    sync.syncExec(new Runnable() {

        @Override
        public void run() {
            responseHolder[0] = MessageDialog.openQuestion(shell, title, message);
        }
    });
    return responseHolder[0];
}

From source file:au.gov.ansto.bragg.kakadu.ui.editors.AlgorithmTaskEditor.java

License:Open Source License

/**
 * Show confirmation dialog before close.
 *//*from  ww w.  java 2  s  . c  om*/
public int promptToSaveOnClose() {
    //      if (fileUri != null)
    //         return ISaveablePart2.CANCEL;
    if (MessageDialog.openQuestion(parent.getShell(), "Algorithm Task",
            "Save the Algorithm Task [" + algorithmTask.getId() + "] before close?")) {
        return ISaveablePart2.YES;
    }

    return ISaveablePart2.NO;
}

From source file:au.gov.ansto.bragg.kakadu.ui.instrument.InstrumentDataSourceComposite.java

License:Open Source License

private boolean confirmFileReplace(String fileName) {
    return MessageDialog.openQuestion(getShell(), "Data Source View - Add data file",
            "The file '" + fileName + "' already exists.\nDo you want to replace and reload it?");
}