@Override public void add(Widget w) { super.add(w, getElement()); }
public void insert(Widget w, int beforeIndex) { insert(w, getElement(), beforeIndex, true); }
/** * Creates an empty absolute panel. */ public AbsolutePanel() { this(DOM.createDiv()); // Setting the panel's position style to 'relative' causes it to be treated // as a new positioning context for its children. getElement().getStyle().setProperty("position", "relative"); getElement().getStyle().setProperty("overflow", "hidden"); }
/** * Gets the position of the left outer border edge of the widget relative to * the left outer border edge of the panel. * * @param w the widget whose position is to be retrieved * @return the widget's left position */ public int getWidgetLeft(Widget w) { checkWidgetParent(w); return w.getElement().getAbsoluteLeft() - getElement().getAbsoluteLeft(); }
/** * Gets the position of the top outer border edge of the widget relative to * the top outer border edge of the panel. * * @param w the widget whose position is to be retrieved * @return the widget's top position */ public int getWidgetTop(Widget w) { checkWidgetParent(w); return w.getElement().getAbsoluteTop() - getElement().getAbsoluteTop(); }
if (child.getElement().getOffsetParent() == getElement()) { return; if ("body".equals(getElement().getNodeName().toLowerCase(Locale.ROOT))) { return;
public Raphael(AbsolutePanel ap,int width,int height){ this.htmlCanvas = ap; this.jsRef = this.raphael(ap.getElement(), width, height); this.svgElements = new ArrayList<SVGElement>(); }
@Override public void onScroll(final ScrollEvent scrollEvent) { domElementContainer.getElement().setScrollTop(0); domElementContainer.getElement().setScrollLeft(0); } },
@Override public void onScroll(final ScrollEvent scrollEvent) { domElementContainer.getElement().setScrollTop(0); domElementContainer.getElement().setScrollLeft(0); } },
/** * Creates an empty absolute panel. */ public AbsolutePanel() { this(DOM.createDiv()); // Setting the panel's position style to 'relative' causes it to be treated // as a new positioning context for its children. getElement().getStyle().setProperty("position", "relative"); getElement().getStyle().setProperty("overflow", "hidden"); }
/** * Creates an empty absolute panel. */ public AbsolutePanel() { this(DOM.createDiv()); // Setting the panel's position style to 'relative' causes it to be treated // as a new positioning context for its children. getElement().getStyle().setProperty("position", "relative"); getElement().getStyle().setProperty("overflow", "hidden"); }
private void calcDropTargetOffset() { WidgetLocation dropTargetLocation = new WidgetLocation(dropTarget, null); dropTargetOffsetX = dropTargetLocation.getLeft() + DOMUtil.getBorderLeft(dropTarget.getElement()); dropTargetOffsetY = dropTargetLocation.getTop() + DOMUtil.getBorderTop(dropTarget.getElement()); // System.out.println(dropTargetOffsetX + ", " + dropTargetOffsetY); } }
private void calcBoundaryOffset() { Location widgetLocation = new WidgetLocation(context.boundaryPanel, null); boundaryOffsetX = widgetLocation.getLeft() + DOMUtil.getBorderLeft(context.boundaryPanel.getElement()); boundaryOffsetY = widgetLocation.getTop() + DOMUtil.getBorderTop(context.boundaryPanel.getElement()); }
@Override public void onMouseMove( MouseMoveEvent event ) { if( m_callback == null ) return; event.preventDefault(); int x = event.getRelativeX( m_canvas.getElement() ); m_callback.onMouseMove( m_cookie, x ); }
private void applyPositions() { int top = getBaseTop(); int left = getBaseLeft(); zoomInElement.getElement().getStyle().setTop(top, Unit.PX); zoomInElement.getElement().getStyle().setLeft(left, Unit.PX); zoomStepsPanel.getElement().getStyle().setTop(top + ZOOMBUTTON_SIZE, Unit.PX); zoomStepsPanel.getElement().getStyle().setLeft(left, Unit.PX); int y = viewPort.getResolutionCount() * ZOOMSTEP_HEIGHT; zoomOutElement.getElement().getStyle().setTop(top + ZOOMBUTTON_SIZE + y + 1, Unit.PX); zoomOutElement.getElement().getStyle().setLeft(left, Unit.PX); positionZoomHandle(); }
private void applyPositions() { int top = getBaseTop(); int left = getBaseLeft(); zoomInElement.getElement().getStyle().setTop(top, Unit.PX); zoomInElement.getElement().getStyle().setLeft(left/* + 2 */, Unit.PX); zoomStepsPanel.getElement().getStyle().setTop(top + ZOOMBUTTON_SIZE, Unit.PX); zoomStepsPanel.getElement().getStyle().setLeft(left/* + 2 */, Unit.PX); int y = viewPort.getZoomStrategy().getZoomStepCount() * ZOOMSTEP_HEIGHT; zoomOutElement.getElement().getStyle().setTop(top + ZOOMBUTTON_SIZE + y + 1, Unit.PX); zoomOutElement.getElement().getStyle().setLeft(left/* + 2 */, Unit.PX); positionZoomHandle(); }
/** * Gets the position of the left outer border edge of the widget relative to * the left outer border edge of the panel. * * @param w the widget whose position is to be retrieved * @return the widget's left position */ public int getWidgetLeft(Widget w) { checkWidgetParent(w); return w.getElement().getAbsoluteLeft() - getElement().getAbsoluteLeft(); }
/** * Gets the position of the left outer border edge of the widget relative to * the left outer border edge of the panel. * * @param w the widget whose position is to be retrieved * @return the widget's left position */ public int getWidgetLeft(Widget w) { checkWidgetParent(w); return w.getElement().getAbsoluteLeft() - getElement().getAbsoluteLeft(); }
/** * Gets the position of the top outer border edge of the widget relative to * the top outer border edge of the panel. * * @param w the widget whose position is to be retrieved * @return the widget's top position */ public int getWidgetTop(Widget w) { checkWidgetParent(w); return w.getElement().getAbsoluteTop() - getElement().getAbsoluteTop(); }
/** * Gets the position of the top outer border edge of the widget relative to * the top outer border edge of the panel. * * @param w the widget whose position is to be retrieved * @return the widget's top position */ public int getWidgetTop(Widget w) { checkWidgetParent(w); return w.getElement().getAbsoluteTop() - getElement().getAbsoluteTop(); }