Position the specified animation so that it is not overlapping
any still-running animations previously passed to this method.
196011
public void positionAvoidAnimation (Animation anim, Rectangle viewBounds)
    {
        Rectangle abounds = new Rectangle(anim.getBounds());
        @SuppressWarnings("unchecked") ArrayList<Animation> avoidables =
            (ArrayList<Animation>) _avoidAnims.clone();
        // if we are able to place it somewhere, do so
        if (SwingUtil.positionRect(abounds, viewBounds, avoidables)) {
            anim.setLocation(abounds.x, abounds.y);
        }

        // add the animation to the list of avoidables
        _avoidAnims.add(anim);
        // keep an eye on it so that we can remove it when it's finished
        anim.addAnimationObserver(_avoidAnimObs);
    }
1010408
function _positionForeground(renderSize) {
        if (this._pullToRefreshDirection) {
            this._foreground.mod.transformFrom(Transform.translate(0, renderSize[1], 0));
        }
        else {
            this._foreground.mod.transformFrom(Transform.translate(renderSize[0], 0, 0));
        }
    }
214896
function(position, size) {
            var properties = $.Placement.properties[this.placement];
            if (!properties) {
                return;
            }
            if (properties.isHorizontallyCentered) {
                position.x -= size.x / 2;
            } else if (properties.isRight) {
                position.x -= size.x;
            }
            if (properties.isVerticallyCentered) {
                position.y -= size.y / 2;
            } else if (properties.isBottom) {
                position.y -= size.y;
            }
        }
454367
private void animateOffset(final int offset) {
        if (mTranslationAnimator == null) {
            mTranslationAnimator = ViewCompat.animate(this);
            mTranslationAnimator.setDuration(mRippleAnimationDuration);
            mTranslationAnimator.setInterpolator(INTERPOLATOR);
        } else {
            mTranslationAnimator.cancel();
        }
        mTranslationAnimator.translationY(offset).start();
    }
496433
def animation(self, animation):
        
        self._animation = animation
        self._text = self._get_text(self._text['original'])
142732
public void setPosition(Coordinate position) {
		if (getOriginalLocation() != null) {
			Bbox oldBounds = (Bbox) getOriginalLocation();
			Bbox newBounds = (Bbox) oldBounds.clone();
			newBounds.setCenterPoint(position);
			setOriginalLocation(newBounds);
		} else {
			setOriginalLocation(new Bbox(position.getX(), position.getY(), 0, 0));
		}
	}
1328713
protected void halt ()
    {
        // only do something if we're actually animating
        if (_animMode != NO_ANIMATION) {
            // disable animation
            setAnimationMode(NO_ANIMATION);
            // come to a halt looking settled and at peace
            String rest = getRestingAction();
            if (rest != null) {
                setActionSequence(rest);
            }
        }
    }
1220453
public void setCurrentItem(int position) {
		if(mSelectedPosition != position){
			CheckedTextView tv = getTabView(mSelectedPosition);	
			if(tv != null)
				tv.setChecked(false);
		}
		
		mSelectedPosition = position;		
		CheckedTextView tv = getTabView(mSelectedPosition);				
		if(tv != null)
			tv.setChecked(true);	
		
		animateToTab(position);
	}
502395
public void moveNextPosition(boolean smooth) {

        if (getRealAdapter() == null)
            throw new IllegalStateException("You did not set a slider adapter");

        mViewPager.setCurrentItem(mViewPager.getCurrentItem() + 1, smooth);
    }
1159317
public void setPosition(int position) {

        switch (position) {
            case Simapi.POS_DOWN_LEFT:
            case Simapi.POS_DOWN_RIGHT:
            case Simapi.POS_STRAIGHT_DOWN:
            case Simapi.POS_STRAIGHT_LEFT:
            case Simapi.POS_STRAIGHT_RIGHT:
            case Simapi.POS_STRAIGHT_UP:
            case Simapi.POS_UP_LEFT:
            case Simapi.POS_UP_RIGHT:
                // position is fine
                m_position = position;
                break;
            default:
                m_position = Simapi.POS_CENTER;
        }
    }
770706
def Reposition(self):
        """"""

        rect = self.GetFieldRect(1)
        self.safemode_staticbmp.SetPosition((rect.x, rect.y))
        self.size_changed = False
1116084
public T animate(Animation anim) {
        if (view != null && anim != null) {
            view.startAnimation(anim);
        }
        return self();
    }
67156
def _finishAnimation(self):
        
        self.setCurrentIndex(self._nextIndex)
        self.widget(self._lastIndex).hide()
        self.widget(self._lastIndex).move(self._lastPoint)
        self._active = False
        
        if not self.signalsBlocked():
            self.animationFinished.emit()
1122665
public void resetPosition() {

        // fail if no positioning parent given
        assert m_positioningParent != null;
        if (m_positioningParent != null) {
            setPosition(m_positioningParent.getOffsetHeight(), m_positioningParent.getOffsetWidth(), 0, 0);
        }
    }
817713
protected void updateExpiredOverlayPosition(Element positioningParent) {

        if (m_expiredOverlay != null) {
            Style expiredStyle = m_expiredOverlay.getStyle();
            expiredStyle.setHeight(m_position.getHeight() + 4, Unit.PX);
            expiredStyle.setWidth(m_position.getWidth() + 4, Unit.PX);
            expiredStyle.setTop(m_position.getTop() - positioningParent.getAbsoluteTop() - 2, Unit.PX);
            expiredStyle.setLeft(m_position.getLeft() - positioningParent.getAbsoluteLeft() - 2, Unit.PX);
        }
    }
497142
public void hideWithAnimation() {
        if (transition == null || transition.getStatus().equals(Animation.Status.STOPPED)) {
            JFXAlertAnimation currentAnimation = getCurrentAnimation();
            Animation animation = currentAnimation.createHidingAnimation(getDialogPane().getContent(), getDialogPane());
            if (animation != null) {
                transition = animation;
                animation.setOnFinished(finish -> {
                    animateClosing = false;
                    hide();
                    transition = null;
                });
                animation.play();
            } else {
                animateClosing = false;
                transition = null;
                Platform.runLater(this::hide);
            }
        }
    }
408913
public void animate() {
        detectOutOfScopeElement(targetElement, () -> {
            $("document").ready(() -> {
                onStartAnimateCallback();
                JsPathAnimator.cta(sourceElement, targetElement, options, () -> {
                    if (animateCallback != null) {
                        animateCallback.call();
                    } else {
                        // For default animateCallback when animateCallback is null
                        targetElement.getStyle().setVisibility(Style.Visibility.VISIBLE);
                        targetElement.getStyle().setOpacity(1);
                    }

                    if (completedCallback != null) {
                        completedCallback.call();
                    }
                });
            });
        });
    }