Examples of UiAction


Examples of net.rim.device.api.unifiedsearch.action.UiAction

                final Object element = _displayables.elementAt(i);

                if (element instanceof UnifiedSearchDemoEntity) {
                    final UnifiedSearchDemoEntity item =
                            (UnifiedSearchDemoEntity) element;
                    final UiAction action = item.getUiActions(null, null);

                    if (action != null) {
                        // Add the appropriate UiAction to the context menu
                        final MenuItem performActionItem =
                                new MenuItem(new StringProvider(action
                                        .toString()), 0x230010, 0);
                        performActionItem.setCommand(new Command(
                                new CommandHandler() {
                                    /**
                                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                                     *      Object)
                                     */
                                    public
                                            void
                                            execute(final ReadOnlyCommandMetadata metadata,
                                                    final Object context) {
                                        action.performAction(item);
                                    }
                                }));
                        menu.addItem(performActionItem);
                    }
                }
View Full Code Here

Examples of org.openengsb.ui.api.UIAction

    @Override
    public Access checkAccess(String user, Object object) {
        if (!(object instanceof UIAction)) {
            return Access.ABSTAINED;
        }
        UIAction actionData = (UIAction) object;
        if (actionData.getSecurityAttributes() == null) {
            return Access.ABSTAINED;
        }
        if (hasAccess(user, actionData)) {
            return Access.GRANTED;
        }
View Full Code Here

Examples of org.openengsb.ui.api.UIAction

        registerServiceAtLocation(adminAccessConnector, "authorization/admin", AuthorizationDomain.class);

        List<SecurityAttributeEntry> securityAttributes = new ArrayList<>();
        securityAttributes.add(new SecurityAttributeEntry("org.openengsb.ui.component", "MyPage"));
        uiAction = new UIAction(securityAttributes);

        WicketAclServiceImpl wicketAclService = new WicketAclServiceImpl(userManager);

        servicePermissionAccessConnector = wicketAclService;
View Full Code Here

Examples of org.openengsb.ui.api.UIAction

        String user = getAuthenticatedUser();
        if (user == null) {
            return false;
        }
        UIAction secureAction =
            new UIAction(attributeList, arg1.getName(), ImmutableMap.of("component", (Object) arg0));

        Access checkAccess = authorizer.checkAccess(user, secureAction);
        if (checkAccess != Access.GRANTED) {
            LOGGER.warn("User {} was denied action {} on component {}", new Object[]{ user, arg1.toString(),
                arg0.getClass().getName() });
View Full Code Here

Examples of org.openengsb.ui.api.UIAction

            return false;
        }

        LOGGER.trace("security-attribute-annotation present on {}", componentClass);

        return authorizer.checkAccess(user, new UIAction(getSecurityAttributes(componentClass))) == Access.GRANTED;
    }
View Full Code Here

Examples of sun.swing.UIAction

        LazyActionMap.installLazyActionMap(frame, BasicInternalFrameUI.class,
            "InternalFrame.actionMap");
    }

    static void loadActionMap(LazyActionMap map) {
        map.put(new UIAction("showSystemMenu") {
            public void actionPerformed(ActionEvent evt) {
                JInternalFrame iFrame = (JInternalFrame)evt.getSource();
                if (iFrame.getUI() instanceof BasicInternalFrameUI) {
                    JComponent comp = ((BasicInternalFrameUI)
                        iFrame.getUI()).getNorthPane();
View Full Code Here

Examples of sun.swing.UIAction

        unwrap(am, "addToSelection");
        super.uninstallKeyboardActions();
    }

    private void wrap(ActionMap am, String name) {
        UIAction action = (UIAction)am.get(name);
        if(!(action instanceof ActionWrapper)) {
            ActionWrapper wrapper = new ActionWrapper(name, action);
            am.put(name, wrapper);
        }
    }
View Full Code Here

Examples of sun.swing.UIAction

            am.put(name, wrapper);
        }
    }

    private void unwrap(ActionMap am, String name) {
        UIAction action = (UIAction)am.get(name);
        if(action instanceof ActionWrapper) {
            UIAction original = ((ActionWrapper)action).originalAction;
            am.put(name, original);
        }
    }
View Full Code Here

Examples of sun.swing.UIAction

        unwrap(am, "addToSelection");
        super.uninstallKeyboardActions();
    }

    private void wrap(ActionMap am, String name) {
        UIAction action = (UIAction)am.get(name);
        if(!(action instanceof ActionWrapper)) {
            ActionWrapper wrapper = new ActionWrapper(name, action);
            am.put(name, wrapper);
        }
    }
View Full Code Here

Examples of sun.swing.UIAction

            am.put(name, wrapper);
        }
    }

    private void unwrap(ActionMap am, String name) {
        UIAction action = (UIAction)am.get(name);
        if(action instanceof ActionWrapper) {
            UIAction original = ((ActionWrapper)action).originalAction;
            am.put(name, original);
        }
    }
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.