Package com.vaadin.ui

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


    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

    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

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.