use of com.ramussoft.pb.frames.SelectRowDialog in project ramus by Vitaliy-Yakovchuk.
the class DFDObjectDialog method createFirstTab.
protected Component createFirstTab(JTabbedPane pane) {
double[][] size = { { 5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5 }, { 5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM } };
JPanel panel = new JPanel(new BorderLayout());
JPanel c = new JPanel(new TableLayout(size));
c.add(new JLabel("row:"), "1,1");
c.add(qualifier, "3,1");
c.add(new JLabel("element:"), "1,3");
c.add(element, "3,3");
panel.add(c, BorderLayout.NORTH);
JPanel jPanel = new JPanel(new BorderLayout());
JPanel jPanel2 = new JPanel(new FlowLayout(FlowLayout.RIGHT));
JButton button = new JButton("set_dfd_object");
jPanel2.add(button);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
SelectRowDialog dialog = new SelectRowDialog(DFDObjectDialog.this) {
};
dialog.setSelectType(SelectType.RADIO);
dialog.init(framework, dataPlugin, framework.getAccessRules());
List<Row> list = dialog.showModal();
if ((list != null) && (list.size() > 0)) {
setLink(list.get(0));
}
}
});
jPanel.add(jPanel2, BorderLayout.NORTH);
panel.add(jPanel, BorderLayout.CENTER);
return panel;
}
use of com.ramussoft.pb.frames.SelectRowDialog in project ramus by Vitaliy-Yakovchuk.
the class SectorRowsEditor method getRowSelectDialog.
private SelectRowDialog getRowSelectDialog() {
if (rowSelectDialog == null) {
rowSelectDialog = new SelectRowDialog(dialog) {
};
rowSelectDialog.init(framework, dataPlugin, accessRules);
List<Element> hide = new ArrayList<Element>(1);
hide.add(((com.ramussoft.database.common.Row) dataPlugin.getBaseFunction()).getElement());
rowSelectDialog.setQuaifierHideElements(hide);
}
return rowSelectDialog;
}
use of com.ramussoft.pb.frames.SelectRowDialog in project ramus by Vitaliy-Yakovchuk.
the class SectorRowsEditor method addRows.
private void addRows() {
final SelectRowDialog r = getRowSelectDialog();
List<Row> list = r.showModal();
if (r.isOk()) {
addRows(list);
List<Row> rows = selectRowPanel.getSelected();
rows.addAll(list);
selectRowPanel.selectRows((List) rows);
}
}
Aggregations