本文整理汇总了Java中com.google.gwt.user.client.ui.PopupPanel.show方法的典型用法代码示例。如果您正苦于以下问题:Java PopupPanel.show方法的具体用法?Java PopupPanel.show怎么用?Java PopupPanel.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.PopupPanel
的用法示例。
在下文中一共展示了PopupPanel.show方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HorizontalPanelWithHint
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public HorizontalPanelWithHint(Widget hint) {
super();
iHint = new PopupPanel();
iHint.setWidget(hint);
iHint.setStyleName("unitime-PopupHint");
sinkEvents(Event.ONMOUSEOVER);
sinkEvents(Event.ONMOUSEOUT);
sinkEvents(Event.ONMOUSEMOVE);
iShowHint = new Timer() {
@Override
public void run() {
iHint.show();
}
};
iHideHint = new Timer() {
@Override
public void run() {
iHint.hide();
}
};
}
示例2: onResponseReceived
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
@Override
public void onResponseReceived(Request request, Response response) {
String text = response.getText();
PopupPanel popup = new PopupPanel(true);
popup.add(new HTML("<strong>Saved edits for:<p></p></strong>"+text+"<p></p>Click outside box to dismiss."));
popup.setPopupPosition(200, Window.getClientHeight()/3);
popup.show();
CellFormatter formatter = datatable.getCellFormatter();
for (Iterator dirtyIt = dirtyrows.keySet().iterator(); dirtyIt.hasNext();) {
Integer widgetrow = (Integer) dirtyIt.next();
for (int i = 0; i < headers.length; i++) {
formatter.removeStyleName(widgetrow, i, "dirty");
}
CheckBox box = (CheckBox) datatable.getWidget(widgetrow, 0);
box.setValue(false);
}
dirtyrows.clear();
}
示例3: showDetails
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
private void showDetails(final KieContainer container) {
final PopupPanel detailsPopup = new PopupPanel();
detailsPopup.setTitle(Constants.INSTANCE.detailsForContainer() + " " + container.getId());
detailsPopup.setAutoHideEnabled(true);
detailsPopup.setModal(true);
detailsPopup.setGlassEnabled(true);
detailsPopup.add(detailsWidget);
detailsPopup.center();
detailsPopup.show();
detailsWidget.show(container);
}
示例4: createInfoWindow
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的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);
}
示例5: showMinimalError
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public static void showMinimalError(Widget anchor, String msg) {
final PopupPanel p = new PopupPanel(true);
p.setAnimationEnabled(true);
p.addStyleName("onTopDialog");
p.setWidget(new HTML(msg));
p.setPopupPosition(anchor.getAbsoluteLeft() + anchor.getOffsetWidth(), anchor.getAbsoluteTop() + anchor.getOffsetHeight());
p.show();
new Timer(){
public void run() {
p.hide();
}
}.schedule(4000);
}
示例6: animationIconCSS
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
private void animationIconCSS(int mills, int startX, int startY) {
Image icon = new Image(ONE_GEAR_ICON_LARGE);
final PopupPanel popup= new PopupPanel();
popup.setStyleName("");
popup.addStyleName("animationLevel");
popup.setAnimationEnabled(false);
popup.setWidget(icon);
Widget w= button.getIcon()!=null ? button.getIcon() : button;
int endX= w.getAbsoluteLeft();
int endY= w.getAbsoluteTop();
setupCssAnimation(startX,startY,endX,endY);
int extra= 35;
CssAnimation.setAnimationStyle(popup,"iconAnimate "+ (mills+extra) +"ms ease-in-out 1 normal");
popup.setPopupPosition(endX, endY);
popup.show();
Timer t= new Timer() {
@Override
public void run() {
popup.hide();
}
};
t.schedule( mills);
}
示例7: showAtCenter
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public static void showAtCenter(PopupPanel popup) {
int h = Window.getClientHeight();
int w = Window.getClientWidth();
popup.show();
int offsetx = StringUtils.getInt(DOM.getStyleAttribute(popup.getElement(), "width"), 300);
int offsety = StringUtils.getInt(DOM.getStyleAttribute(popup.getElement(), "height"), 200);
int x = (w - offsetx) / 2;
int y = (h - offsety) / 2;
popup.setPopupPosition(x, y);
}
示例8: show
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public static void show(String text, int delayMillis, final boolean doReload){
final PopupPanel notificationPopup = new PopupPanel(false);
final Label label = new Label(text);
notificationPopup.setWidget(label);
notificationPopup.setPopupPosition(50, 20);
notificationPopup.setVisible(true);
notificationPopup.show();
Timer t = new Timer() {
@Override
public void run() {
Animation a = new Animation() {
@Override
protected void onUpdate(double progress) {
notificationPopup.getElement().getStyle().setProperty("opacity", String.valueOf(1-progress));
if(progress == 1) {
notificationPopup.hide();
if(doReload)
Location.reload();
}
}
};
a.run(500);
}
};
t.schedule(delayMillis);
}
示例9: handleException
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public void handleException(Object source, ValidationException exception) {
final Widget w = (Widget) source;
final PopupPanel p = new PopupPanel(false);
popups.put( source, p );
p.setStyleName("gwittir-ValidationPopup");
p.setWidget(new Label(this.getMessage(exception)));
p.setPopupPosition( -5000, -5000 );
p.show();
if(this.position == BOTTOM) {
p.setPopupPosition(w.getAbsoluteLeft(),
w.getAbsoluteTop() + w.getOffsetHeight());
} else if(this.position == RIGHT) {
p.setPopupPosition(w.getAbsoluteLeft() + w.getOffsetWidth(),
w.getAbsoluteTop());
} else if(this.position == LEFT) {
p.setPopupPosition(w.getAbsoluteLeft() - p.getOffsetWidth(),
w.getAbsoluteTop());
} else if(this.position == TOP) {
p.setPopupPosition(w.getAbsoluteLeft(),
w.getAbsoluteTop() - p.getOffsetHeight());
}
if( w instanceof SourcesPropertyChangeEvents ){
GWT.log("is PCE", null);
PropertyChangeListener attachListener = new PropertyChangeListener(){
public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
if( ((Boolean)propertyChangeEvent.getNewValue()).booleanValue() ){
p.setVisible( true );
} else {
p.setVisible( false );
}
}
};
listeners.put(w, attachListener );
((SourcesPropertyChangeEvents)w).addPropertyChangeListener("attached", attachListener);
((SourcesPropertyChangeEvents)w).addPropertyChangeListener("visible", attachListener);
}
}