类 LegendScheme


  • public class LegendScheme
    extends java.lang.Object
    Legend scheme class
    作者:
    Yaqiang Wang
    • 构造器详细资料

      • LegendScheme

        public LegendScheme()
        Constructor
      • LegendScheme

        public LegendScheme​(ShapeTypes aShapeType)
        Constructor
        参数:
        aShapeType -
      • LegendScheme

        public LegendScheme​(java.util.List<ColorBreak> lbs)
        Constructor
        参数:
        lbs - Legend breaks
    • 方法详细资料

      • getFieldName

        public java.lang.String getFieldName()
        Get field name
        返回:
        The field name
      • setFieldName

        public void setFieldName​(java.lang.String fn)
        Set field name
        参数:
        fn - The field name
      • isGeometry

        public boolean isGeometry()
        Is Geometry legend scheme or not
        返回:
        Boolean
      • getLegendType

        public LegendType getLegendType()
        Get legend type
        返回:
        The legend type
      • setLegendType

        public void setLegendType​(LegendType lt)
        Set legend type
        参数:
        lt - The legend type
      • getShapeType

        public ShapeTypes getShapeType()
        Get shape type
        返回:
        The shape type
      • setShapeType

        public void setShapeType​(ShapeTypes st)
        Set shape type
        参数:
        st - The shape type
      • getBreakType

        public BreakTypes getBreakType()
        Get break type
        返回:
        The break type
      • getLegendBreaks

        public java.util.List<ColorBreak> getLegendBreaks()
        Get legend breaks
        返回:
        The legend breaks
      • getLegendBreak

        public ColorBreak getLegendBreak​(int i)
        Get legend break by index
        参数:
        i - Index
        返回:
        A legend break
      • setLegendBreaks

        public void setLegendBreaks​(java.util.List<ColorBreak> breaks)
        Set legend breaks
        参数:
        breaks - The legend breaks
      • setLegendBreak

        public void setLegendBreak​(int i,
                                   ColorBreak value)
        Set a legendBreak
        参数:
        i - Index
        value - Legend break
      • getHasNoData

        public boolean getHasNoData()
        Get if has no data
        返回:
        If has no data
      • setHasNoData

        public void setHasNoData​(boolean istrue)
        Set if has no data
        参数:
        istrue - If has no data
      • getMinValue

        public double getMinValue()
        Get minimum value
        返回:
        Minimum value
      • setMinValue

        public void setMinValue​(double min)
        Set minimum value
        参数:
        min -
      • getMaxValue

        public double getMaxValue()
        Get maximum value
        返回:
        Maximum value
      • setMaxValue

        public void setMaxValue​(double max)
        Set maximum value
        参数:
        max - Maximum value
      • getUndefValue

        public double getUndefValue()
        Get undefine value
        返回:
        Undefine value
      • setUndefValue

        public void setUndefValue​(double uv)
        Set undefine value
        参数:
        uv - Undefine value
      • getBreakNum

        public int getBreakNum()
        Get legend break number
        返回:
        Legend break number
      • getVisibleBreakNum

        public int getVisibleBreakNum()
        Get visible legend breaks number
        返回:
        The visible legend breaks number
      • VisibleBreakNum

        public int VisibleBreakNum()
        Get visible break number
        返回:
        Visible break number
      • addLegendBreak

        public void addLegendBreak​(ColorBreak lb)
        Add a legend break
        参数:
        lb - Legend break
      • addLegendBreak

        public void addLegendBreak​(java.util.List<ColorBreak> lb)
        Add a legend breaks
        参数:
        lb - Legend breaks
      • findBreaks

        public java.util.List<ColorBreak> findBreaks​(java.util.List<java.lang.Double> values)
        Find breaks
        参数:
        values - Values
        返回:
        Color breaks
      • findLegendBreak

        public ColorBreak findLegendBreak​(double v)
        Find legend break by value
        参数:
        v - Value
        返回:
        Legend break
      • getColors

        public java.util.List<java.awt.Color> getColors()
        Get color list
        返回:
        Color list
      • isConsistent

        public boolean isConsistent​(DrawType2D drawTyp)
        Judge if shape type is consistent with draw type
        参数:
        drawTyp - Draw type
        返回:
        Boolean
      • convertTo

        public LegendScheme convertTo​(ShapeTypes shapeType)
        Convert to other shape type
        参数:
        shapeType - The shape type
        返回:
        Result legend scheme
      • asArrow

        public void asArrow()
        Convert point legend to arrow legend
      • exportToXML

        public void exportToXML​(org.w3c.dom.Document doc,
                                org.w3c.dom.Element parent)
        Export to xml document
        参数:
        doc - xml document
        parent - Parent xml element
      • exportToXMLFile

        public void exportToXMLFile​(java.lang.String aFile)
                             throws javax.xml.parsers.ParserConfigurationException
        Export to xml file
        参数:
        aFile - xml file path
        抛出:
        javax.xml.parsers.ParserConfigurationException
      • importFromXML

        public void importFromXML​(org.w3c.dom.Node LSNode)
        Import legend scheme from XML node
        参数:
        LSNode - xml node
      • importFromXML

        public void importFromXML​(org.w3c.dom.Node LSNode,
                                  boolean keepShape)
        Import legend scheme from xml node
        参数:
        LSNode - xml node
        keepShape - if keep the legend shape type
      • importFromXMLFile

        public void importFromXMLFile​(java.lang.String aFile)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      org.xml.sax.SAXException,
                                      java.io.IOException
        Import legend scheme from XML file
        参数:
        aFile - File path
        抛出:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException
      • importFromXMLFile

        public void importFromXMLFile​(java.lang.String aFile,
                                      boolean keepShape)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      org.xml.sax.SAXException,
                                      java.io.IOException
        Import legend scheme from XML file
        参数:
        aFile - file path
        keepShape - If keep shape type
        抛出:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException
      • importFromPaletteFile_Unique

        public void importFromPaletteFile_Unique​(java.lang.String filePath)
        Import legend scheme from an image color palette file
        参数:
        filePath - File path
      • importFromPaletteFile_Graduated

        public void importFromPaletteFile_Graduated​(java.lang.String filePath)
        Import legend scheme from an image color palette file
        参数:
        filePath - File path
      • clone

        public java.lang.Object clone()
        Clone
        覆盖:
        clone 在类中 java.lang.Object
        返回:
        Legend scheme