use of com.ramussoft.gui.qualifier.table.event.CloseListener in project ramus by Vitaliy-Yakovchuk.
the class HistoryDialog method closed.
private void closed(final QualifierHistoryPlugin plugin, final Element element, final Attribute attribute) {
plugin.windowClosed(framework, element, attribute);
CloseEvent event = new CloseEvent(this);
for (CloseListener listener : getCloseListeners()) listener.closed(event);
Options.saveOptions(this);
}
use of com.ramussoft.gui.qualifier.table.event.CloseListener in project ramus by Vitaliy-Yakovchuk.
the class TableEditorModel method close.
public void close() {
Qualifier qualifier = StandardAttributesPlugin.getTableQualifierForAttribute(engine, tableAttribute);
engine.removeElementAttributeListener(qualifier, listener);
engine.removeElementListener(qualifier, elementListener);
CloseEvent event = new CloseEvent(this);
for (CloseListener listener : getCloseListeners()) {
listener.closed(event);
}
framework.removeActionListener(UPDATE_TABLE_VALUE, tableValueListener);
}
use of com.ramussoft.gui.qualifier.table.event.CloseListener in project ramus by Vitaliy-Yakovchuk.
the class ElementAttributesEditor method reload.
protected void reload() {
CloseEvent event = new CloseEvent(this);
CloseListener[] listeners = getCloseListeners();
for (CloseListener listener : listeners) {
listener.closed(event);
removeCloseListener(listener);
}
loadCurrentQualifierAttributes();
Engine engine = framework.getEngine();
AccessRules rules = framework.getAccessRules();
getters = new ValueGetter[attributes.size()];
renderers = new TableCellRenderer[attributes.size()];
values = new Object[attributes.size()];
saveValues = new boolean[attributes.size()];
Arrays.fill(saveValues, true);
Arrays.fill(getters, new ValueGetter() {
@Override
public Object getValue(TableNode node, int index) {
return node.getValueAt(index);
}
});
for (int i = 0; i < attributes.size(); i++) {
Attribute attr = attributes.get(i).attribute;
AttributePlugin plugin = framework.findAttributePlugin(attr);
if (plugin instanceof TabledAttributePlugin) {
ValueGetter getter = ((TabledAttributePlugin) plugin).getValueGetter(attr, engine, framework, this);
if (getter != null)
getters[i] = getter;
}
renderers[i] = plugin.getTableCellRenderer(engine, rules, attr);
}
loadElement();
}
Aggregations