Examples of PictureStyle


Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

    this.id = id;
    this.imageSrc = imageSrc;
    this.location = location;
    this.width = width;
    this.height = height;
    style = new PictureStyle(1.0);
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

      public void onClick(ClickEvent event) {
        map.getVectorContext().drawGroup(map.getGroup(RenderGroup.SCREEN), group1);
        Image image = new Image("image");
        image.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
        image.setBounds(new Bbox(250, 70, 48, 48));
        image.setStyle(new PictureStyle(0.5));
        // map.render(image, "all");
        map.getVectorContext().drawImage(group1, image.getId(), image.getHref(), image.getBounds(),
            (PictureStyle) image.getStyle());
      }
    });
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

    button1.setWidth("50%");

    final Image screenImage = new Image("imageInScreenSpace");
    screenImage.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
    screenImage.setBounds(new Bbox(60, 60, 48, 48)); // Pixel coordinates
    screenImage.setStyle(new PictureStyle(0.6));

    button1.addClickHandler(new ClickHandler() {

      // Draw an image in screen space:
      public void onClick(ClickEvent event) {
        map.render(screenImage, RenderGroup.SCREEN, RenderStatus.ALL);
      }
    });
    buttonLayout.addMember(button1);

    IButton button2 = new IButton(I18nProvider.getSampleMessages().screenWorldBTNWorld());
    button2.setWidth("50%");

    // An image
    final Image worldImage = new Image("imageInWorldSpace");
    worldImage.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
    worldImage.setBounds(new Bbox(-2000000, -2000000, 4000000, 4000000)); // Mercator coordinates
    worldImage.setStyle(new PictureStyle(0.8));

    // And some geometries
    final GfxGeometry worldGeometry = new GfxGeometry("MultiPolygonInWorldSpace");
    final GeometryFactory gf = new GeometryFactory(map.getMapModel().getSrid(), map.getMapModel().getPrecision());
    Polygon p1 = gf.createPolygon(gf.createLinearRing(new Bbox(10000000d, 1000d, 1000000d, 1000000d)), null);
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

    this.bbox = bbox;
    this.url = url;
    this.store = store;
    this.id = store.getLayer().getMapModel().getId() + "." + store.getLayer().getId() + "." + code.toString();
    String styleStr = store.getLayer().getLayerInfo().getStyle();
    style = new PictureStyle(Double.valueOf(styleStr).doubleValue());
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

        } else if (layer instanceof RasterLayer) {
          // For raster layers; show a nice symbol:
          lineCount++;

          graphics.drawImage(parentGroup, "style" + lineCount, Geomajas.getIsomorphicDir()
              + "geomajas/osgeo/layer-raster.png", new Bbox(10, y, 16, 16), new PictureStyle(1));
          Coordinate textPosition = new Coordinate(30, y - 2);
          graphics.drawText(parentGroup, "text" + lineCount, layer.getLabel(), textPosition, fontStyle);
          y += 20;
        }
      }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

   * @since 1.8.0
   */
  public void setOpacity(double opacity) {
    getLayerInfo().setStyle(Double.toString(opacity));
    for (RasterTile tile : store.getTiles()) {
      tile.setStyle(new PictureStyle(opacity));
    }
    handlerManager.fireEvent(new LayerStyleChangeEvent(this));
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

  public Image(RasterTile raster) {
    super(raster.getId());
    href = raster.getUrl();
    original = new Bbox(raster.getBounds());
    style = new PictureStyle(1);
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

    west = new PanButton(getId() + "_panWest", map, PanButtonDirection.WEST);
    west.setParent(this);

    background = new Image(getId() + "_panImageBG");
    background.setHref(Geomajas.getIsomorphicDir() + "geomajas/mapaddon/panbg.png");
    background.setStyle(new PictureStyle(1));

    applyPosition();
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

    super(id, 125, 12);
    this.map = map;
    image = new Image(id + "-img");
    image.setBounds(new Bbox(0, 0, 125, 12));
    image.setHref(Geomajas.getIsomorphicDir() + "geomajas/mapaddon/powered_by_geomajas.gif");
    image.setStyle(new PictureStyle(1));

    dummy = new Rectangle(getId() + "-dummy");
    dummy.setStyle(new ShapeStyle("#FFFFFF", 0, "#FFFFFF", 0, 0));
    dummy.setBounds(new Bbox(0, 0, 1, 1));
  }
View Full Code Here

Examples of org.geomajas.gwt.client.gfx.style.PictureStyle

  public void accept(PainterVisitor visitor, Object group, Bbox bounds, boolean recursive) {
    map.getVectorContext().drawGroup(group, this);

    Coordinate c = getUpperLeftCorner();
    map.getVectorContext().drawImage(this, "bg", Geomajas.getIsomorphicDir() + "geomajas/mapaddon/zoombg.png",
        new Bbox(c.getX(), c.getY(), 20, 60), new PictureStyle(1));

    map.getVectorContext().drawImage(this, "plus", Geomajas.getIsomorphicDir() + "geomajas/mapaddon/zoomPlus.png",
        new Bbox(c.getX(), c.getY(), 20, 20), new PictureStyle(1));

    map.getVectorContext().drawImage(this, "minus",
        Geomajas.getIsomorphicDir() + "geomajas/mapaddon/zoomMinus.png",
        new Bbox(c.getX(), c.getY() + 40, 20, 20), new PictureStyle(1));

    map.getVectorContext().drawImage(this, "max", Geomajas.getIsomorphicDir() + "geomajas/mapaddon/maxextent.png",
        new Bbox(c.getX(), c.getY() + 20, 20, 20), new PictureStyle(1));

    if (firstTime) {
      map.getVectorContext().setController(this, "plus", new ZoomController(map, 2), Event.MOUSEEVENTS);
      map.getVectorContext().setCursor(this, "plus", Cursor.POINTER.getValue());
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.