java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.MultiShapeSymbol
All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport, org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol_v2, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent
Direct Known Subclasses:
WarningSymbol

public class MultiShapeSymbol extends org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol implements org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
MultiShapeSymbol class allows to create a composition of several symbols with different shapes and be treated as a single symbol.These shapes can be marker,line or fill.
Author:
2005-2008 jaume dominguez faus - jaume.dominguez@iver.es, 2009- César Ordiñana - gvSIG team
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     

    Nested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport

    org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol

    LOGGER, SYMBOL_PERSISTENCE_DEFINITION_NAME

    Fields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport

    PAPER, WORLD

    Fields inherited from interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol

    CIRCLE_STYLE, CROSS_STYLE, DIAMOND_STYLE, HORIZONTAL_LINE_STYLE, SQUARE_STYLE, STAR_STYLE, TRIANGLE_STYLE, VERTICAL_LINE_STYLE, X_STYLE

    Fields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol

    SELECTION_COLOR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    draw(Graphics2D g, AffineTransform affineTransform, org.gvsig.fmap.geom.Geometry geom, org.gvsig.fmap.dal.feature.Feature f, org.gvsig.tools.task.Cancellable cancel, Rectangle r)
     
    int
     
     
    int
     
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
     
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
     
    double
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask
     
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
     
    int
     
    double
     
    double
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
     
    int
     
    int
     
    boolean
     
    boolean
     
    boolean
     
    boolean
    isSuitableFor(org.gvsig.fmap.geom.Geometry geom)
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    setAlpha(int outlineAlpha)
     
    void
    setColor(Color color)
     
    void
     
    void
    setFillSymbol(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol fillFillSymbol)
     
    void
    setHasFill(boolean hasFill)
     
    void
    setHasOutline(boolean hasOutline)
     
    void
     
    void
    setLineStyle(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle lineStyle)
     
    void
    setLineSymbol(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol lineSymbol)
     
    void
    setLineWidth(double width)
     
    void
    setMarkerSymbol(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol markerSymbol)
     
    void
    setMask(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask mask)
     
    void
     
    void
    setOutline(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol outline)
     
    void
    setReferenceSystem(int system)
     
    void
    setRotation(double rotation)
     
    void
    setSize(double size)
     
    void
    setUnit(int unitIndex)
     

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol

    cloneForSelection, cloneForSelection, draw, drawInsideRectangle, equals, getDescription, getFeature, getID, getRequiredFeatureAttributeNames, getSymbolForSelection, print, setDescription, setFeature, setID, setIsShapeVisible

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport

    copyCartographicContext, getCartographicContext, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, toCartographicUnits

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport

    copyCartographicContext, getCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, toCartographicUnits

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable

    print

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol

    draw, drawInsideRectangle, getDescription, getFeature, getID, getSymbolForSelection, setDescription, setFeature, setID
  • Field Details

  • Constructor Details

    • MultiShapeSymbol

      public MultiShapeSymbol()
  • Method Details

    • getLineColor

      public Color getLineColor()
    • setLineColor

      public void setLineColor(Color color)
      Specified by:
      setLineColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • getLineStyle

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle getLineStyle()
      Specified by:
      getLineStyle in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • setLineStyle

      public void setLineStyle(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle lineStyle)
      Specified by:
      setLineStyle in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • setLineWidth

      public void setLineWidth(double width)
      Specified by:
      setLineWidth in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • getLineWidth

      public double getLineWidth()
      Specified by:
      getLineWidth in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • getAlpha

      public int getAlpha()
      Specified by:
      getAlpha in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • setAlpha

      public void setAlpha(int outlineAlpha)
      Specified by:
      setAlpha in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
      Specified by:
      setAlpha in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getSymbolForSelection

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolForSelection()
      Specified by:
      getSymbolForSelection in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
      Overrides:
      getSymbolForSelection in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
    • draw

      public void draw(Graphics2D g, AffineTransform affineTransform, org.gvsig.fmap.geom.Geometry geom, org.gvsig.fmap.dal.feature.Feature f, org.gvsig.tools.task.Cancellable cancel, Rectangle r)
      Specified by:
      draw in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    • isShapeVisible

      public boolean isShapeVisible()
      Specified by:
      isShapeVisible in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
      Overrides:
      isShapeVisible in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
    • getSymbolType

      public int getSymbolType()
      Specified by:
      getSymbolType in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    • isSuitableFor

      public boolean isSuitableFor(org.gvsig.fmap.geom.Geometry geom)
      Specified by:
      isSuitableFor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
      Specified by:
      isSuitableFor in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    • getRotation

      public double getRotation()
      Specified by:
      getRotation in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setRotation

      public void setRotation(double rotation)
      Specified by:
      setRotation in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getOffset

      public Point2D getOffset()
      Specified by:
      getOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setOffset

      public void setOffset(Point2D offset)
      Specified by:
      setOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getSize

      public double getSize()
      Specified by:
      getSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setSize

      public void setSize(double size)
      Specified by:
      setSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getColor

      public Color getColor()
      Specified by:
      getColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
      Specified by:
      getColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
      Specified by:
      getColor in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    • setColor

      public void setColor(Color color)
      Specified by:
      setColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
      Specified by:
      setColor in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    • setFillColor

      public void setFillColor(Color color)
      Specified by:
      setFillColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • setOutline

      public void setOutline(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol outline)
      Specified by:
      setOutline in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • getFillColor

      public Color getFillColor()
      Specified by:
      getFillColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • getOutline

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol getOutline()
      Specified by:
      getOutline in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • getFillAlpha

      public int getFillAlpha()
      Specified by:
      getFillAlpha in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • getMask

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask getMask()
      Specified by:
      getMask in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setUnit

      public void setUnit(int unitIndex)
      Specified by:
      setUnit in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      setUnit in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
    • getUnit

      public int getUnit()
      Specified by:
      getUnit in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      getUnit in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
    • setMask

      public void setMask(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask mask)
      Specified by:
      setMask in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getReferenceSystem

      public int getReferenceSystem()
      Specified by:
      getReferenceSystem in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      getReferenceSystem in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
    • setReferenceSystem

      public void setReferenceSystem(int system)
      Specified by:
      setReferenceSystem in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      setReferenceSystem in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
    • getMarkerSymbol

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol getMarkerSymbol()
      Specified by:
      getMarkerSymbol in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
    • getLineSymbol

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol getLineSymbol()
      Specified by:
      getLineSymbol in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
    • getFillSymbol

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol getFillSymbol()
      Specified by:
      getFillSymbol in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
    • setMarkerSymbol

      public void setMarkerSymbol(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol markerSymbol)
      Specified by:
      setMarkerSymbol in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
    • setLineSymbol

      public void setLineSymbol(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol lineSymbol)
      Specified by:
      setLineSymbol in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
    • setFillSymbol

      public void setFillSymbol(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol fillFillSymbol)
      Specified by:
      setFillSymbol in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.IMultiShapeSymbol
    • hasFill

      public boolean hasFill()
      Specified by:
      hasFill in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • setHasFill

      public void setHasFill(boolean hasFill)
      Specified by:
      setHasFill in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • hasOutline

      public boolean hasOutline()
      Specified by:
      hasOutline in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • setHasOutline

      public void setHasOutline(boolean hasOutline)
      Specified by:
      setHasOutline in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
      Throws:
      CloneNotSupportedException
    • loadFromState

      public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      loadFromState in interface org.gvsig.tools.persistence.Persistent
      Overrides:
      loadFromState in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • saveToState

      public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      saveToState in interface org.gvsig.tools.persistence.Persistent
      Overrides:
      saveToState in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException