Example usage for com.vaadin.client.ui ShortcutActionHandler ShortcutActionHandler

List of usage examples for com.vaadin.client.ui ShortcutActionHandler ShortcutActionHandler

Introduction

In this page you can find the example usage for com.vaadin.client.ui ShortcutActionHandler ShortcutActionHandler.

Prototype

public ShortcutActionHandler(String pid, ApplicationConnection c) 

Source Link

Usage

From source file:com.haulmont.cuba.web.toolkit.ui.client.combobox.CubaComboBoxConnector.java

License:Apache License

@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
    super.updateFromUIDL(uidl, client);

    // We may have actions attached to this text field
    if (uidl.getChildCount() > 0) {
        final int cnt = uidl.getChildCount();
        for (int i = 0; i < cnt; i++) {
            UIDL childUidl = uidl.getChildUIDL(i);
            if (childUidl.getTag().equals("actions")) {
                if (getWidget().getShortcutActionHandler() == null) {
                    getWidget().setShortcutActionHandler(new ShortcutActionHandler(uidl.getId(), client));
                }// w ww .  j  a va2  s  .co m
                getWidget().getShortcutActionHandler().updateActionMap(childUidl);
            }
        }
    }
}

From source file:com.haulmont.cuba.web.toolkit.ui.client.cssactionslayout.CubaCssActionsLayoutConnector.java

License:Apache License

@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
    final int cnt = uidl.getChildCount();
    for (int i = 0; i < cnt; i++) {
        UIDL childUidl = uidl.getChildUIDL(i);
        if (childUidl.getTag().equals("actions")) {
            if (getWidget().getShortcutHandler() == null) {
                getWidget().setShortcutHandler(new ShortcutActionHandler(uidl.getId(), client));
            }//w  w  w.  j a v  a 2  s .  c  om
            getWidget().getShortcutHandler().updateActionMap(childUidl);
        }
    }
}

From source file:com.haulmont.cuba.web.toolkit.ui.client.datefield.CubaDateFieldConnector.java

License:Apache License

@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
    super.updateFromUIDL(uidl, client);

    getWidget().updateTextState();/*from  w w w. ja v  a 2s .c  o m*/

    // We may have actions attached to this text field
    if (uidl.getChildCount() > 0) {
        final int cnt = uidl.getChildCount();
        for (int i = 0; i < cnt; i++) {
            UIDL childUidl = uidl.getChildUIDL(i);
            if (childUidl.getTag().equals("actions")) {
                if (getWidget().getShortcutActionHandler() == null) {
                    getWidget().setShortcutActionHandler(new ShortcutActionHandler(uidl.getId(), client));
                }
                getWidget().getShortcutActionHandler().updateActionMap(childUidl);
            }
        }
    }
}

From source file:com.haulmont.cuba.web.toolkit.ui.client.tree.CubaTreeConnector.java

License:Apache License

@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
    super.updateFromUIDL(uidl, client);

    getWidget().setDoubleClickHandling(false);

    getWidget().nodeCaptionsAsHtml = uidl.getBooleanAttribute("nodeCaptionsAsHtml");

    // We may have actions attached to this tree
    if (uidl.getChildCount() > 1) {
        final int cnt = uidl.getChildCount();
        for (int i = 1; i < cnt; i++) {
            UIDL childUidl = uidl.getChildUIDL(i);
            if (childUidl.getTag().equals("shortcuts")) {
                if (getWidget().getShortcutActionHandler() == null) {
                    getWidget().setShortcutActionHandler(new ShortcutActionHandler(uidl.getId(), client));
                }/*from  w  w  w. jav a 2 s .c o m*/
                getWidget().getShortcutActionHandler().updateActionMap(childUidl);
            }
        }
    }
}