【发布时间】:2013-03-12 23:21:59
【问题描述】:
我已经扩展了 PopupPanel 并试图让玻璃/透视效果工作 这是我的课
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.*;
public class MyPopup extends PopupPanel
{
private static Label label = new Label();
public MyPopup()
{
super(true);
setWidget(label);
}
public static void showToast(String message, int time)
{
final MyPopup popup = new MyPopup();
label.getElement().setId("mypopupID");
popup.setGlassEnabled(true);
label.setText(message);
popup.show();
Timer timer = new Timer()
{
@Override
public void run()
{
popup.hide();
}
};
timer.schedule(time);
}
}
我只是调用了 showToast,它按预期工作,但看起来像一个普通的旧面板,具有我在 CSS 中声明的任何颜色背景。 这是我的 CSS
#mypopupID
{
background-color: yellow;
position:absolute;
left:130px;
top:50px;
width: 300px;
}
任何想法如何让它发挥作用?梦想是让淡入/淡出动画正常工作,但首先要执行一些小步骤。
【问题讨论】:
标签: gwt popuppanel