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

The following examples show how to use com.google.gwt.event.dom.client.BlurHandler. 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 File: ViewportImplIE.java    From gwt-traction with 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
Source File: InputDatePicker.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
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 File: CodeInputImpl.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.textArea.addBlurHandler(handler);
}
 
Example #4
Source File: HandlerPanel.java    From appinventor-extensions with Apache License 2.0 4 votes vote down vote up
public HandlerRegistration addBlurHandler(BlurHandler handler) {
  return addDomHandler(handler, BlurEvent.getType());
}
 
Example #5
Source File: Anchor.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example #6
Source File: InputDate.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocusHelper.addBlurHandler(handler);
}
 
Example #7
Source File: InputSuggest.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocus.addBlurHandler(handler);
}
 
Example #8
Source File: ListItem.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example #9
Source File: Button.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example #10
Source File: CompositeFocusHelper.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.handlerManager.addHandler(BlurEvent.getType(), handler);
}
 
Example #11
Source File: InputSlider.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.handleWidget.addBlurHandler(handler);
}
 
Example #12
Source File: AbstractInputSelect.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocusHelper.addBlurHandler(handler);
}
 
Example #13
Source File: AbstractDropdown.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.compositeFocusHelper.addBlurHandler(handler);
}
 
Example #14
Source File: AbstractInput.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public com.google.gwt.event.shared.HandlerRegistration addBlurHandler(BlurHandler handler) {
	return this.addDomHandler(handler, BlurEvent.getType());
}
 
Example #15
Source File: TableFilter.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
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 #16
Source File: SessionDatesSelector.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iText.addBlurHandler(handler);
}
 
Example #17
Source File: UniTimeFilterBox.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iFilter.getWidget().addBlurHandler(handler);
}
 
Example #18
Source File: FilterBox.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iFilter.addBlurHandler(handler);
}
 
Example #19
Source File: IntervalSelector.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iFilter.addBlurHandler(handler);
}
 
Example #20
Source File: TimeSelector.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return iText.addBlurHandler(handler);
}
 
Example #21
Source File: TimeSelector.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return addHandler(handler, BlurEvent.getType());
}
 
Example #22
Source File: ImageButton.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return addDomHandler(handler, BlurEvent.getType());
}
 
Example #23
Source File: AriaSuggestBox.java    From unitime with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addBlurHandler(BlurHandler handler) {
	return addHandler(handler, BlurEvent.getType());
}
 
Example #24
Source File: Viewport.java    From gwt-traction with 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);
   }