Class AttrInTableLabelingStrategy

java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.AttrInTableLabelingStrategy
All Implemented Interfaces:
org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy, org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport, org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy, org.gvsig.tools.persistence.Persistent

public class AttrInTableLabelingStrategy extends org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport implements org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
LabelingStrategy used when the user wants to use label sizes, rotations, etc. from the values included in fields of the datasource's table
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    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 double
     

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

    PAPER, WORLD

    Fields inherited from interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy

    NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(BufferedImage image, Graphics2D g, double scale, org.gvsig.fmap.mapcontext.ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, double dpi)
     
     
     
     
    double
     
     
     
    org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod
     
    org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints
     
     
     
     
    org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    print(Graphics2D g, double scale, org.gvsig.fmap.mapcontext.ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, org.gvsig.compat.print.PrintAttributes props)
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    setColorField(String colorFieldName)
     
    void
    setColorFont(Color colorFont)
     
    void
    setFixedColor(Color fixedColor)
     
    void
    setFixedSize(double fixedSize)
     
    void
    setFont(Font selFont)
     
    void
    setHeightField(String heightFieldName)
    Sets the field that contains the size of the text.
    void
    setLabelingMethod(org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod method)
     
    void
    setLayer(org.gvsig.fmap.mapcontext.layers.FLayer layer)
     
    void
    setPlacementConstraints(org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints constraints)
     
    void
    setRotationField(String rotationFieldName)
     
    void
    setTextField(String textFieldName)
     
    void
    setUsesFixedColor(boolean b)
     
    void
    setUsesFixedSize(boolean b)
     
    void
    setZoomConstraints(org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints constraints)
     
    boolean
    shouldDrawLabels(double scale)
     
    boolean
     
    boolean
     

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

    copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnits

    Methods inherited from class java.lang.Object

    clone, equals, 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, setReferenceSystem, setUnit, toCartographicUnits
  • Field Details

  • Constructor Details

    • AttrInTableLabelingStrategy

      public AttrInTableLabelingStrategy()
  • Method Details

    • getLabelingMethod

      public org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod getLabelingMethod()
      Specified by:
      getLabelingMethod in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • setLabelingMethod

      public void setLabelingMethod(org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingMethod method)
      Specified by:
      setLabelingMethod in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • getPlacementConstraints

      public org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints getPlacementConstraints()
      Specified by:
      getPlacementConstraints in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • setPlacementConstraints

      public void setPlacementConstraints(org.gvsig.fmap.mapcontext.rendering.legend.styling.IPlacementConstraints constraints)
      Specified by:
      setPlacementConstraints in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • getZoomConstraints

      public org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints getZoomConstraints()
      Specified by:
      getZoomConstraints in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • setZoomConstraints

      public void setZoomConstraints(org.gvsig.fmap.mapcontext.rendering.legend.styling.IZoomConstraints constraints)
      Specified by:
      setZoomConstraints in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • draw

      public void draw(BufferedImage image, Graphics2D g, double scale, org.gvsig.fmap.mapcontext.ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, double dpi) throws org.gvsig.fmap.dal.exception.ReadException
      Specified by:
      draw in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
      Throws:
      org.gvsig.fmap.dal.exception.ReadException
    • getRotationField

      public String getRotationField()
      Specified by:
      getRotationField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getTextField

      public String getTextField()
      Specified by:
      getTextField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getHeightField

      public String getHeightField()
      Specified by:
      getHeightField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getColorField

      public String getColorField()
      Specified by:
      getColorField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setTextField

      public void setTextField(String textFieldName)
      Specified by:
      setTextField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setRotationField

      public void setRotationField(String rotationFieldName)
      Specified by:
      setRotationField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setHeightField

      public void setHeightField(String heightFieldName)
      Sets the field that contains the size of the text. The size is computed in meters. To use any other unit, call setUnit(int) with the scale factor from meters (for centimeters, call setUnitFactor(0.01)).
      Specified by:
      setHeightField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
      Parameters:
      heightFieldName -
    • setColorField

      public void setColorField(String colorFieldName)
      Specified by:
      setColorField in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • print

      public void print(Graphics2D g, double scale, org.gvsig.fmap.mapcontext.ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, org.gvsig.compat.print.PrintAttributes props) throws org.gvsig.fmap.dal.exception.ReadException
      Specified by:
      print in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
      Throws:
      org.gvsig.fmap.dal.exception.ReadException
    • setUsesFixedSize

      public void setUsesFixedSize(boolean b)
      Specified by:
      setUsesFixedSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • usesFixedSize

      public boolean usesFixedSize()
      Specified by:
      usesFixedSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getFixedSize

      public double getFixedSize()
      Specified by:
      getFixedSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setFixedSize

      public void setFixedSize(double fixedSize)
      Specified by:
      setFixedSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setUsesFixedColor

      public void setUsesFixedColor(boolean b)
      Specified by:
      setUsesFixedColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • usesFixedColor

      public boolean usesFixedColor()
      Specified by:
      usesFixedColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getFixedColor

      public Color getFixedColor()
      Specified by:
      getFixedColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setFixedColor

      public void setFixedColor(Color fixedColor)
      Specified by:
      setFixedColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getUsedFields

      public String[] getUsedFields()
      Specified by:
      getUsedFields in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • setLayer

      public void setLayer(org.gvsig.fmap.mapcontext.layers.FLayer layer)
      Specified by:
      setLayer in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • shouldDrawLabels

      public boolean shouldDrawLabels(double scale)
      Specified by:
      shouldDrawLabels in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelingStrategy
    • getColorFont

      public Color getColorFont()
      Specified by:
      getColorFont in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setColorFont

      public void setColorFont(Color colorFont)
      Specified by:
      setColorFont in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • getFont

      public Font getFont()
      Specified by:
      getFont in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • setFont

      public void setFont(Font selFont)
      Specified by:
      setFont in interface org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy
    • 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
      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
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException