use of com.ramussoft.pb.master.gui.DefaultPanelCreator in project ramus by Vitaliy-Yakovchuk.
the class MainDialog method showModal.
public void showModal(final DataPlugin dataPlugin, final ProjectOptions projectOptions) {
final Properties name_author = new DefaultProperties(new Property[] { new DefaultProperty(AUTOR, Property.TEXT_FIELD), new DefaultProperty(PROJECT_NAME, Property.TEXT_FIELD) }, Factory.getString("name_author.Describe"));
final Properties used_at = new DefaultProperties(new Property[] { new DefaultProperty(USED_AT, Property.TEXT_FIELD) }, Factory.getString("used_at.Describe"));
final Properties def = new DefaultProperties(new Property[] { new DefaultProperty(DEFINITION, Property.TEXT) }, Factory.getString("describe.Describe"));
masterModel = new DefaultMasterModel(new Properties[] { name_author, used_at, def });
mainPanel = new MainPanel(new DefaultPanelCreator(masterModel)) {
@Override
public boolean cancel() {
if (super.cancel()) {
MainDialog.this.setVisible(false);
return true;
}
return false;
}
@Override
protected void finish() {
super.finish();
projectOptions.setProjectAutor(getValue(AUTOR));
projectOptions.setProjectName(getValue(PROJECT_NAME));
projectOptions.setDefinition(getValue(DEFINITION));
projectOptions.setUsedAt(getValue(USED_AT));
MainDialog.this.setVisible(false);
}
};
setContentPane(mainPanel);
pack();
setMinimumSize(this.getSize());
setLocationRelativeTo(null);
setVisible(true);
frame.repaint();
}
Aggregations