当前位置: 首页>>代码示例>>Java>>正文


Java PopupPanel.addStyleName方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.PopupPanel.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java PopupPanel.addStyleName方法的具体用法?Java PopupPanel.addStyleName怎么用?Java PopupPanel.addStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.PopupPanel的用法示例。


在下文中一共展示了PopupPanel.addStyleName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CustomOverlayWidget

import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
/**
 * The constructor should first call super() to initialize the component and
 * then handle any initialization relevant to Vaadin.
 */
public CustomOverlayWidget() {
    setWidget(new HTML()); // Seems that we need this one
    overlay = new PopupPanel();
    overlay.addStyleName(CLASSNAME);
    overlay.setAutoHideEnabled(false);
    overlay.setAnimationEnabled(false);
    overlay.setModal(false);

    Event.addNativePreviewHandler(new NativePreviewHandler() {
        public void onPreviewNativeEvent(NativePreviewEvent event) {
            int typeInt = event.getTypeInt();
            // We're only listening for these
            if (typeInt == Event.ONSCROLL) {
                CustomOverlayWidget.this.updateOverlayPosition();
            }
        }
    });
}
 
开发者ID:Haulmont,项目名称:vaadin-overlays,代码行数:23,代码来源:CustomOverlayWidget.java

示例2: MultiLineTextDisplayElement

import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public MultiLineTextDisplayElement(String id, int x, int y, int width, int height,
        String text, String label, int[][] coords) {
    super(id, x, y, width, height);
    this.coords = coords;
    this.label = label;
    this.text = text;
    
    popup = new PopupPanel(true, false);
    HTML content = new HTML(text);
	
    popup.setStylePrimaryName("PopupPanel");
    popup.addStyleName("AnnotationPopup");
	popup.setWidget(content);
    
 // Create a canvas containing the filled polygon with no border
    Canvas sub_canvas = Canvas.createIfSupported();
    sub_canvas.setCoordinateSpaceWidth(width);
    sub_canvas.setCoordinateSpaceHeight(height);
    
    Context2d context = sub_canvas.getContext2d();
    context.beginPath();
    context.moveTo(coords[0][0] - baseLeft(), coords[0][1] - baseTop());

    for (int i = 1; i < coords.length; i++) {
    	context.lineTo(coords[i][0] - baseLeft(), coords[i][1] - baseTop());
    }
	
    context.setFillStyle(color_fill);
    context.fill();
    
    context.closePath();
    
    this.image_data = context.getImageData(0, 0, width, height);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:35,代码来源:MultiLineTextDisplayElement.java

示例3: 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);
}
 
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:31,代码来源:GwtView.java

示例4: 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);

}
 
开发者ID:lsst,项目名称:firefly,代码行数:15,代码来源:PopupUtil.java

示例5: 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);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:24,代码来源:BackgroundManager.java

示例6: ToolTip

import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
/**
 * Default constructor.
 */
public ToolTip() {
	toolTip = (PopupPanel) UIBINDER.createAndBindUi(this);

	ApplicationResource.INSTANCE.css().ensureInjected();
	toolTip.addStyleName(ApplicationResource.INSTANCE.css().toolTip());
}
 
开发者ID:geomajas,项目名称:geomajas-gwt2-quickstart-application,代码行数:10,代码来源:ToolTip.java

示例7: ToolTip

import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
/**
 * Default constructor.
 */
public ToolTip() {
	toolTip = (PopupPanel) UIBINDER.createAndBindUi(this);

	ToolTipResource.INSTANCE.css().ensureInjected();
	toolTip.addStyleName(ToolTipResource.INSTANCE.css().toolTip());
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:10,代码来源:ToolTip.java

示例8: addZIndexStyle

import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
/**
 * Don't use this method, there are betters ways, ask trey
 * Mostly this method exist to work around a firefox 2 on the mac bug
 * @param popup the popup
 * @param styleStr the style to use, must be on of the ones below
 */
static void addZIndexStyle(PopupPanel popup, String styleStr) {
        popup.addStyleName(styleStr);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:10,代码来源:PopupPane.java


注:本文中的com.google.gwt.user.client.ui.PopupPanel.addStyleName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。