Java 类com.google.gwt.event.dom.client.KeyDownHandler 实例源码

项目:appformer    文件:EntitiesExplorerViewImpl.java   
@Override
public EntitiesExplorerView configure(final String entityType,
                                      final EntitiesList.View entitiesListView) {
    this.entitiesListView = entitiesListView;
    this.entityType = entityType;

    initWidget(uiBinder.createAndBindUi(this));
    searchBox.addKeyDownHandler(new KeyDownHandler() {

        @Override
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                doSearch(searchBox.getText());
            }
        }
    });
    searchButton.addClickHandler(e -> doSearch(searchBox.getText()));

    clearSearchButton.addDomHandler(new ClickHandler() {
                                        @Override
                                        public void onClick(final ClickEvent clickEvent) {
                                            doSearch("");
                                        }
                                    },
                                    ClickEvent.getType());
    clearSearch();
    return this;
}
项目:gerrit    文件:Hashtags.java   
public Hashtags() {

    initWidget(uiBinder.createAndBindUi(this));

    hashtagTextBox.setVisibleLength(VISIBLE_LENGTH);
    hashtagTextBox.addKeyDownHandler(
        new KeyDownHandler() {
          @Override
          public void onKeyDown(KeyDownEvent e) {
            if (e.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
              onCancel(null);
            } else if (e.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
              onAdd(null);
            }
          }
        });

    addHashtagIcon.addDomHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            onOpenForm();
          }
        },
        ClickEvent.getType());
  }
