Package org.geomajas.gwt.client.gfx.style

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


    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


    image.getBounds().setX(getUpperLeftCorner().getX());
    image.getBounds().setY(getUpperLeftCorner().getY());

    map.getVectorContext().drawRectangle(this, getId() + "-bg", image.getBounds(),
        new ShapeStyle("#FFFFFF", 0.6f, "#FFFFFF", 0, 0));
    map.getVectorContext().drawImage(this, image.getId(), image.getHref(), image.getBounds(),
        (PictureStyle) image.getStyle());
  }
View Full Code Here

    bottomLine.setBounds(new Bbox(0, 0, 0, 1));
    distance = new Text((null == getId() ? "" : getId() + "-text"));
    distance.setStyle(STYLE_FONT);

    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

   * @param element
   *            The element to retrieve the style from.
   * @return The ShapeStyle object retrieved from the element.
   */
  public static ShapeStyle retrieveShapeStyle(Element element) {
    ShapeStyle style = new ShapeStyle();

    // Check the "fill" child-element:
    String filled = element.getAttribute("filled");
    if ("true".equals(filled)) {
      Element fill = element.getElementsByTagName("fill").getItem(0);
      style.setFillColor(fill.getAttribute("color"));
      style.setFillOpacity(Float.parseFloat(fill.getAttribute("opacity")));
    }

    // Check the "stroke" child-element:
    String stroked = element.getAttribute("stroked");
    if ("true".equals(stroked)) {
      Element stroke = element.getElementsByTagName("stroke").getItem(0);
      style.setFillColor(stroke.getAttribute("color"));
      style.setFillOpacity(Float.parseFloat(stroke.getAttribute("opacity")));
      style.setStrokeWidth(Integer.parseInt(stroke.getAttribute("strokeweight")));
    }
    return style;
  }
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.gfx.style.ShapeStyle

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.