过渡的奇怪行为
我将 transitions
设置为表单:
public class Ecran extends Form {
private Transition transIn = CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 250);
private Transition transOut = CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, false, 250);
public Ecran()
{
super();
setTransitionInAnimator(transIn);
setTransitionOutAnimator(transOut);
}
public Ecran(String titre)
{
super(titre);
setTransitionInAnimator(transIn);
setTransitionOutAnimator(transOut);
}
}
public class MenuPrincipalForm extends Ecran implements ActionListener, FocusListener, Runnable
{
...
}
问题是在运行时 transition
滑动两次!那么如何让它只滑动一次呢?
I set transitions
to a Form :
public class Ecran extends Form {
private Transition transIn = CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 250);
private Transition transOut = CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, false, 250);
public Ecran()
{
super();
setTransitionInAnimator(transIn);
setTransitionOutAnimator(transOut);
}
public Ecran(String titre)
{
super(titre);
setTransitionInAnimator(transIn);
setTransitionOutAnimator(transOut);
}
}
public class MenuPrincipalForm extends Ecran implements ActionListener, FocusListener, Runnable
{
...
}
The problem is that in runtime the transition
slides twice ! So how to make it slide only once ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仅对表单使用 out 转换。过渡允许对表单进行更复杂的情况,并且对于对话框等情况很有用。
Use only the out transition for forms. Transition in allows more elaborate cases for forms and is useful for cases such as dialogs.