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.line.impl.AbstractLineSymbol
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.impl.MultiLayerLineSymbol
All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport, org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol, 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.line.ILineSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.IMultiLayerLineSymbol, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent

public class MultiLayerLineSymbol extends AbstractLineSymbol implements org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol, org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.IMultiLayerLineSymbol
MultiLayerLineSymbol allows to create new symbols using a composition of several lineal symbols (xxxLineSymbol implementing ILineSymbol)and be treated as an only one symbol.
Author:
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
     

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

    LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME

    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.line.ILineSymbol

    SYMBOL_NAME

    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
    addLayer(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newLayer)
     
    void
    addLayer(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newLayer, int layerIndex)
     
     
    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
     
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    getLayer(int layerIndex)
     
    int
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle
     
    double
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
     
    boolean
    isSuitableFor(org.gvsig.fmap.geom.Geometry geom)
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    print(Graphics2D g, AffineTransform at, org.gvsig.fmap.geom.Geometry geom, org.gvsig.compat.print.PrintAttributes properties)
     
    boolean
    removeLayer(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol layer)
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    setAlpha(int outlineAlpha)
     
    void
    setCartographicSize(double cartographicSize, org.gvsig.fmap.geom.Geometry geom)
     
    void
    setLayer(int index, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol layer)
     
    void
     
    void
    setLineStyle(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ILineStyle lineStyle)
     
    void
    setLineWidth(double width)
     
    void
    setReferenceSystem(int system)
     
    void
    setUnit(int unitIndex)
     
    void
    swapLayers(int index1, int index2)
     

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

    getSampleGeometry, getSymbolType, offsetFShape, setColor

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

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

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

    copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, 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, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, toCartographicUnits

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

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

    • MULTILAYER_LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME

      public static final String MULTILAYER_LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • MultiLayerLineSymbol

      public MultiLayerLineSymbol()
  • Method Details

    • 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.fmap.mapcontext.rendering.symbols.ISymbol
      Overrides:
      getColor in class AbstractLineSymbol
    • 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
      Overrides:
      getLineStyle in class AbstractLineSymbol
    • getLineWidth

      public double getLineWidth()
      Specified by:
      getLineWidth 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
    • setLineColor

      public void setLineColor(Color color)
      Specified by:
      setLineColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
      Overrides:
      setLineColor in class AbstractLineSymbol
    • 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
      Overrides:
      setLineStyle in class AbstractLineSymbol
    • 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
    • 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
    • isSuitableFor

      public boolean isSuitableFor(org.gvsig.fmap.geom.Geometry geom)
      Specified by:
      isSuitableFor in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
      Overrides:
      isSuitableFor in class AbstractLineSymbol
    • print

      public void print(Graphics2D g, AffineTransform at, org.gvsig.fmap.geom.Geometry geom, org.gvsig.compat.print.PrintAttributes properties)
      Specified by:
      print in interface org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable
      Overrides:
      print in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
    • setLayer

      public void setLayer(int index, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol layer) throws IndexOutOfBoundsException
      Specified by:
      setLayer in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
      Throws:
      IndexOutOfBoundsException
    • swapLayers

      public void swapLayers(int index1, int index2)
      Specified by:
      swapLayers in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
    • getLayer

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getLayer(int layerIndex)
      Specified by:
      getLayer in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
    • getLayerCount

      public int getLayerCount()
      Specified by:
      getLayerCount in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
    • addLayer

      public void addLayer(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newLayer)
      Specified by:
      addLayer in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
    • addLayer

      public void addLayer(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newLayer, int layerIndex) throws IndexOutOfBoundsException
      Specified by:
      addLayer in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
      Throws:
      IndexOutOfBoundsException
    • removeLayer

      public boolean removeLayer(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol layer)
      Specified by:
      removeLayer in interface org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol
    • getAlpha

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

      public void setAlpha(int outlineAlpha)
      Specified by:
      setAlpha in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
      Overrides:
      setAlpha in class AbstractLineSymbol
    • setUnit

      public void setUnit(int unitIndex)
      Specified by:
      setUnit in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      setUnit in class AbstractLineSymbol
    • setReferenceSystem

      public void setReferenceSystem(int system)
      Specified by:
      setReferenceSystem in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      setReferenceSystem in class AbstractLineSymbol
    • setCartographicSize

      public void setCartographicSize(double cartographicSize, org.gvsig.fmap.geom.Geometry geom)
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class AbstractLineSymbol
      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 AbstractLineSymbol
      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 AbstractLineSymbol
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException