Search in sources :

Example 1 with AttributePreferenciesDialog

use of com.ramussoft.gui.attribute.AttributePreferenciesDialog in project ramus by Vitaliy-Yakovchuk.

the class ModelPropertiesDialog method setupAttribute.

public void setupAttribute() {
    TreeTableNode node = component.getTable().getSelectedNode();
    if (node == null)
        return;
    Row row = node.getRow();
    if (row == null)
        return;
    AttributePreferenciesDialog d = new AttributePreferenciesDialog(framework, this);
    Attribute attribute = engine.getAttribute((Long) row.getAttribute(attributeId));
    d.setAttribute(attribute);
    d.getOKButton().setEnabled(rules.canUpdateAttribute(attribute.getId()));
    d.setVisible(true);
}
Also used : TreeTableNode(com.ramussoft.gui.qualifier.table.TreeTableNode) Attribute(com.ramussoft.common.Attribute) AttributePreferenciesDialog(com.ramussoft.gui.attribute.AttributePreferenciesDialog) Row(com.ramussoft.database.common.Row)

Example 2 with AttributePreferenciesDialog

use of com.ramussoft.gui.attribute.AttributePreferenciesDialog in project ramus by Vitaliy-Yakovchuk.

the class QualifierPreferencesPanel method setupAttribute.

public void setupAttribute() {
    Row row = attributeEditor.getSelectedRow();
    if (row == null)
        return;
    AttributePreferenciesDialog d;
    if (dialog == null)
        d = new AttributePreferenciesDialog(framework);
    else
        d = new AttributePreferenciesDialog(framework, dialog);
    Attribute attribute = engine.getAttribute((Long) row.getAttribute(attributeId));
    d.setAttribute(attribute);
    d.getOKButton().setEnabled(rules.canUpdateAttribute(attribute.getId()));
    d.setVisible(true);
}
Also used : Attribute(com.ramussoft.common.Attribute) AttributePreferenciesDialog(com.ramussoft.gui.attribute.AttributePreferenciesDialog) Row(com.ramussoft.database.common.Row)

Aggregations

Attribute (com.ramussoft.common.Attribute)2 Row (com.ramussoft.database.common.Row)2 AttributePreferenciesDialog (com.ramussoft.gui.attribute.AttributePreferenciesDialog)2 TreeTableNode (com.ramussoft.gui.qualifier.table.TreeTableNode)1