List of usage examples for com.google.gwt.user.client.ui DialogBox DialogBox
public DialogBox(boolean autoHide, boolean modal, Caption captionWidget)
From source file:ch.unifr.pai.twice.layout.client.eclipseLayout.MiceSplitLayoutPanel.java
License:Apache License
/** * Removes the widget from the root layout and presents it in a dialog box. * /*from ww w . ja v a 2 s. c o m*/ * @param w */ private void toDialog(ResizableDecoratorPanel w) { if (isInFullscreenMode) { w = originSlotOfCurrentFullscreenWidget; releaseFullScreen(); } final ResizableDecoratorPanel finalSlot = w; MiceDialogCaption caption; final DialogBox dbox = new DialogBox(false, false, (caption = new MiceDialogCaption())); caption.setHandlers(new ClickHandler() { @Override public void onClick(ClickEvent event) { closeDialog(dbox); makeFullScreen(finalSlot); } }, new ClickHandler() { @Override public void onClick(ClickEvent event) { closeDialog(dbox); } }); dialogs.put(dbox, w); dbox.setPopupPosition(w.getAbsoluteLeft(), w.getAbsoluteTop()); Widget element = slots.get(w); dbox.setWidget(element); widthOfDialogsOriginalSlots.put(w, getSizeForWidget(w)); dbox.show(); if (getWidgetDirection(w) == Direction.CENTER) { ResizableDecoratorPanel lastAddedDecoratorPanel = getLastAddedNonDialogSlot(); if (lastAddedDecoratorPanel != null) { setWidgetToSlot((ResizableDecoratorPanel) getCenter(), slots.get(lastAddedDecoratorPanel)); setWidgetSize(lastAddedDecoratorPanel, 0); originsOfCenterReplacements.put(lastAddedDecoratorPanel, getSizeForWidget(lastAddedDecoratorPanel)); } } else { setWidgetSize(w, 0); } onResize(); }
From source file:org.datacleaner.monitor.util.ErrorHandler.java
License:Open Source License
private static DialogBox getDialogBox() { if (sharedDialogBox == null) { final Caption caption = new DialogBox.CaptionImpl(); caption.setText("Error"); sharedDialogBox = new DialogBox(false, true, caption); sharedDialogBox.addStyleName("ErrorDialog"); }//from w ww . j a va 2s. c o m return sharedDialogBox; }
From source file:org.eobjects.datacleaner.monitor.util.ErrorHandler.java
License:Open Source License
private static DialogBox getDialogBox() { if (sharedDialogBox == null) { Caption caption = new DialogBox.CaptionImpl(); caption.setText("Error"); sharedDialogBox = new DialogBox(false, true, caption); sharedDialogBox.addStyleName("ErrorDialog"); }//from w w w .j a v a2s .com return sharedDialogBox; }