Package com.vaadin.event

Examples of com.vaadin.event.ShortcutListener


                Label label = new Label("Your input was: " + input);
                label.setId(LABEL2);
                getLayout().addComponent(label);
            }
        });
        tf.addShortcutListener(new ShortcutListener("Shortcut", KeyCode.ENTER,
                null) {

            @Override
            public void handleAction(Object sender, Object target) {
                String input = tf.getValue();
View Full Code Here


        pl.addComponent(l);

        TextField f = new TextField();
        pl.addComponent(f);

        p.addAction(new ShortcutListener("F8", KeyCode.F8, null) {

            @Override
            public void handleAction(Object sender, Object target) {
                mainWindow.showNotification(getCaption());

            }
        });

        p.addAction(new ShortcutListener("a", KeyCode.A, null) {

            @Override
            public void handleAction(Object sender, Object target) {
                mainWindow.showNotification(getCaption());
View Full Code Here

        @Override
        public Component getPopupComponent() {
            TextField field = new TextField("Enter text");
            field.setImmediate(true);
            field.addShortcutListener(new ShortcutListener("SearchAction",
                    ShortcutAction.KeyCode.ENTER, null) {
                private static final long serialVersionUID = 1L;

                @Override
                public void handleAction(Object sender, Object target) {
View Full Code Here

public class WindowProcessDataDisplayContext implements ProcessDataDisplayContext {
    private Window window;

    public WindowProcessDataDisplayContext(final Window window) {
        this.window = window;
        window.addAction(new ShortcutListener("Close window", ShortcutAction.KeyCode.ESCAPE, null) {
            @Override
            public void handleAction(Object sender, Object target) {
                window.getParent().removeWindow(window);
            }
        });
View Full Code Here

          especies.put(especie.getEspecie(), especie);
        }
        final ComboBox cmbEspecies = Controls.crearCombo(especies);
        cmbEspecies.setWidth("300px");
        toolbar.addComponent(cmbEspecies);
        cmbEspecies.addShortcutListener(new ShortcutListener("Add",
                KeyCode.ENTER, null) {

            @Override
            public void handleAction(Object sender, Object target) {
            }
View Full Code Here

                    }
                });
                buttons.addComponent(ok);
                ok.focus();

                alert.addShortcutListener(new ShortcutListener("Cancel",
                        KeyCode.ESCAPE, null) {
                    @Override
                    public void handleAction(Object sender, Object target) {
                        alert.close();
                    }
View Full Code Here

        final Button signin = new Button("Sign In");
        signin.addStyleName("default");
        fields.addComponent(signin);
        fields.setComponentAlignment(signin, Alignment.BOTTOM_LEFT);

        final ShortcutListener enter = new ShortcutListener("Sign In",
                KeyCode.ENTER, null) {
            /**
           *
           */
          private static final long serialVersionUID = -2425923923914266067L;
View Full Code Here

TOP

Related Classes of com.vaadin.event.ShortcutListener

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.