Java 类org.eclipse.draw2d.geometry.Translatable 实例源码

项目:ForgedUI-Eclipse    文件:AddStackElementEditPolicy.java   
public final void translateToAbsolute(IFigure child, Translatable t) {
    if (child != null) {
        child.getParent().translateToParent(t);
        if (!(child instanceof ScreenFigure)){
            translateToAbsolute(child.getParent(), t);
        }
    }
}
项目:ForgedUI-Eclipse    文件:ContainerHighlightEditPolicy.java   
public final void translateToAbsolute(IFigure child, Translatable t) {
    if (child != null) {
        child.getParent().translateToParent(t);
        if (!(child instanceof ScreenFigure)){
            translateToAbsolute(child.getParent(), t);
        }
    }
}
项目:gef-gwt    文件:Viewport.java   
/**
 * @see IFigure#translateFromParent(Translatable)
 */
public void translateFromParent(Translatable t) {
    if (useTranslate)
        t.performTranslate(getHorizontalRangeModel().getValue(),
                getVerticalRangeModel().getValue());
    super.translateFromParent(t);
}
项目:gef-gwt    文件:Viewport.java   
/**
 * @see IFigure#translateToParent(Translatable)
 */
public void translateToParent(Translatable t) {
    if (useTranslate)
        t.performTranslate(-getHorizontalRangeModel().getValue(),
                -getVerticalRangeModel().getValue());
    super.translateToParent(t);
}
项目:gef-gwt    文件:Figure.java   
/**
 * @see IFigure#translateToAbsolute(Translatable)
 */
public final void translateToAbsolute(Translatable t) {
    if (getParent() != null) {
        getParent().translateToParent(t);
        getParent().translateToAbsolute(t);
    }
}
项目:gef-gwt    文件:Figure.java   
/**
 * @see IFigure#translateToRelative(Translatable)
 */
public final void translateToRelative(Translatable t) {
    if (getParent() != null) {
        getParent().translateToRelative(t);
        getParent().translateFromParent(t);
    }
}
项目:gef-gwt    文件:ScalableFreeformLayeredPane.java   
/**
 * @see org.eclipse.draw2d.Figure#translateToParent(Translatable)
 */
public void translateToParent(Translatable t) {
    t.performScale(scale);
}
项目:gef-gwt    文件:ScalableFreeformLayeredPane.java   
/**
 * @see org.eclipse.draw2d.Figure#translateFromParent(Translatable)
 */
public void translateFromParent(Translatable t) {
    t.performScale(1 / scale);
}
项目:gef-gwt    文件:ScalableLayeredPane.java   
/**
 * @see org.eclipse.draw2d.Figure#translateFromParent(Translatable)
 */
public void translateFromParent(Translatable t) {
    t.performScale(1 / scale);
}
项目:gef-gwt    文件:ScalableLayeredPane.java   
/**
 * @see org.eclipse.draw2d.Figure#translateToParent(Translatable)
 */
public void translateToParent(Translatable t) {
    t.performScale(scale);
}
项目:gef-gwt    文件:Figure.java   
/**
 * @see IFigure#translateFromParent(Translatable)
 */
public void translateFromParent(Translatable t) {
    if (useLocalCoordinates())
        t.performTranslate(-getBounds().x - getInsets().left,
                -getBounds().y - getInsets().top);
}
项目:gef-gwt    文件:Figure.java   
/**
 * @see IFigure#translateToParent(Translatable)
 */
public void translateToParent(Translatable t) {
    if (useLocalCoordinates())
        t.performTranslate(getBounds().x + getInsets().left, getBounds().y
                + getInsets().top);
}
项目:cogtool    文件:ScalableGraphicalFigure.java   
/**
 * @see org.eclipse.draw2d.Figure#translateFromParent(Translatable)
 */
@Override
public void translateFromParent(Translatable t)
{
    t.performScale(1.0 / scale);
}
项目:cogtool    文件:ScalableGraphicalFigure.java   
/**
 * @see org.eclipse.draw2d.Figure#translateToParent(Translatable)
 */
@Override
public void translateToParent(Translatable t)
{
    t.performScale(scale);
}
项目:olca-app    文件:Animation.java   
static void swap() {
    Map<IFigure, Translatable> temp = finalStates;
    finalStates = initialStates;
    initialStates = temp;
}
项目:gef-gwt    文件:LayoutEditPolicy.java   
/**
 * Translates a {@link Translatable} in absolute coordinates to be
 * layout-relative, i.e. relative to the {@link #getLayoutContainer()}'s
 * origin, which is obtained via {@link #getLayoutOrigin()}.
 * 
 * @param t
 *            the Translatable in absolute coordinates to be translated to
 *            layout-relative coordinates.
 * @since 3.7
 */
protected void translateFromAbsoluteToLayoutRelative(Translatable t) {
    IFigure figure = getLayoutContainer();
    figure.translateToRelative(t);
    figure.translateFromParent(t);
    Point negatedLayoutOrigin = getLayoutOrigin().getNegated();
    t.performTranslate(negatedLayoutOrigin.x, negatedLayoutOrigin.y);
}
项目:gef-gwt    文件:LayoutEditPolicy.java   
/**
 * Translates a {@link Translatable} in layout-relative coordinates, i.e.
 * relative to {@link #getLayoutContainer()}'s origin which is obtained via
 * {@link #getLayoutOrigin()}, into absolute coordinates.
 * 
 * @param t
 *            the Translatable in layout-relative coordinates to be
 *            translated into absolute coordinates.
 * @since 3.7
 */
protected void translateFromLayoutRelativeToAbsolute(Translatable t) {
    IFigure figure = getLayoutContainer();
    Point layoutOrigin = getLayoutOrigin();
    t.performTranslate(layoutOrigin.x, layoutOrigin.y);
    figure.translateToParent(t);
    figure.translateToAbsolute(t);
}
项目:gef-gwt    文件:SnapToHelper.java   
/**
 * Translates from a given figure to absolute coordinates.
 * 
 * @param figure
 *            the reference figure
 * @param t
 *            the object to translate
 */
protected void makeAbsolute(IFigure figure, Translatable t) {
    figure.translateToAbsolute(t);
}
项目:gef-gwt    文件:SnapToHelper.java   
/**
 * Translates from absolute to coordinates relative to the given figure.
 * 
 * @param figure
 *            the reference figure
 * @param t
 *            the object to translate
 */
protected void makeRelative(IFigure figure, Translatable t) {
    figure.translateToRelative(t);
}
项目:gef-gwt    文件:IFigure.java   
/**
 * Translates a Translatable from this IFigure's parent's coordinates to
 * this IFigure's local coordinates.
 * 
 * @param t
 *            The object to translate
 */
void translateFromParent(Translatable t);
项目:gef-gwt    文件:IFigure.java   
/**
 * Translates a Translatable that is relative to this figure's bounds to
 * absolute.
 * 
 * @param t
 *            The object to translate
 */
void translateToAbsolute(Translatable t);
项目:gef-gwt    文件:IFigure.java   
/**
 * Translates a Translatable from this IFigure's coordinates to its parent's
 * coordinates.
 * 
 * @param t
 *            The object to translate
 */
void translateToParent(Translatable t);
项目:gef-gwt    文件:IFigure.java   
/**
 * Translates a Translatable in absolute coordinates to be relative to this
 * figure's bounds.
 * 
 * @param t
 *            The object to translate
 */
void translateToRelative(Translatable t);