Package com.google.gwt.event.dom.client

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


            @Override
            public void onBlur(BlurEvent event) {
                wrapper.setValue(false);
            }
        });
        editionArea.addFocusHandler(new FocusHandler() {
            @Override
            public void onFocus(FocusEvent event) {
                wrapper.setValue(true);
            }
        });
View Full Code Here


            @Override
            public void onBlur(BlurEvent event) {
                wrapper.setValue(false);
            }
        });
        editorArea.addFocusHandler(new FocusHandler() {
            @Override
            public void onFocus(FocusEvent event) {
                wrapper.setValue(true);
            }
        });
View Full Code Here

            public void onBlur(BlurEvent event) {
                wrapper.setValue(false);
                item.reset();
            }
        });
        textBox.addFocusHandler(new FocusHandler() {
            @Override
            public void onFocus(FocusEvent event) {
                wrapper.setValue(true);
            }
        });
View Full Code Here

            @Override
            public void onBlur(BlurEvent event) {
                reset();
            }
        });
        EventHelper.addFocusHandler(this, new FocusHandler() {
            @Override
            public void onFocus(FocusEvent event) {
                makeEditor();
            }
        });
View Full Code Here

    eventPanel.add(updateTitle);
    eventPanel.add(updateEditor);
    eventPanel.add(summaryTitle);
    eventPanel.add(summaryEditor);

    dateTrigger.addFocusHandler(new FocusHandler() {
      @Override
      public void onFocus(FocusEvent event) {
        datePopup.showRelativeTo(dateTrigger);
      }
    });
View Full Code Here

      }
    });
    // FIXME: Hack to solve some IE6 issues
    if (Window.Navigator.getUserAgent().contains("MSIE")) {
      // Trying to force that the whole value is selected when receiving the focus
      hoursBox.addFocusHandler(new FocusHandler() {
        @Override
        public void onFocus(FocusEvent event) {
            hoursBox.setFocus(true);
            hoursBox.selectAll();
        }
      });
      minutesBox.addFocusHandler(new FocusHandler() {
        @Override
        public void onFocus(FocusEvent event) {
            minutesBox.setFocus(true);
          minutesBox.selectAll();
        }
View Full Code Here

    text.addStyleName(CLASSNAME + "-textfield");
    text.addKeyDownHandler(this);
    text.addKeyUpHandler(this);
    text.addChangeHandler(this);
   
    text.addFocusHandler(new FocusHandler() {
      @Override
      public void onFocus(FocusEvent event) {
        hasFocus = true;
       
        text.addStyleName(VTextField.CLASSNAME + "-" + VTextField.CLASSNAME_FOCUS);
View Full Code Here

                    dateFrom.setText(dts.formatDate(intervalStartDate,
                            dateFormatInfo.getEditFormat().getPattern()));
                }
            }
        });
        dateFrom.addFocusHandler(new FocusHandler() {
            @Override
            public void onFocus(FocusEvent event) {
                dateFrom.setStyleName(CLASSNAME_DATEFIELDEDIT);
                dateFrom.setText(dts.formatDate(intervalStartDate,
                        dateFormatInfo.getEditFormat().getPattern()));
                dateFrom.selectAll();
            }
        });
        dateFrom.addBlurHandler(new BlurHandler() {
            @Override
            public void onBlur(BlurEvent event) {
                dateFrom.setStyleName(CLASSNAME_DATEFIELD);
                dateFrom.setText(dts.formatDate(intervalStartDate,
                        dateFormatInfo.getDisplayFormat().getPattern()));
            }
        });
        dateFrom.setReadOnly(!dateSelectEnabled);
        dateFrom.setStyleName(CLASSNAME_DATEFIELD);
        dateRangeBar.add(dateFrom);

        Label dash = new Label();
        dash.setText("-");
        dateRangeBar.add(dash);

        dateTo = new TextBox();
        dateTo.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                try {
                    Date newDate = dts.parseDate(event.getValue(),
                            dateFormatInfo.getEditFormat().getPattern(), true);
                    if ((newDate.equals(startDate) || newDate.after(startDate))
                            && (newDate.equals(endDate) || newDate
                                    .before(endDate))) {
                        intervalEndDate = newDate;
                        setBrowserRange(intervalStartDate, intervalEndDate);
                        setDisplayRange(intervalStartDate, intervalEndDate);
                        dateTo.setFocus(false);
                    } else {
                        dateTo.setText(dts.formatDate(intervalEndDate,
                                dateFormatInfo.getEditFormat().getPattern()));
                    }
                } catch (IllegalArgumentException iae) {
                    dateTo.setText(dts.formatDate(intervalEndDate,
                            dateFormatInfo.getEditFormat().getPattern()));
                }
            }
        });
        dateTo.addFocusHandler(new FocusHandler() {
            @Override
            public void onFocus(FocusEvent event) {
                dateTo.setStyleName(CLASSNAME_DATEFIELDEDIT);
                dateTo.setText(dts.formatDate(intervalEndDate, dateFormatInfo
                        .getEditFormat().getPattern()));
View Full Code Here

    StaticFocusedResizePanel panel = new StaticFocusedResizePanel();

    public StaticWorkbenchPanelView() {

        panel.addFocusHandler( new FocusHandler() {
            @Override
            public void onFocus( final FocusEvent event ) {
                panelManager.onPanelFocus( presenter.getDefinition() );
            }
        } );
View Full Code Here

        } else {
            dropdownCaretContainer.setVisible( false );
            closeButtonContainer.setVisible( false );
        }

        container.addFocusHandler( new FocusHandler() {
            @Override
            public void onFocus( FocusEvent event ) {
                if ( currentPart != null && currentPart.getK1() != null ) {
                    selectPart( currentPart.getK1() );
                }
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.FocusHandler

Copyright © 2018 www.massapicom. 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.