List of usage examples for com.google.gwt.user.client.ui FocusPanel addFocusHandler
public HandlerRegistration addFocusHandler(FocusHandler handler)
From source file:org.eclipse.che.ide.ui.window.View.java
License:Open Source License
View(Window.Resources res, boolean showBottomPanel) { this.res = res; this.css = res.windowCss(); windowWidth = com.google.gwt.user.client.Window.getClientWidth(); clientLeft = Document.get().getBodyOffsetLeft(); clientTop = Document.get().getBodyOffsetTop(); initWidget(uiBinder.createAndBindUi(this)); footer = new HTMLPanel(""); if (showBottomPanel) { footer.setStyleName(res.windowCss().footer()); contentContainer.add(footer);/*w ww. java 2 s . co m*/ } handleEvents(); FocusPanel dummyFocusElement = new FocusPanel(); dummyFocusElement.setTabIndex(0); dummyFocusElement.addFocusHandler(new FocusHandler() { @Override public void onFocus(FocusEvent event) { setFocus(); } }); contentContainer.add(dummyFocusElement); }