Search in sources :

Example 1 with Attribute

use of si.ijs.acs.objectexplorer.engine.Attribute in project ACS by ACS-Community.

the class ListsHandlerBean method clickedItem.

/**
 * Insert the method's description here.
 * Creation date: (11/14/00 6:51:28 PM)
 */
synchronized void clickedItem(Object item) {
    if (item == null)
        return;
    try {
        if (item instanceof Operation) {
            Operation op = (Operation) item;
            notifier.reportDebug("ListsHandlerBean::clickItem", "Operation '" + op + "' clicked.");
            boolean[] mask = op.getMask();
            boolean isUserInput = false;
            for (int i = 0; i < mask.length; i++) if (mask[i])
                isUserInput = true;
            if (isUserInput || !isConfirmed()) {
                CallMethodDialog cmd = new CallMethodDialog(op, (JFrame) panel.getTopLevelAncestor(), true, notifier, this);
                cmd.show();
            } else {
                invokeOperation(op, new Object[mask.length]);
            }
        } else if (item instanceof Attribute) {
            Attribute attr = (Attribute) item;
            notifier.reportDebug("ListsHandlerBean::clickItem", "Attribute '" + attr + "' accessor clicked.");
            if (attr.isReadOnly()) {
                invokeOperation(attr, null);
            } else {
                notifier.reportMessage("Read only attributes supported only");
                invokeOperation(attr, null);
            }
        }
    } catch (Exception e) {
        handleException("ListsHandler clickItem", e);
    }
}
Also used : Attribute(si.ijs.acs.objectexplorer.engine.Attribute) Operation(si.ijs.acs.objectexplorer.engine.Operation)

Aggregations

Attribute (si.ijs.acs.objectexplorer.engine.Attribute)1 Operation (si.ijs.acs.objectexplorer.engine.Operation)1