use of com.ramussoft.gui.qualifier.table.DialogedTableCellEditor in project ramus by Vitaliy-Yakovchuk.
the class ElementAttributesEditor method getCellEditor.
private TableCellEditor getCellEditor(int aRow) {
Attribute attribute = attributes.get(aRow).attribute;
AttributePlugin plugin = framework.findAttributePlugin(attribute);
TableCellEditor cellEditor = plugin.getTableCellEditor(framework.getEngine(), framework.getAccessRules(), attribute);
if (cellEditor == null) {
saveValues[aRow] = false;
cellEditor = new DialogedTableCellEditor(framework.getEngine(), framework.getAccessRules(), attribute, plugin, framework);
} else
saveValues[aRow] = plugin.isCellEditable();
return cellEditor;
}
use of com.ramussoft.gui.qualifier.table.DialogedTableCellEditor in project ramus by Vitaliy-Yakovchuk.
the class TableEditorTable method setModel.
@Override
public void setModel(TableModel dataModel) {
super.setModel(dataModel);
if (!(dataModel instanceof TableEditorModel))
return;
TableEditorModel model = (TableEditorModel) dataModel;
Engine engine = framework.getEngine();
AccessRules rules = framework.getAccessRules();
for (int i = 0; i < plugins.length; i++) {
AttributePlugin plugin = framework.findAttributePlugin(attributes.get(i));
plugins[i] = plugin;
cellEditors[i] = plugin.getTableCellEditor(engine, rules, attributes.get(i));
if (cellEditors[i] == null) {
cellEditors[i] = new DialogedTableCellEditor(engine, rules, attributes.get(i), plugins[i], framework);
model.setSaveValue(i, false);
}
cellRenderers[i] = plugin.getTableCellRenderer(engine, rules, attributes.get(i));
}
}
Aggregations