/** * Force mole to hide and discard outstanding show attempts. */ public void hideNow() { showAttempts = 0; animation.animateMole(heightMeasure.getOffsetHeight(), 0, animationDuration); }
/** * Hides the notification. */ public void hide() { if (showAttempts > 0) { --showAttempts; } if (showAttempts == 0) { animation.animateMole(heightMeasure.getOffsetHeight(), 0, animationDuration); return; } }
private void showImpl() { borderElement.getStyle().setDisplay(Display.BLOCK); borderElement.getStyle().setWidth(notificationText.getOffsetWidth(), Unit.PX); animation.animateMole(0, heightMeasure.getOffsetHeight(), animationDuration); } }
public double getUnitSizeInPixels( Element parent, Unit unit, boolean vertical) { if (unit == null) { return 1; } switch (unit) { case PCT: return (vertical ? parent.getClientHeight() : parent.getClientWidth()) / 100.0; case EM: return relativeRuler.getOffsetWidth() / 10.0; case EX: return relativeRuler.getOffsetHeight() / 10.0; case CM: return fixedRuler.getOffsetWidth() * 0.1; // 1.0 cm / cm case MM: return fixedRuler.getOffsetWidth() * 0.01; // 0.1 cm / mm case IN: return fixedRuler.getOffsetWidth() * 0.254; // 2.54 cm / in case PT: return fixedRuler.getOffsetWidth() * 0.00353; // 0.0353 cm / pt case PC: return fixedRuler.getOffsetWidth() * 0.0423; // 0.423 cm / pc default: case PX: return 1; } }
/** * Force mole to hide and discard outstanding show attempts. */ public void hideNow() { showAttempts = 0; animation.animateMole(heightMeasure.getOffsetHeight(), 0, animationDuration); }
/** * Hides the notification. */ public void hide() { if (showAttempts > 0) { --showAttempts; } if (showAttempts == 0) { animation.animateMole(heightMeasure.getOffsetHeight(), 0, animationDuration); return; } }
/** * Hides the notification. */ public void hide() { if (showAttempts > 0) { --showAttempts; } if (showAttempts == 0) { animation.animateMole(heightMeasure.getOffsetHeight(), 0, animationDuration); return; } }
/** * Force mole to hide and discard outstanding show attempts. */ public void hideNow() { showAttempts = 0; animation.animateMole(heightMeasure.getOffsetHeight(), 0, animationDuration); }
private void showImpl() { borderElement.getStyle().setDisplay(Display.BLOCK); borderElement.getStyle().setWidth(notificationText.getOffsetWidth(), Unit.PX); animation.animateMole(0, heightMeasure.getOffsetHeight(), animationDuration); } }
private void showImpl() { borderElement.getStyle().setDisplay(Display.BLOCK); borderElement.getStyle().setWidth(notificationText.getOffsetWidth(), Unit.PX); animation.animateMole(0, heightMeasure.getOffsetHeight(), animationDuration); } }
/** * @param paintable * the reference aside which the window should be positioned to * @return true if there is enough on top of the page from the component or * if the component don't fit on below either */ private boolean alignToTop(Widget paintable) { final int spaceOntop = paintable.getAbsoluteTop() - Window.getScrollTop(); final int requiredHeight = getOffsetHeight() + arrowElement.getOffsetHeight(); if (spaceOntop > requiredHeight) { return true; } final int spaceBelow = Window.getClientHeight() - (paintable.getAbsoluteTop() + paintable.getOffsetHeight() - Window .getScrollTop()); return spaceBelow < requiredHeight; }
public double getUnitSizeInPixels( Element parent, Unit unit, boolean vertical) { if (unit == null) { return 1; } switch (unit) { case PCT: return (vertical ? parent.getClientHeight() : parent.getClientWidth()) / 100.0; case EM: return relativeRuler.getOffsetWidth() / 10.0; case EX: return relativeRuler.getOffsetHeight() / 10.0; case CM: return fixedRuler.getOffsetWidth() * 0.1; // 1.0 cm / cm case MM: return fixedRuler.getOffsetWidth() * 0.01; // 0.1 cm / mm case IN: return fixedRuler.getOffsetWidth() * 0.254; // 2.54 cm / in case PT: return fixedRuler.getOffsetWidth() * 0.00353; // 0.0353 cm / pt case PC: return fixedRuler.getOffsetWidth() * 0.0423; // 0.423 cm / pc default: case PX: return 1; } }
public double getUnitSizeInPixels( Element parent, Unit unit, boolean vertical) { if (unit == null) { return 1; } switch (unit) { case PCT: return (vertical ? parent.getClientHeight() : parent.getClientWidth()) / 100.0; case EM: return relativeRuler.getOffsetWidth() / 10.0; case EX: return relativeRuler.getOffsetHeight() / 10.0; case CM: return fixedRuler.getOffsetWidth() * 0.1; // 1.0 cm / cm case MM: return fixedRuler.getOffsetWidth() * 0.01; // 0.1 cm / mm case IN: return fixedRuler.getOffsetWidth() * 0.254; // 2.54 cm / in case PT: return fixedRuler.getOffsetWidth() * 0.00353; // 0.0353 cm / pt case PC: return fixedRuler.getOffsetWidth() * 0.0423; // 0.423 cm / pc default: case PX: return 1; } }
int lsHeight = lowerSpacer.getOffsetHeight(); int usHeight = upperSpacer.getOffsetHeight();
top -= arrowElement.getOffsetHeight(); } else { top += arrowElement.getOffsetHeight();
private void showReferenceArrow(boolean onTop, int centerOfReferencComponent, Widget ref) { UIObject.setStyleName(arrowElement, "v-touchkit-popover-pointer-bottom", !onTop); UIObject.setStyleName(arrowElement, "v-touchkit-popover-pointer", onTop); int horizontalpoint = centerOfReferencComponent - arrowElement.getOffsetWidth() / 2; if (horizontalpoint - MIN_ARROW_EDGE_DISTANCE < 0) { horizontalpoint = MIN_ARROW_EDGE_DISTANCE; } else if (horizontalpoint + arrowElement.getOffsetWidth() + MIN_ARROW_EDGE_DISTANCE > Window.getClientWidth()) { horizontalpoint = Window.getClientWidth() - arrowElement.getOffsetWidth() - MIN_ARROW_EDGE_DISTANCE; } arrowElement.getStyle().setLeft(horizontalpoint, Unit.PX); int arrowPos = ref.getAbsoluteTop(); if (onTop) { arrowPos -= arrowElement.getOffsetHeight(); } else { arrowPos += ref.getOffsetHeight(); } arrowElement.getStyle().setTop(arrowPos, Unit.PX); arrowElement.getStyle().setProperty("opacity", ""); arrowElement.getStyle().setZIndex(zIndex); }
int usH = upperSpacer.getOffsetHeight();