Search in sources :

Example 1 with OutputPM

use of net.parostroj.timetable.gui.pm.OutputPM in project grafikon by jub77.

the class EditOutputsDialog method createNew.

@Override
protected Output createNew(String name) {
    NewOutputDialog dialog = new NewOutputDialog(this, true);
    OutputPM pModel = new OutputPM(getPresentationModel().getLocales(), getPresentationModel().getModelLocales());
    pModel.initNew(element);
    dialog.setPresentationModel(pModel);
    dialog.setLocationRelativeTo(this);
    dialog.setVisible(true);
    dialog.dispose();
    return pModel.getNewOutput();
}
Also used : GenerateOutputPM(net.parostroj.timetable.gui.pm.GenerateOutputPM) OutputPM(net.parostroj.timetable.gui.pm.OutputPM)

Example 2 with OutputPM

use of net.parostroj.timetable.gui.pm.OutputPM in project grafikon by jub77.

the class EditOutputsDialog method edit.

@Override
protected void edit(Output item) {
    EditOutputDialog dialog = new EditOutputDialog(this, true);
    dialog.setLocationRelativeTo(this);
    dialog.registerContext(context);
    LocalizedString oldName = item.getName();
    OutputPM pModel = new OutputPM(getPresentationModel().getLocales(), getPresentationModel().getModelLocales());
    dialog.setPresentationModel(pModel);
    pModel.init(element, item);
    dialog.setVisible(true);
    dialog.dispose();
    // refresh item(s)
    if (!oldName.equals(item.getName())) {
        refreshAll();
    }
}
Also used : GenerateOutputPM(net.parostroj.timetable.gui.pm.GenerateOutputPM) OutputPM(net.parostroj.timetable.gui.pm.OutputPM) LocalizedString(net.parostroj.timetable.model.LocalizedString)

Aggregations

GenerateOutputPM (net.parostroj.timetable.gui.pm.GenerateOutputPM)2 OutputPM (net.parostroj.timetable.gui.pm.OutputPM)2 LocalizedString (net.parostroj.timetable.model.LocalizedString)1