Java Code Examples for com.google.gwt.event.dom.client.BlurHandler

The following examples show how to use com.google.gwt.event.dom.client.BlurHandler. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: gwt-traction   Source File: ViewportImplIE.java    License: Apache License 2.0 5 votes vote down vote up
@Override
   public void addEventListeners() {

// we create these to map the event names to their events. see
// DomEvent.Type for details.
new Type<FocusHandler>("focusin", new FocusInEvent());
new Type<BlurHandler>("focusout", new FocusOutEvent());

addEventListeners_();
   }
 
Example 2
public void popup(Widget container, Widget relativeTo) {
	this.setVisible(true);
	StyleUtils.addStyle(this, InputDatePicker.STYLE_POPUP);
	RootPanel.get().add(this);

	Element positioningElement = this.getElement();
	Element relativeElement = relativeTo.getElement();

	int targetHeight = relativeElement.getOffsetHeight();
	int targetTop = relativeElement.getAbsoluteTop();

	int positioningWidth = positioningElement.getOffsetWidth();
	int targetRight = relativeElement.getAbsoluteRight();

	Style elementStyle = positioningElement.getStyle();
	elementStyle.setPosition(Position.ABSOLUTE);
	elementStyle.setLeft(targetRight - positioningWidth, Unit.PX);
	elementStyle.setTop(targetTop + targetHeight, Unit.PX);

	StyleUtils.addStyle(this, InputDatePicker.STYLE_FADE);
	StyleUtils.addStyle(this, InputDatePicker.STYLE_SHOW);

	this.setFocus(true);

	if (this.popupBlurHandler == null) {
		this.popupBlurHandler = this.addBlurHandler(new BlurHandler() {

			@Override
			public void onBlur(BlurEvent event) {
				InputDatePicker.this.hide();
			}
		});
	}
}
 
Example 3
Source Project: appinventor-extensions   Source File: HandlerPanel.java    License: Apache License 2.0 4 votes vote down vote up
public HandlerRegistration addBlurHandler(BlurHandler handler) {
  return addDomHandler(handler, BlurEvent.getType());
}
 
Example 4
Source Project: unitime   Source File: AriaSuggestBox.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return addHandler(handler, BlurEvent.getType());
}
 
Example 5
Source Project: unitime   Source File: ImageButton.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return addDomHandler(handler, BlurEvent.getType());
}
 
Example 6
Source Project: unitime   Source File: TimeSelector.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return addHandler(handler, BlurEvent.getType());
}
 
Example 7
Source Project: unitime   Source File: TimeSelector.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iText.addBlurHandler(handler);
}
 
Example 8
Source Project: unitime   Source File: IntervalSelector.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iFilter.addBlurHandler(handler);
}
 
Example 9
Source Project: unitime   Source File: FilterBox.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iFilter.addBlurHandler(handler);
}
 
Example 10
Source Project: unitime   Source File: UniTimeFilterBox.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iFilter.getWidget().addBlurHandler(handler);
}
 
Example 11
Source Project: unitime   Source File: SessionDatesSelector.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iText.addBlurHandler(handler);
}
 
Example 12
public void redraw() {
	this.button.setIconType(IconFont.ICON_FILTER);
	this.button.setActive(this.activate);

	Container row = (Container) ((Widget) this.headerCell).getParent();

	this.headerCell.clear();
	if (this.valueChangeRegistration != null) {
		this.valueChangeRegistration.removeHandler();
		this.valueChangeRegistration = null;
	}
	boolean showFilterRow = false;
	if (this.activate) {
		this.headerCell.append(this.inputText);
		this.valueChangeRegistration = this.inputText.addBlurHandler(new BlurHandler() {
			@Override
			public void onBlur(BlurEvent event) {
				String newValue = TableFilter.this.inputText.flush();
				if (!Objects.equal(TableFilter.this.filterValue, newValue)) {
					TableFilter.this.filterValue = newValue;
					TableFilter.this.getDriver().resetDisplay();
				}
			}
		});

		Widget hCell = this.button.getParent().getParent();
		hCell.getElement().getStyle().setWidth(hCell.getOffsetWidth(), Unit.PX);

		showFilterRow = true;
	}
	if (!showFilterRow) {
		for (Widget cell : row) {
			if (cell instanceof TableTH) {
				showFilterRow |= Iterators.size(((TableTH<?>) cell).iterator()) > 0;
				if (showFilterRow) {
					break;
				}
			}
		}
	}
	row.setVisible(showFilterRow);
}
 
Example 13
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example 14
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocusHelper.addBlurHandler(handler);
}
 
Example 15
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocusHelper.addBlurHandler(handler);
}
 
Example 16
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.handleWidget.addBlurHandler(handler);
}
 
Example 17
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.handlerManager.addHandler(BlurEvent.getType(), handler);
}
 
Example 18
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example 19
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example 20
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocus.addBlurHandler(handler);
}
 
Example 21
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocusHelper.addBlurHandler(handler);
}
 
Example 22
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example 23
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.textArea.addBlurHandler(handler);
}
 
Example 24
Source Project: gwt-traction   Source File: Viewport.java    License: Apache License 2.0 2 votes vote down vote up
/**
    * Adds a {@link BlurEvent} handler.
    * 
    * @param handler the handler
    * @return returns the handler registration
    */
   @Override
   public HandlerRegistration addBlurHandler(BlurHandler handler) {
return ensureHandlers().addHandler(BlurEvent.getType(), handler);
   }