项目:appformer    文件:SecretTextField.java   
private void addKeyDownHandler(final PropertyEditorFieldInfo property,
                               final PropertyEditorPasswordTextBox passwordTextBox) {
    passwordTextBox.addKeyDownHandler(new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                if (validate(property,
                             passwordTextBox.getText())) {
                    passwordTextBox.clearOldValidationErrors();
                    property.setCurrentStringValue(passwordTextBox.getText());
                    propertyEditorChangeEventEvent.fire(new PropertyEditorChangeEvent(property,
                                                                                      passwordTextBox.getText()));
                } else {
                    passwordTextBox.setValidationError(getValidatorErrorMessage(property,
                                                                                passwordTextBox.getText()));
                    passwordTextBox.setText(property.getCurrentStringValue());
                }
            }
        }
    });
}
项目:appformer    文件:TextField.java   
private void addEnterKeyHandler(final PropertyEditorFieldInfo property,
                                final PropertyEditorTextBox textBox) {
    textBox.addKeyDownHandler(new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                if (validate(property,
                             textBox.getText())) {
                    textBox.clearOldValidationErrors();
                    property.setCurrentStringValue(textBox.getText());
                    propertyEditorChangeEventEvent.fire(new PropertyEditorChangeEvent(property,
                                                                                      textBox.getText()));
                } else {
                    textBox.setValidationError(getValidatorErrorMessage(property,
                                                                        textBox.getText()));
                    textBox.setText(property.getCurrentStringValue());
                }
            }
        }
    });
}
项目:platypus-js    文件:EventsExecutor.java   
public void setKeyPressed(JavaScriptObject aValue) {
    if (keyPressed != aValue) {
        if (keyDownReg != null) {
            keyDownReg.removeHandler();
            keyDownReg = null;
        }
        keyPressed = aValue;
        if (keyPressed != null && component instanceof HasKeyDownHandlers) {
            keyDownReg = ((HasKeyDownHandlers) component).addKeyDownHandler(new KeyDownHandler() {
                @Override
                public void onKeyDown(KeyDownEvent event) {
                    if (keyPressed != null) {
                        event.stopPropagation();
                        executeEvent(keyPressed, EventsPublisher.publish(event));
                    }
                }
            });
        }
    }
}
项目:qafe-platform    文件:EventFactory.java   
public static KeyDownHandler createSuggestionHandler(final UIObject sender, final EventListenerGVO ev, final List<InputVariableGVO> input) {
    return new KeyDownHandler() {
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                if (event.getSource() instanceof QSuggestBox) {
                    QSuggestBox qSuggestBox = (QSuggestBox) event.getSource();
                    String expression = qSuggestBox.getText();
                    if (expression != null) {
                        if (expression.length() >= qSuggestBox.getSuggestCharactersLength()) {
                            qSuggestBox.clearSuggestions();
                            CallbackHandler.createCallBack(sender, QAMLConstants.EVENT_ONCHANGE, ev, input);
                        }
                    }
                }
            }
        }
    };
}
项目:swcv    文件:WordCloudApp.java   
private TextArea createTextArea()
{
    TextArea textArea = TextArea.wrap(Document.get().getElementById("input_text"));
    textArea.addKeyDownHandler(new KeyDownHandler()
    {
        public void onKeyDown(KeyDownEvent event)
        {
            event.preventDefault();
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
            {
                createWordCloud();
            }
        }
    });

    return textArea;
}
项目:drools-wb    文件:GuidedDecisionTableModellerPresenterTest.java   
@Before
public void setup() {
    when(gridLayer.addNodeMouseMoveHandler(any(NodeMouseMoveHandler.class))).thenReturn(mock(HandlerRegistration.class));
    when(gridLayer.addNodeMouseOutHandler(any(NodeMouseOutHandler.class))).thenReturn(mock(HandlerRegistration.class));
    when(view.addKeyDownHandler(any(KeyDownHandler.class))).thenReturn(mock(HandlerRegistration.class));
    when(view.addContextMenuHandler(any(ContextMenuHandler.class))).thenReturn(mock(HandlerRegistration.class));
    when(view.addMouseDownHandler(any(MouseDownHandler.class))).thenReturn(mock(HandlerRegistration.class));
    when(view.getGridLayerView()).thenReturn(gridLayer);
    when(view.getBounds()).thenReturn(bounds);

    final GuidedDecisionTableModellerPresenter wrapped = new GuidedDecisionTableModellerPresenter(view,
                                                                                                  dtablePresenterProvider,
                                                                                                  contextMenuSupport,
                                                                                                  updateRadarEvent,
                                                                                                  pinnedEvent,
                                                                                                  columnHeaderPopOver,
                                                                                                  wizardManagedInstance);
    presenter = spy(wrapped);

    when(dtablePresenterProvider.get()).thenReturn(dtablePresenter);
    when(dtablePresenter.getView()).thenReturn(dtableView);
    when(dtableView.getModel()).thenReturn(new BaseGridData());
}
项目:kie-wb-common    文件:ProjectClassListViewImpl.java   
public ProjectClassListViewImpl() {

        dataGrid.setEmptyTableCaption( Constants.INSTANCE.project_class_list_no_classes_message() );
        dataGrid.setToolBarVisible( false );

        addClassNameColumn();
        addRemoveRowColumn();

        initWidget( uiBinder.createAndBindUi( this ) );

        newClassTextBox.addKeyDownHandler( new KeyDownHandler() {
            @Override
            public void onKeyDown( KeyDownEvent event ) {
                presenter.onClassNameChange();
            }
        } );
    }
