Examples of addActionHandler()


Examples of com.vaadin.ui.Calendar.addActionHandler()

        calendar.setSizeFull();
        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");
View Full Code Here

Examples of com.vaadin.ui.LegacyWindow.addActionHandler()

        Label help = new Label(
                "Use CTRL X to fire action, CTRL C to remove it (fails before fix)");

        w.addComponent(help);

        w.addActionHandler(new Handler() {

            final ShortcutAction a1 = new ShortcutAction("action", KeyCode.X,
                    new int[] { ModifierKey.CTRL });
            final ShortcutAction a2 = new ShortcutAction("action", KeyCode.C,
                    new int[] { ModifierKey.CTRL });
View Full Code Here

Examples of com.vaadin.ui.LegacyWindow.addActionHandler()

                .substring(getClass().getName().lastIndexOf(".") + 1));
        setMainWindow(main);

        main.addComponent(f);
        main.addComponent(status);
        main.addActionHandler(this);
        f.focus();

    }

    final static private Action[] actions = new Action[] {
View Full Code Here

Examples of com.vaadin.ui.Panel.addActionHandler()

        getLayout().addComponent(createRichTextArea("InMainLayout"));

        VerticalLayout panelLayout = new VerticalLayout();
        panelLayout.setMargin(true);
        Panel panel = new Panel("RTA Panel", panelLayout);
        panel.addActionHandler(actionHandler);
        panelLayout.addComponent(createRichTextArea("InPanel"));
        getLayout().addComponent(panel);

        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
View Full Code Here

Examples of com.vaadin.ui.Panel.addActionHandler()

    commentInputField = new TextField();
    commentInputField.setWidth(100, UNITS_PERCENTAGE);
    textFieldPanel.addComponent(commentInputField);
   
    // Hack to catch keyboard 'enter'
    textFieldPanel.addActionHandler(new Handler() {
      public void handleAction(Action action, Object sender, Object target) {
        addNewComment(commentInputField.getValue().toString());
      }
      public Action[] getActions(Object target, Object sender) {
        return new Action[] {new ShortcutAction("enter", ShortcutAction.KeyCode.ENTER, null)};
View Full Code Here

Examples of com.vaadin.ui.Panel.addActionHandler()

    commentInputField = new TextField();
    commentInputField.setWidth(100, UNITS_PERCENTAGE);
    textFieldPanel.addComponent(commentInputField);
   
    // Hack to catch keyboard 'enter'
    textFieldPanel.addActionHandler(new Handler() {
      public void handleAction(Action action, Object sender, Object target) {
        addNewComment(commentInputField.getValue().toString());
      }
      public Action[] getActions(Object target, Object sender) {
        return new Action[] {new ShortcutAction("enter", ShortcutAction.KeyCode.ENTER, null)};
View Full Code Here

Examples of com.vaadin.ui.Table.addActionHandler()

        tbl.setItemIcon(tbl.addItem(), icon);
        tbl.setItemIcon(tbl.addItem(), icon);
        tbl.setItemIcon(tbl.addItem(), icon);
        tbl.setPageLength(3);
        gl.addComponent(tbl);
        tbl.addActionHandler(actionHandler);

        // Selects, caption + item icons
        Class<?>[] selects = { ComboBox.class, NativeSelect.class,
                ListSelect.class, TwinColSelect.class, OptionGroup.class };
        for (Class<?> clazz : selects) {
View Full Code Here

Examples of com.vaadin.ui.Table.addActionHandler()

        // t.setColumnHeaders(new String[] { "Country", "Code", "Icon file" });
        t.setColumnIcon(TestUtils.iso3166_PROPERTY_NAME, new ThemeResource(
                parent.ICON_URL));

        // Actions (a.k.a context menu)
        t.addActionHandler(new Action.Handler() {
            @Override
            public Action[] getActions(Object target, Object sender) {
                if (markedRows.contains(target)) {
                    return ACTIONS_MARKED;
                } else {
View Full Code Here

Examples of com.vaadin.ui.Table.addActionHandler()

        actionHandlerEnabler.setImmediate(true);
        actionHandlerEnabler.addListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(ValueChangeEvent event) {
                if (actionHandlerEnabler.getValue().booleanValue()) {
                    t.addActionHandler(Ticket1857.this);
                } else {
                    t.removeActionHandler(Ticket1857.this);
                }
            }
        });
View Full Code Here

Examples of com.vaadin.ui.Table.addActionHandler()

        table.setPageLength(10);
        table.setRowHeaderMode(Table.ROW_HEADER_MODE_ID);
        table.setSelectable(true);
        table.setMultiSelect(true);

        table.addActionHandler(new Handler() {

            Action[] actions = new Action[] { new Action("FOO"),
                    new Action("BAR"), new Action("CAR") };

            @Override
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.