SWT - 平移到下一个 Window 内容

SWT - Pan to Next Window Content

这不一定 'essential' 我正在做的事情,但它有助于使应用程序看起来更好。

我想知道是否可以(而不是关闭 window 并打开一个新内容)从 window 中的当前内容平移到新内容,最好是在任何方向(上、下、左、右)的选择。如果是这样,一些代码示例或 link 将我指向正确的方向会很好。

我的意思是'pan'

触发时,Shell中的当前Control被移出view/off-frame,新的Control从对面进来,类似于平移相机。

您是否考虑过使用 Opal 项目中的 TransitionComposite:

https://code.google.com/a/eclipselabs.org/p/opal/wiki/TransitionComposite

或者,您可以使用 AnimationRunner 形式的 Nebula 画廊创建自己的动画

https://eclipse.org/nebula/widgets/gallery/gallery.php

例如:

    int FPS = 25;
    int DURATION = 500;
    AnimationRunner animationRunner = new AnimationRunner(FPS);
    Rectangle newBounds = new Rectangle(100, 100, 400, 400);
    animationRunner.runEffect(new SetBoundsEffect(composite, rectangle, composite.getBounds(), DURATION, new LinearInOut(), onStopRunnable, onCancelRunnable));