项目:kie-wb-common    文件:AssigneeListItemWidgetViewImpl.java   
@PostConstruct
public void init() {
    // Configure name and customName controls
    nameComboBox.init(this,
                      true,
                      name,
                      customName,
                      false,
                      false,
                      CUSTOM_PROMPT,
                      ENTER_TYPE_PROMPT);
    customName.addKeyDownHandler(new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
            int iChar = event.getNativeKeyCode();
            if (iChar == ' ') {
                event.preventDefault();
            }
        }
    });
}
项目:kie-wb-common    文件:AssigneeListItemWidgetTest.java   
@Test
public void testInitWidget() {
    widget.init();
    verify(widget,
           times(1)).init();
    verify(nameComboBox,
           times(1)).init(widget,
                          true,
                          name,
                          customName,
                          false,
                          false,
                          AssigneeListItemWidgetView.CUSTOM_PROMPT,
                          AssigneeListItemWidgetView.ENTER_TYPE_PROMPT);
    verify(customName,
           times(1)).addKeyDownHandler(any(KeyDownHandler.class));
}
项目:kie-wb-common    文件:PopupNumericBigIntegerEditCell.java   
public PopupNumericBigIntegerEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupNumericShortEditCell.java   
public PopupNumericShortEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:AbstractProxyPopupDropDownTextBox.java   
public AbstractProxyPopupDropDownTextBox(final TextBox textBox,
                                         final AbstractProxyPopupDropDownEditCell proxy) {

    this.textBox = textBox;

    // Tabbing out of the ListBox commits changes
    textBox.addKeyDownHandler(new KeyDownHandler() {

        public void onKeyDown(KeyDownEvent event) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if (keyEnter || keyTab) {
                proxy.commit();
            }
        }
    });
}
项目:kie-wb-common    文件:PopupNumericBigDecimalEditCell.java   
public PopupNumericBigDecimalEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupNumericLongEditCell.java   
public PopupNumericLongEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupNumericDoubleEditCell.java   
public PopupNumericDoubleEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:AbstractProxyPopupDropDownListBox.java   
public AbstractProxyPopupDropDownListBox(final AbstractProxyPopupDropDownEditCell proxy) {

        this.listBox = new ListBox();
        this.proxy = proxy;

        // Tabbing out of the ListBox commits changes
        listBox.addKeyDownHandler(new KeyDownHandler() {

            public void onKeyDown(KeyDownEvent event) {
                boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
                boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
                if (keyEnter || keyTab) {
                    proxy.commit();
                }
            }
        });
    }
项目:kie-wb-common    文件:PopupTextEditCell.java   
public PopupTextEditCell( boolean isReadOnly ) {
    super( isReadOnly );
    this.textBox = new TextBox();

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyTab
                    || keyEnter ) {
                commit();
            }
        }

    } );
    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupNumericEditCell.java   
public PopupNumericEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupValueListDropDownEditCell.java   
public PopupValueListDropDownEditCell( final String[] items,
                                       final boolean isMultipleSelect,
                                       final boolean isReadOnly ) {
    super( isReadOnly );

    this.listBox.setMultipleSelect( isMultipleSelect );
    setItems( items );

    // Tabbing out of the ListBox commits changes
    listBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter
                    || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( listBox );
}
项目:kie-wb-common    文件:PopupNumericIntegerEditCell.java   
public PopupNumericIntegerEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupNumericByteEditCell.java   
public PopupNumericByteEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:kie-wb-common    文件:PopupDialectDropDownEditCell.java   
public PopupDialectDropDownEditCell( boolean isReadOnly ) {
    super( isReadOnly );
    this.listBox = new ListBox();

    setItems( DIALECTS );

    // Tabbing out of the ListBox commits changes
    listBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter
                    || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( listBox );
}
项目:kie-wb-common    文件:PopupNumericFloatEditCell.java   
public PopupNumericFloatEditCell( boolean isReadOnly ) {
    super( isReadOnly );

    // Tabbing out of the TextBox commits changes
    textBox.addKeyDownHandler( new KeyDownHandler() {

        public void onKeyDown( KeyDownEvent event ) {
            boolean keyTab = event.getNativeKeyCode() == KeyCodes.KEY_TAB;
            boolean keyEnter = event.getNativeKeyCode() == KeyCodes.KEY_ENTER;
            if ( keyEnter || keyTab ) {
                commit();
            }
        }

    } );

    vPanel.add( textBox );
}
项目:unitimes    文件:FilterBox.java   
private void fixHandlers(final FilterBox box, Widget w) {
    if (w instanceof HasBlurHandlers)
        ((HasBlurHandlers)w).addBlurHandler(box.iBlurHandler);
    if (w instanceof HasFocusHandlers)
        ((HasFocusHandlers)w).addFocusHandler(box.iFocusHandler);
    if (w instanceof HasKeyDownHandlers)
        ((HasKeyDownHandlers)w).addKeyDownHandler(new KeyDownHandler() {
            @Override
            public void onKeyDown(KeyDownEvent event) {
                if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE)
                    if (box.isFilterPopupShowing()) box.hideFilterPopup();
            }
        });
}
项目:che    文件:ProjectClasspathViewImpl.java   
@Inject
protected ProjectClasspathViewImpl(
    org.eclipse.che.ide.Resources resources,
    JavaLocalizationConstant localization,
    ProjectClasspathResources commandResources) {
  this.localization = localization;
  this.commandResources = commandResources;

  Map<Object, List<Object>> categories = new HashMap<>();

  commandResources.getCss().ensureInjected();

  setWidget(UI_BINDER.createAndBindUi(this));
  setTitle(localization.projectClasspathTitle());
  getWidget().getElement().setId("classpathManagerView");

  list = new CategoriesList(resources);
  list.addDomHandler(
      new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
          switch (event.getNativeKeyCode()) {
            case KeyboardEvent.KeyCode.INSERT:
              break;
            case KeyboardEvent.KeyCode.DELETE:
              break;
          }
        }
      },
      KeyDownEvent.getType());
  categoriesPanel.add(list);

  contentPanel.clear();

  createButtons();

  getWidget().getElement().getStyle().setPadding(0, Style.Unit.PX);
}
项目:r01fb    文件:GWTWidgets.java   
/**
 * Sets the KeyDown event handler in many widgets
 * @param handler the handler
 * @param widgets the widgets
 */
