Examples of canDoAction()


Examples of jsynoptic.base.ContextualActionProvider.canDoAction()

            ContextualActionProvider provider = (ContextualActionProvider) sel;
            String[] actions = provider.getActions(x, y, sel, ContextualActionProvider.SOURCELIST_CONTEXT);
            if ((actions != null) && (actions.length != 0)) {
                for (int i = 0; i < actions.length; ++i) {
                    JMenuItem jmi = new JMenuItem(actions[i]);
                    if (!provider.canDoAction(x, y, sel, actions[i], ContextualActionProvider.SOURCELIST_CONTEXT)) {
                        jmi.setEnabled(false);
                    } else {
                        jmi.addActionListener(this);
                    }
                    add(jmi);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.