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();
}
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();
}
}
Aggregations