public static void addKeyDownHandler(final KeyDownHandler handler,final HasKeyDownHandlers... widgets) {
    if (handler != null && widgets != null && widgets.length > 0) {
        for (HasKeyDownHandlers w : widgets) {
            if (w != null) w.addKeyDownHandler(handler);
        }
    }
}
项目:gerrit    文件:PreferencesBox.java   
@Override
public void onLoad() {
  super.onLoad();

  save.setVisible(Gerrit.isSignedIn());

  if (view != null) {
    addDomHandler(
        new KeyDownHandler() {
          @Override
          public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KEY_ESCAPE || event.getNativeKeyCode() == ',') {
              close();
            }
          }
        },
        KeyDownEvent.getType());

    updateContextTimer =
        new Timer() {
          @Override
          public void run() {
            if (prefs.context() == WHOLE_FILE_CONTEXT) {
              contextEntireFile.setValue(true);
            }
            if (view.canRenderEntireFile(prefs)) {
              renderEntireFile.setEnabled(true);
              renderEntireFile.setValue(prefs.renderEntireFile());
            } else {
              renderEntireFile.setValue(false);
              renderEntireFile.setEnabled(false);
            }
            view.setContext(prefs.context());
          }
        };
  }
}
项目:unitime    文件:FilterBox.java   
private void fixHandlers(final FilterBox box, Widget w) {
    if (w instanceof HasBlurHandlers)
        ((HasBlurHandlers)w).addBlurHandler(box.iBlurHandler);
    if (w instanceof HasFocusHandlers)
        ((HasFocusHandlers)w).addFocusHandler(box.iFocusHandler);
    if (w instanceof HasKeyDownHandlers)
        ((HasKeyDownHandlers)w).addKeyDownHandler(new KeyDownHandler() {
            @Override
            public void onKeyDown(KeyDownEvent event) {
                if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE)
                    if (box.isFilterPopupShowing()) box.hideFilterPopup();
            }
        });
}
项目:appformer    文件:BaseModal.java   
protected KeyDownHandler getEnterDomHandler() {
    return new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                if (handleDefaultAction()) {
                    event.preventDefault();
                    event.stopPropagation();
                }
            }
        }
    };
}
项目:platypus-js    文件:PlatypusSplitButton.java   
public PlatypusSplitButton(String aTitle, boolean asHtml, ImageResource aImage, MenuBar aMenu) {
    super(aTitle, asHtml, aImage, aMenu);
    addKeyDownHandler(new KeyDownHandler(){

        @Override
           public void onKeyDown(KeyDownEvent event) {
            if(event.getNativeKeyCode() == KeyCodes.KEY_ENTER || event.getNativeKeyCode() == KeyCodes.KEY_SPACE){
                ActionEvent.fire(PlatypusSplitButton.this, PlatypusSplitButton.this);
            }
           }

    });
}
项目:qafe-platform    文件:EventFactory.java   
public static KeyDownHandler createOnEnterListener(final EventListenerGVO ev, final List<InputVariableGVO> input) {
    return new KeyDownHandler() {
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                CallbackHandler.createCallBack(event.getSource(), QAMLConstants.EVENT_ONENTER, ev, input);
            }
        }
    };
}
项目:qafe-platform    文件:EventFactory.java   
public static KeyDownHandler createOnKeyDownListener(final EventListenerGVO ev, final List<InputVariableGVO> input) {
    return new KeyDownHandler() {
        public void onKeyDown(KeyDownEvent event) {
            handleKeyInput(event.getSource(), event.getNativeEvent(), QAMLConstants.EVENT_ONKEYDOWN, ev, input);
        }
    };
}
项目:qafe-platform    文件:ActivityHelper.java   
private static KeyDownHandler createKeyEnterHandler(final ComponentGVO componentGVO, final EventListenerGVO eventGVO, final NotifyHandler notifyHandler, final String windowId, final String context, final AbstractActivity activity) {
    return new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                UIObject widget = (UIObject)event.getSource();
                List<InputVariableGVO> inputVariables = eventGVO.getInputvariablesList();
                handleEvent(componentGVO, widget, eventGVO, event, QAMLConstants.EVENT_ONENTER, inputVariables, notifyHandler, windowId, context, activity);
            }
        }
    };
}
项目:drools-wb    文件:ListBoxSingletonDOMElementFactoryTest.java   
@Test
public void checkDOMElementCreationChecksListBoxIsMultipleSelect() {
    factory.createDomElement(gridLayer,
                             gridWidget,
                             cellRenderContext);

    verify(listBox).addMouseDownHandler(any(MouseDownHandler.class));
    verify(listBox).addKeyDownHandler(any(KeyDownHandler.class));
    verify(listBox).addBlurHandler(any(BlurHandler.class));
    verify(listBox).isMultipleSelect();
}
项目:drools-wb    文件:GuidedDecisionTableModellerViewImplTest.java   
@Test
public void testAddKeyDownHandlerAttachesToEditor() {
    //Ensure nobody thinks its a good idea to attach to the RootPanel at some time in the future!
    //See https://issues.jboss.org/browse/GUVNOR-3146
    final KeyDownHandler handler = mock(KeyDownHandler.class);

    view.addKeyDownHandler(handler);

    verify(rootPanel,
           never()).addDomHandler(eq(handler),
                                  eq(KeyDownEvent.getType()));
    verify(mockGridPanel).addKeyDownHandler(eq(handler));
}
项目:drools-wb    文件:KeyDownHandlerCommonTest.java   
@Override
protected KeyDownHandler getHandler() {
    return new KeyDownHandlerCommon(gridPanel,
                                    gridLayer,
                                    gridWidget,
                                    gridCell,
                                    context);
}
项目:drools-wb    文件:KeyDownHandlerDatePickerTest.java   
@Override
protected KeyDownHandler getHandler() {
    return new KeyDownHandlerDatePicker(gridPanel,
                                        gridLayer,
                                        gridWidget,
                                        gridCell,
                                        context);
}