Examples of Size


Examples of com.google.gwt.maps.client.geom.Size

   *
   * @param dx the number of pixels to pan left
   * @param dy the number of pixels to pan up
   */
  public void panBy(int dx, int dy) {
    MapImpl.impl.panBy(jsoPeer, new Size(dx, dy));
  }
View Full Code Here

Examples of com.google.gwt.maps.client.geom.Size

  }

  public MapUIOptionsDemo() {
    VerticalPanel vp = new VerticalPanel();

    Size smallSize = Size.newInstance(250, 250);
    HorizontalPanel smallMapPanel = new HorizontalPanel();
    new UIOptionsControl(smallMapPanel, smallSize);
    smallMapPanel.getElement().getStyle().setPropertyPx("marginBottom", 20);

    Size largeSize = Size.newInstance(500, 400);
    HorizontalPanel largeMapPanel = new HorizontalPanel();
    new UIOptionsControl(largeMapPanel, largeSize);

    vp.add(new Label("Small Map with default UI style"));
    vp.add(smallMapPanel);
View Full Code Here

Examples of com.google.gwt.maps.client.geom.Size

        String dragCrossImage = "DragCrossImage";
        ic.setDragCrossImageURL(dragCrossImage);
        assertEquals("DragCrossImageURL", dragCrossImage,
            ic.getDragCrossImageUrl());

        Size size1 = Size.newInstance(20, 20);
        ic.setDragCrossSize(size1);
        assertEquals("DragCrossSize", size1, ic.getDragCrossSize());

        Point pointB = Point.newInstance(20, 30);
        ic.setIconAnchor(pointB);
        assertEquals("IconAnchor", pointB, ic.getIconAnchor());

        Size size2 = Size.newInstance(2, 2);
        ic.setIconSize(size2);
        assertEquals("IconSize", size2, ic.getIconSize());

        int[] map1 = {1, 2, 3, 4};
        ic.setImageMap(map1);
        assertEquals("ImageMap length", map1.length, ic.getImageMap().length());
        for (int i = 0; i < map1.length; i++) {
          assertEquals("ImageMap", map1[i], ic.getImageMapArray()[i]);
        }

        JsArrayInteger map2 = JavaScriptObject.createArray().cast();
        map2.set(0, 4);
        map2.set(1, 5);
        map2.set(2, 6);
        map2.set(3, 7);
        ic.setImageMap(map2);
        for (int i = 0; i < map2.length(); i++) {
          assertEquals("ImageMap", map2.get(i), ic.getImageMap().get(i));
        }

        String dummyImage = "DummyImage";
        ic.setImageURL(dummyImage);
        assertEquals("ImageURL", dummyImage, ic.getImageURL());

        Point pointC = Point.newInstance(100, 20);
        ic.setInfoWindowAnchor(pointC);
        assertEquals("InfoWindowAnchor", pointC, ic.getInfoWindowAnchor());

        ic.setMaxHeight(10);
        assertEquals("MaxHeight", 10, ic.getMaxHeight());

        dummyImage = "DummyMozPrintImage";
        ic.setMozPrintImageURL(dummyImage);
        assertEquals("MozPrintImageURL", dummyImage, ic.getMozPrintImageURL());

        dummyImage = "PrintImage";
        ic.setPrintImageURL(dummyImage);
        assertEquals("PrintImageURL", dummyImage, ic.getPrintImageURL());

        Size size3 = Size.newInstance(12, 34);
        ic.setShadowSize(size3);
        assertEquals("ShadowSize", size3, ic.getShadowSize());

        String dummyShadowURL = "DummyShadowURL";
        ic.setShadowURL(dummyShadowURL);
View Full Code Here

Examples of com.googlecode.jsonwebservice.attachment.Size

      throw new Error(e);
    }
  }

  private BufferedImage getBufferedImage(JFreeChart chart, ChartConfig config) {
    Size size = config.getSize();
    int zoomLevel = size.getZoomLevel() > 0 ? size.getZoomLevel() : 1;
    int viewboxWidth = size.getWidth() / zoomLevel;
    int viewboxHeight = size.getHeight() / zoomLevel;
    return chart.createBufferedImage(viewboxWidth, viewboxHeight,
        BufferedImage.TYPE_INT_RGB, null);
  }
View Full Code Here

Examples of com.googlecode.jsonwebservice.attachment.Size

        null);
    // Create an instance of the SVG Generator
    SVGGraphics2D svgGenerator = new SVGGraphics2D(document);

    // Ask the chart to render into the SVG Graphics2D implementation
    Size size = config.getSize();
    int zoomLevel = size.getZoomLevel() > 0 ? size.getZoomLevel() : 1;
    int viewboxWidth = size.getWidth() / zoomLevel;
    int viewboxHeight = size.getHeight() / zoomLevel;
    int chartWidth = viewboxWidth - (60 / zoomLevel);
    int chartHeight = viewboxHeight - (28 / zoomLevel);

    chart.draw(svgGenerator, new Rectangle2D.Double(10, 10, chartWidth,
        chartHeight), null);
View Full Code Here

Examples of com.scriptographer.adm.Size

    addToContent(logo, "0, 0, 0, 1, L, T");

    TextPane text = new TextPane(this);
    if (!Pattern.compile("[\n\r]").matcher(message).find()
        && getTextSize(message).width > 320)
      text.setMaximumSize(new Size(320, -1));
    text.setMinimumSize(240, -1);
    text.setText(message);
    text.setMarginBottom(8);
    addToContent(text, "1, 0, 2, 0, L, C");
View Full Code Here

Examples of com.sencha.gxt.core.client.util.Size

   * Returns the viewports size.
   *
   * @return the viewport size
   */
  public static Size getViewportSize() {
    return new Size(getViewportWidth(), getViewportHeight());
  }
View Full Code Here

Examples of com.sencha.gxt.core.client.util.Size

    appearance.onHideHeader(getElement(), !visible);
  }

  @Override
  protected void onResize(int width, int height) {
    Size frameSize = getFrameSize();

    if (isAutoWidth()) {
      getContainerTarget().getStyle().clearWidth();
    } else {
      width -= frameSize.getWidth();
      getContainerTarget().setWidth(width - frameSize.getWidth(), true);

    }

    if (isAutoHeight()) {
      getContainerTarget().getStyle().clearHeight();
    } else {
      height -= frameSize.getHeight();
      height -= appearance.getHeaderElement(getElement()).getOffsetHeight();
      getContainerTarget().setHeight(height - frameSize.getHeight(), true);
    }

    super.onResize(width, height);
  }
View Full Code Here

Examples of com.sencha.gxt.core.client.util.Size

  protected XElement getContainerTarget() {
    return appearance.getContentElem(getElement());
  }

  protected Size getFrameSize() {
    return new Size(appearance.getFrameWidth(getElement()), appearance.getFrameHeight(getElement()));
  }
View Full Code Here

Examples of com.sencha.gxt.core.client.util.Size

      header.getElement().getStyle().setCursor(Cursor.DEFAULT);
    }
  }

  protected Size adjustBodySize() {
    return new Size(0, 0);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.