Search in sources :

Example 16 with KeyUpEvent

use of com.google.gwt.event.dom.client.KeyUpEvent in project gerrit by GerritCodeReview.

the class GroupListScreen method initPageHeader.

private void initPageHeader() {
    final HorizontalPanel hp = new HorizontalPanel();
    hp.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
    final Label filterLabel = new Label(AdminConstants.I.projectFilter());
    filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
    hp.add(filterLabel);
    filterTxt = new NpTextBox();
    filterTxt.setValue(match);
    filterTxt.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            Query q = new Query(filterTxt.getValue()).open(event.getNativeKeyCode() == KeyCodes.KEY_ENTER);
            if (match.equals(q.qMatch)) {
                q.start(start);
            }
            if (q.open || !match.equals(q.qMatch)) {
                if (query == null) {
                    q.run();
                }
                query = q;
            }
        }
    });
    hp.add(filterTxt);
    add(hp);
}
Also used : KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Label(com.google.gwt.user.client.ui.Label) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler) NpTextBox(com.google.gwtexpui.globalkey.client.NpTextBox)

Example 17 with KeyUpEvent

use of com.google.gwt.event.dom.client.KeyUpEvent in project gerrit by GerritCodeReview.

the class ProjectListPopup method createWidgets.

private void createWidgets(final String popupText, final String currentPageLink) {
    filterPanel = new HorizontalPanel();
    filterPanel.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
    final Label filterLabel = new Label(com.google.gerrit.client.admin.AdminConstants.I.projectFilter());
    filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
    filterPanel.add(filterLabel);
    filterTxt = new NpTextBox();
    filterTxt.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            Query q = new Query(filterTxt.getValue());
            if (!match.equals(q.qMatch)) {
                if (query == null) {
                    q.run();
                }
                query = q;
            }
        }
    });
    filterPanel.add(filterTxt);
    projectsTab = new HighlightingProjectsTable() {

        @Override
        protected void movePointerTo(final int row, final boolean scroll) {
            super.movePointerTo(row, scroll);
            onMovePointerTo(getRowItem(row).name());
        }

        @Override
        protected void onOpenRow(final int row) {
            super.onOpenRow(row);
            openRow(getRowItem(row).name());
        }
    };
    projectsTab.setSavePointerId(currentPageLink);
    closeTop = createCloseButton();
    closeBottom = createCloseButton();
    popup = new DialogBox();
    popup.setModal(false);
    popup.setText(popupText);
}
Also used : KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Label(com.google.gwt.user.client.ui.Label) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler) NpTextBox(com.google.gwtexpui.globalkey.client.NpTextBox) DialogBox(com.google.gwt.user.client.ui.DialogBox)

Aggregations

KeyUpEvent (com.google.gwt.event.dom.client.KeyUpEvent)17 KeyUpHandler (com.google.gwt.event.dom.client.KeyUpHandler)15 BlurEvent (com.google.gwt.event.dom.client.BlurEvent)5 BlurHandler (com.google.gwt.event.dom.client.BlurHandler)5 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)5 Label (com.google.gwt.user.client.ui.Label)5 NpTextBox (com.google.gwtexpui.globalkey.client.NpTextBox)5 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)4 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)4 KeyPressEvent (com.google.gwt.event.dom.client.KeyPressEvent)4 KeyDownEvent (com.google.gwt.event.dom.client.KeyDownEvent)3 KeyPressHandler (com.google.gwt.event.dom.client.KeyPressHandler)3 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)2 KeyDownHandler (com.google.gwt.event.dom.client.KeyDownHandler)2 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)2 PerunError (cz.metacentrum.perun.webgui.model.PerunError)2 TabItem (cz.metacentrum.perun.webgui.tabs.TabItem)2 CustomButton (cz.metacentrum.perun.webgui.widgets.CustomButton)2 TabMenu (cz.metacentrum.perun.webgui.widgets.TabMenu)2 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)1