Package com.google.gwt.maps.client.geom

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


   *          computed from.
   * @param offsetX number of horizontal pixels offset from the corner.
   * @param offsetY number of vertical pixels offset from teh corner.
   */
  public ControlPosition(ControlAnchor anchor, int offsetX, int offsetY) {
    jsoPeer = ControlPositionImpl.impl.construct(anchor.getValue(), new Size(
        offsetX, offsetY));
  }
View Full Code Here


   *
   * @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

  }

  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

        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

TOP

Related Classes of com.google.gwt.maps.client.geom.Size

Copyright © 2018 www.massapicom. 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.