本文整理汇总了Java中com.google.gwt.user.client.ui.DecoratedPopupPanel类的典型用法代码示例。如果您正苦于以下问题:Java DecoratedPopupPanel类的具体用法?Java DecoratedPopupPanel怎么用?Java DecoratedPopupPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DecoratedPopupPanel类属于com.google.gwt.user.client.ui包,在下文中一共展示了DecoratedPopupPanel类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showSelectFromMap
import com.google.gwt.user.client.ui.DecoratedPopupPanel; //导入依赖的package包/类
private void showSelectFromMap() {
if(!showedSelectFromMapOnce) {
showedSelectFromMapOnce = true;
final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true);
simplePopup.setWidth("150px");
simplePopup.setWidget(new HTML(CONSTANTS.selectFromMap()));
simplePopup.addStyleName("popup");
simplePopup.center();
Timer t = new Timer() {
public void run() {
simplePopup.hide();
}
};
t.schedule(2000);
}
}
示例2: createInfoWindow
import com.google.gwt.user.client.ui.DecoratedPopupPanel; //导入依赖的package包/类
/**
* Opens an HTML popup info window at the given screen coordinates (within the
* plot bounds)
*
* It sets the same font family, size, color and bgcolor defined for markers, if
* you wanted override them use the css selector div.chrono-infoWindow-content.
*
* FIXME: (MCM) this should be a unique instance of popup: ask Shawn
*/
public InfoWindow createInfoWindow(String html, double x, double y) {
final PopupPanel pp = new DecoratedPopupPanel(true);
pp.addStyleName("chrono-infoWindow");
Widget content = new HTML(html);
content.setStyleName("chrono-infoWindow-content");
pp.setWidget(content);
pp.setPopupPosition(getElement().getAbsoluteLeft() + (int)x, getElement().getAbsoluteTop() + (int)y);
GssProperties markerProperties = gssContext.getPropertiesBySelector("marker");
if (markerProperties != null) {
pp.getElement().getStyle().setBackgroundColor(markerProperties.bgColor.toString());
pp.getElement().getStyle().setColor(markerProperties.color.toString());
pp.getElement().getStyle().setProperty("fontFamily", markerProperties.fontFamily.toString());
pp.getElement().getStyle().setProperty("fontSize", markerProperties.fontSize.toString());
pp.getElement().getStyle().setPadding(5, Unit.PX);
}
pp.getElement().getStyle().setZIndex(9999);
pp.show();
return new BrowserInfoWindow(this, pp);
}
示例3: showMessageBox
import com.google.gwt.user.client.ui.DecoratedPopupPanel; //导入依赖的package包/类
private void showMessageBox(String message) {
hideSpinningCircle();
final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true);
simplePopup.setWidth("150px");
simplePopup.setWidget(new HTML(message));
simplePopup.addStyleName("popup");
simplePopup.center();
}
示例4: showMessageBox
import com.google.gwt.user.client.ui.DecoratedPopupPanel; //导入依赖的package包/类
private void showMessageBox(String message) {
hideSpinningCircle();
final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true);
simplePopup.setWidth("150px");
simplePopup.setWidget(new HTML(message));
simplePopup.center();
}
示例5: onFailure
import com.google.gwt.user.client.ui.DecoratedPopupPanel; //导入依赖的package包/类
@Override
public void onFailure(Throwable caught) {
DecoratedPopupPanel popupPanel = new DecoratedPopupPanel(true);
popupPanel.setWidget(new Label("Connection problem"));
popupPanel.setPopupPosition(Window.getClientWidth() / 2, 0);
popupPanel.show();
}