Examples of KeyUpHandler


Examples of com.google.gwt.event.dom.client.KeyUpHandler

        
        
         findTextBox_ = new FindTextBox("Find in Topic");
         findTextBox_.setOverrideWidth(90);
         toolbar.addLeftWidget(findTextBox_);
         findTextBox_.addKeyUpHandler(new KeyUpHandler() {
           
            @Override
            public void onKeyUp(KeyUpEvent event)
            {    
               WindowEx contentWindow = getContentWindow();
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

                makeDirty();
            }

        } );

        box.addKeyUpHandler( new KeyUpHandler() {

            public void onKeyUp( KeyUpEvent event ) {
                box.setVisibleLength( box.getText().length() );
            }
        } );
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

    //Only display the number of characters that have been entered
    private void attachDisplayLengthHandler( final TextBox box ) {
        int length = box.getText().length();
        box.setVisibleLength( length > 0 ? length : 1 );
        box.addKeyUpHandler( new KeyUpHandler() {

            public void onKeyUp( KeyUpEvent event ) {
                int length = box.getText().length();
                box.setVisibleLength( length > 0 ? length : 1 );
            }
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

        filterTable = new FlexTable();
        filterTableCellFormatter = filterTable.getFlexCellFormatter();
        filterLabel = new Label(messages.filter() + ":");
        filterTextBox = new TextBox();
        filterTextBox.setEnabled(false);
        filterTextBox.addKeyUpHandler(new KeyUpHandler() {
            @Override
            public void onKeyUp(KeyUpEvent event) {
                filterBlueprints(filterTextBox.getText());
            }
        });
        blueprintTable = new FlexTable();
        blueprintTableRowFormatter = blueprintTable.getRowFormatter();

        reloadButton = new Button(messages.reload());
        reloadButton.setEnabled(false);
        hideButton = new Button(messages.hide());
        hideButton.setEnabled(false);
        hideButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                if (blueprintTable.isVisible()) {
                    filterTableCellFormatter.setVisible(0, 0, false);
                    filterTableCellFormatter.setVisible(0, 2, false);
                    filterTableCellFormatter.setVisible(0, 3, false);
                    blueprintTable.setVisible(false);
                    hideButton.setText(messages.show());
                } else {
                    filterTableCellFormatter.setVisible(0, 0, true);
                    filterTableCellFormatter.setVisible(0, 2, true);
                    filterTableCellFormatter.setVisible(0, 3, true);
                    blueprintTable.setVisible(true);
                    hideButton.setText(messages.hide());
                }
            }
        });

        corporationLibraryTitleLabel = new Label(messages.corporationLibrary());
        corporationLibraryTitleLabel.addStyleName(resources.css().tabHeadingText());
        corporationFilterTable = new FlexTable();
        corporationFilterTableCellFormatter = corporationFilterTable.getFlexCellFormatter();
        corporationFilterLabel = new Label(messages.filter() + ":");
        corporationFilterLabel.setVisible(false);
        corporationFilterTextBox = new TextBox();
        corporationFilterTextBox.setEnabled(false);
        corporationFilterTextBox.setVisible(false);
        corporationFilterTextBox.addKeyUpHandler(new KeyUpHandler() {
            @Override
            public void onKeyUp(KeyUpEvent event) {
                filterCorporationBlueprints(corporationFilterTextBox.getText());
            }
        });
        corporationBlueprintTable = new FlexTable();
        corporationBlueprintTableRowFormatter = corporationBlueprintTable.getRowFormatter();
        corporationReloadButton = new Button(messages.load());
        corporationReloadButton.setEnabled(false);
        corporationHideButton = new Button(messages.hide());
        corporationHideButton.setEnabled(false);
        corporationHideButton.setVisible(false);
        corporationHideButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                if (corporationBlueprintTable.isVisible()) {
                    corporationFilterTableCellFormatter.setVisible(0, 0, false);
                    corporationFilterTableCellFormatter.setVisible(0, 2, false);
                    corporationFilterTableCellFormatter.setVisible(0, 3, false);
                    corporationBlueprintTable.setVisible(false);
                    corporationHideButton.setText(messages.show());
                } else {
                    corporationFilterTableCellFormatter.setVisible(0, 0, true);
                    corporationFilterTableCellFormatter.setVisible(0, 2, true);
                    corporationFilterTableCellFormatter.setVisible(0, 3, true);
                    corporationBlueprintTable.setVisible(true);
                    corporationHideButton.setText(messages.hide());
                }
            }
        });

        allianceLibraryTitleLabel = new Label(messages.allianceLibrary());
        allianceLibraryTitleLabel.addStyleName(resources.css().tabHeadingText());
        allianceFilterTable = new FlexTable();
        allianceFilterTableCellFormatter = allianceFilterTable.getFlexCellFormatter();
        allianceFilterLabel = new Label(messages.filter() + ":");
        allianceFilterLabel.setVisible(false);
        allianceFilterTextBox = new TextBox();
        allianceFilterTextBox.setEnabled(false);
        allianceFilterTextBox.setVisible(false);
        allianceFilterTextBox.addKeyUpHandler(new KeyUpHandler() {
            @Override
            public void onKeyUp(KeyUpEvent event) {
                filterAllianceBlueprints(allianceFilterTextBox.getText());
            }
        });
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

        userPrice.setTabIndex(1);
        userPrice.setTabIndex(2);
        ask.setTabIndex(3);
        bid.setTabIndex(4);

        userPrice.addKeyUpHandler(new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent event) {
                if (userPrice.getText().trim().length() == 0)
                    return;
                double price = 0.0;
                try {
                    price = Double.parseDouble(userPrice.getText());
                } catch (NumberFormatException e) {
                    MessageBox.alert(userPrice.getText() + " must be a number");
                    return;
                }
                double diff = calculateDiff(price, getSelectedStock().getMarketPrice());
                margin.setText(FormatUtil.priceFormat.format(diff));
                gain.setText(FormatUtil.changeFormat.format(diff * Integer.parseInt(userVolume.getText())));
            }
        });
        userVolume.addKeyUpHandler(new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent event) {
                if (userVolume.getText().trim().length() == 0)
                    return;
                int volume = 0;
                try {
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

      AuthorProxy author) {
    this.requestFactory = requestFactory;
    this.author = author;
    authorEditor = new AuthorEditor();
    Binder.BINDER.createAndBindUi(this);
    contents.addDomHandler(new KeyUpHandler() {
      @Override
      public void onKeyUp(KeyUpEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
          onCancel(null);
        }
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

            SelectionEvent.fire(GroupReferenceBox.this, getValue());
          }
        }
      }
    });
    suggestBox.addKeyUpHandler(new KeyUpHandler() {
      @Override
      public void onKeyUp(KeyUpEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
          suggestBox.setText("");
          CloseEvent.fire(GroupReferenceBox.this, GroupReferenceBox.this);
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

        final TextBox filter = new TextBox();
        filter.setMaxLength(30);
        filter.setVisibleLength(20);
        filter.getElement().setAttribute("style", "float:right; width:120px;");
        filter.addKeyUpHandler(new KeyUpHandler() {
            @Override
            public void onKeyUp(KeyUpEvent keyUpEvent) {
                String prefix = filter.getText();
                if(prefix!=null && !prefix.equals(""))
                {
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

          showPrompt(true);
        }
      }
    });

    textBox.addKeyUpHandler(new KeyUpHandler() {
      @Override
      public void onKeyUp(KeyUpEvent event) {
        String value = getValue();
        promptVisibility = !(value != null && value.length() > 0);
      }
View Full Code Here

Examples of com.google.gwt.event.dom.client.KeyUpHandler

        myHandlerRegistrations = new ArrayList<HandlerRegistration>();

        myMessageTextBox = new TextBox();
        myMessageTextBox.setMaxLength(250);
        myMessageTextBox.setWidth("240px");
        myMessageTextBox.addKeyUpHandler(new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent aKeyUpEvent) {
                if(aKeyUpEvent.getNativeKeyCode() == 13) {
                    mySendButton.click();
                }
            }
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.