/** * Adds a widget to the panel at the specified position. Setting a position of * <code>(-1, -1)</code> will cause the child widget to be positioned * statically. * * @param w the widget to be added * @param left the widget's left position * @param top the widget's top position */ public void add(Widget w, int left, int top) { // In order to avoid the potential for a flicker effect, it is necessary // to set the position of the widget before adding it to the AbsolutePanel. // The Widget should be removed from its parent before any positional // changes are made to prevent flickering. w.removeFromParent(); int beforeIndex = getWidgetCount(); setWidgetPositionImpl(w, left, top); insert(w, beforeIndex); verifyPositionNotStatic(w); }
@Override public int getWidgetCount() { return delegate.getWidgetCount(); }
public void makeDraggable(PickupDragController dragController) { for (int i = 0; i < panel.getWidgetCount(); i++) { Widget widget = panel.getWidget(i); if (widget instanceof IsDraggable) { dragController.makeDraggable(widget); } } }
private Widget getMoveablePanel() { for (int index = 0; index < context.boundaryPanel.getWidgetCount(); index++) { final Widget w = context.boundaryPanel.getWidget(index); if (w.getStyleName().equals(DragClientBundle.INSTANCE.css().movablePanel())) { return w; } } return null; } }
private void createWidgetPrintLayers(MapPresenter mapPresenter, MapRasterizingInfo mapRasterizingInfo, Bbox worldBounds, double rasterResolution) { AbsolutePanel mapPresenterAsAbsolutePanel = ((AbsolutePanel) mapPresenter.asWidget()); for (int i = 0 ; i < mapPresenterAsAbsolutePanel.getWidgetCount(); i++) { Widget widget = mapPresenterAsAbsolutePanel.getWidget(i); for (PrintableWidgetLayerBuilder widgetLayerPrintBuilder : getWidgetLayerBuilders()) { if (widgetLayerPrintBuilder.supports(widget)) { mapRasterizingInfo.getExtraLayers().add( widgetLayerPrintBuilder.build(mapPresenter, widget, worldBounds, rasterResolution)); break; } } } }
/** * Adds a widget to the panel at the specified position. Setting a position of * <code>(-1, -1)</code> will cause the child widget to be positioned * statically. * * @param w the widget to be added * @param left the widget's left position * @param top the widget's top position */ public void add(Widget w, int left, int top) { // In order to avoid the potential for a flicker effect, it is necessary // to set the position of the widget before adding it to the AbsolutePanel. // The Widget should be removed from its parent before any positional // changes are made to prevent flickering. w.removeFromParent(); int beforeIndex = getWidgetCount(); setWidgetPositionImpl(w, left, top); insert(w, beforeIndex); verifyPositionNotStatic(w); }
/** * Adds a widget to the panel at the specified position. Setting a position of * <code>(-1, -1)</code> will cause the child widget to be positioned * statically. * * @param w the widget to be added * @param left the widget's left position * @param top the widget's top position */ public void add(Widget w, int left, int top) { // In order to avoid the potential for a flicker effect, it is necessary // to set the position of the widget before adding it to the AbsolutePanel. // The Widget should be removed from its parent before any positional // changes are made to prevent flickering. w.removeFromParent(); int beforeIndex = getWidgetCount(); setWidgetPositionImpl(w, left, top); insert(w, beforeIndex); verifyPositionNotStatic(w); }