Package com.vaadin.event

Examples of com.vaadin.event.Action$Handler


        if (variables.containsKey("action")) {
            final StringTokenizer st = new StringTokenizer(
                    (String) variables.get("action"), ",");
            if (st.countTokens() == 2) {
                final Object itemId = itemIdMapper.get(st.nextToken());
                final Action action = actionMapper.get(st.nextToken());

                if (action != null && (itemId == null || containsId(itemId))
                        && actionHandlers != null) {
                    for (Handler ah : actionHandlers) {
                        ah.handleAction(action, this, itemId);
View Full Code Here


                                : FontAwesome.ANDROID);
                    }
                }));

        Handler actionHandler = new Handler() {
            Action[] actions = { new Action("Do it!", icon) };

            @Override
            public void handleAction(Action action, Object sender, Object target) {

            }
View Full Code Here

        });
        options.put("Edit/New", new ContextMenu() {
            @Override
            public Action[] getActions(Object itemId, Object component) {
                if (itemId == null) {
                    return new Action[] { new Action("New..."),
                            new Action("Common action") };
                } else {
                    return new Action[] { new Action("Edit " + itemId),
                            new Action("Common action") };
                }
            }
        });

        createSelectAction("Context menu", category, options, "None",
View Full Code Here

    public Action[] getActions(Object target, Object sender) {
        if (!actionHandlerHasActions) {
            return null;
        }

        return new Action[] { new Action("test") };
    }
View Full Code Here

        public ContextMenu() {
        }

        public void addItem(String caption, Resource icon) {
            items.add(new Action(caption, icon));
        }
View Full Code Here

            public void handleAction(Action action, Object sender, Object target) {
            }

            @Override
            public Action[] getActions(Object target, Object sender) {
                return new Action[] { new Action("Action 1"),
                        new Action("Action 2"), };
            }
        });

        table.addContainerProperty("Column", String.class, "");
View Full Code Here

        tree1.setDropHandler(dropHandler);

        Handler actionHandler = new Handler() {

            private Action[] actions = new Action[] { new Action("Remove") };

            @Override
            public void handleAction(Action action, Object sender, Object target) {
                ContainerHierarchicalWrapper containerDataSource = (ContainerHierarchicalWrapper) tree1
                        .getContainerDataSource();
View Full Code Here

                addComponent(label2);
            }

            @Override
            public Action[] getActions(Object target, Object sender) {
                return new Action[] { new Action("ACTION") };
            }
        });
        addComponent(calendar);
        calendar.setSizeFull();
        setSizeFull();
View Full Code Here

    private Table createTable() {
        Table table = new Table();
        table.setSizeFull();
        table.addActionHandler(new Action.Handler() {

            private final Action ADD = new Action("Add event");
            private final Action EDIT = new Action("Edit event");
            private final Action REMOVE = new Action("Remove event");

            @Override
            public void handleAction(Action action, Object sender, Object target) {
                if (action == ADD) {
                    BasicEvent event = new BasicEvent();
View Full Code Here

        calendar.setStartDate(new Date(100, 1, 1));
        calendar.setEndDate(new Date(100, 2, 1));

        calendar.addActionHandler(new Action.Handler() {

            public final Action NEW_EVENT = new Action("Add event");
            public final Action EDIT_EVENT = new Action("Edit event");
            public final Action REMOVE_EVENT = new Action("Remove event");

            /*
             * (non-Javadoc)
             *
             * @see
 
View Full Code Here

TOP

Related Classes of com.vaadin.event.Action$Handler

Copyright © 2018 www.massapicom. 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.