List of usage examples for com.google.gwt.user.client.ui RequiresResize onResize
void onResize();
From source file:edu.caltech.ipac.firefly.fftools.XYPlotJSInterface.java
public static void addXYPlot(JscriptRequest jspr, String div) { Map<String, String> paramMap = jspr.asMap(); WidgetFactory factory = Application.getInstance().getWidgetFactory(); TablePreview xyPrev = factory.createObserverUI(WidgetFactory.XYPLOT, paramMap); xyPrev.bind(FFToolEnv.getHub());//from w w w . j a va 2 s .c om SimplePanel panel = makeCenter(); panel.add(xyPrev.getDisplay()); FFToolEnv.addToPanel(div, panel, "XY Plot"); if (xyPrev.getDisplay() instanceof RequiresResize) { final RequiresResize resizer = (RequiresResize) xyPrev.getDisplay(); Window.addResizeHandler(new ResizeHandler() { public void onResize(ResizeEvent event) { resizer.onResize(); } }); } }
From source file:org.kie.uberfire.client.common.MultiPageEditorView.java
License:Apache License
protected void scheduleResize(final Widget widget) { if (widget instanceof RequiresResize) { final RequiresResize requiresResize = (RequiresResize) widget; Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override//from w ww. ja v a 2 s. c o m public void execute() { requiresResize.onResize(); } }); } }
From source file:org.uberfire.client.workbench.panels.impl.AbstractDockingWorkbenchPanelView.java
License:Apache License
private static void scheduleResize(final RequiresResize widget) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override/*from w w w. ja v a 2 s . c o m*/ public void execute() { widget.onResize(); } }); }
From source file:org.uberfire.client.workbench.panels.impl.HorizontalSplitterPanel.java
License:Apache License
private void scheduleResize(final Widget widget) { if (widget instanceof RequiresResize) { final RequiresResize requiresResize = (RequiresResize) widget; Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override//from w w w. j a v a 2 s . c om public void execute() { requiresResize.onResize(); } }); } }
From source file:org.uberfire.client.workbench.panels.support.PanelHelperEast.java
License:Apache License
private void scheduleResize(final RequiresResize widget) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override//from w w w. jav a 2 s . c o m public void execute() { widget.onResize(); } }); }
From source file:stroom.widget.popup.client.view.ResizableDialog.java
License:Apache License
/** * Called on mouse move in the caption area, continues dragging if it was * started by {@link #beginDragging}.//from w w w .ja v a2 s . com * * @see #beginDragging * @see #endDragging * @param event * the mouse move event that continues dragging */ protected void continueDragging(final MouseMoveEvent event) { if (dragging) { if (dragType == DragType.MOVE) { final int absX = event.getX() + getAbsoluteLeft(); final int absY = event.getY() + getAbsoluteTop(); // If the mouse is off the screen to the left, right, or top, // don't move the dialog box. This would let users // lose dialog boxes, which would be bad for modal popups. if (absX < clientLeft || absX >= windowWidth || absY < clientTop) { return; } setPopupPosition(absX - dragStartX, absY - dragStartY); } else { int width = event.getX() + dragStartX; int height = event.getY() + dragStartY; // Constrain width. if (popupSize.getMinWidth() != null && width < popupSize.getMinWidth()) { width = popupSize.getMinWidth(); } else if (popupSize.getMaxWidth() != null && width > popupSize.getMaxWidth()) { width = popupSize.getMaxWidth(); } // Constrain height. if (popupSize.getMinHeight() != null && height < popupSize.getMinHeight()) { height = popupSize.getMinHeight(); } else if (popupSize.getMaxHeight() != null && height > popupSize.getMaxHeight()) { height = popupSize.getMaxHeight(); } final Widget widget = getWidget(); final Element elem = widget.getElement(); elem.getStyle().setPropertyPx("width", width); elem.getStyle().setPropertyPx("height", height); if (widget instanceof RequiresResize) { final RequiresResize requiresResize = (RequiresResize) widget; requiresResize.onResize(); } } } }