类 ChartLegend

  • 直接已知子类:
    ChartColorBar

    public class ChartLegend
    extends java.lang.Object
    作者:
    Yaqiang Wang
    • 字段详细资料

      • shrink

        protected float shrink
      • aspect

        protected int aspect
      • x

        protected float x
      • y

        protected float y
      • background

        protected java.awt.Color background
      • drawBackground

        protected boolean drawBackground
      • width

        protected int width
      • height

        protected int height
      • legendWidth

        protected int legendWidth
      • legendHeight

        protected int legendHeight
      • labelLocation

        protected java.lang.String labelLocation
      • tickLabelFont

        protected java.awt.Font tickLabelFont
      • tickLabelColor

        protected java.awt.Color tickLabelColor
      • tickLabelAngle

        protected float tickLabelAngle
      • drawNeatLine

        protected boolean drawNeatLine
      • neatLineColor

        protected java.awt.Color neatLineColor
      • neatLineSize

        protected float neatLineSize
      • _vBarWidth

        protected double _vBarWidth
      • _hBarHeight

        protected double _hBarHeight
      • extendRect

        protected boolean extendRect
      • autoExtendFrac

        protected boolean autoExtendFrac
      • drawMinLabel

        protected boolean drawMinLabel
      • drawMaxLabel

        protected boolean drawMaxLabel
      • xshift

        protected float xshift
      • yshift

        protected float yshift
    • 构造器详细资料

      • ChartLegend

        public ChartLegend​(LegendScheme ls)
        Constructor
        参数:
        ls - LegendScheme
    • 方法详细资料

      • getLegendScheme

        public LegendScheme getLegendScheme()
        Get legend scheme
        返回:
        Legend scheme
      • setLegendScheme

        public void setLegendScheme​(LegendScheme value)
        Set legend scheme
        参数:
        value - Legend scheme
      • isColorbar

        public boolean isColorbar()
        Get if is color bar
        返回:
        Boolean
      • setColorbar

        public void setColorbar​(boolean value)
        Set if is color bar
        参数:
        value - Boolean
      • getPosition

        public LegendPosition getPosition()
        Get legend position
        返回:
        Legend position
      • setPosition

        public void setPosition​(LegendPosition value)
        Set legend position
        参数:
        value - Legend position
      • getShrink

        public float getShrink()
        Get shrink
        返回:
        Shrink
      • setShrink

        public void setShrink​(float value)
        Set shrink
        参数:
        value - Shrink
      • getAspect

        public int getAspect()
        Get aspect
        返回:
        Aspect
      • setAspect

        public void setAspect​(int value)
        Set aspect
        参数:
        value - Aspect
      • getX

        public float getX()
        Get X
        返回:
        X value
      • setX

        public void setX​(float value)
        Set X
        参数:
        value - X value
      • getY

        public float getY()
        Get Y
        返回:
        Y value
      • setY

        public void setY​(float value)
        Set Y
        参数:
        value - Y value
      • getWidth

        public int getWidth()
        Get width
        返回:
        Width
      • setWidth

        public void setWidth​(int value)
        Set width
        参数:
        value - Width
      • getHeight

        public int getHeight()
        Get height
        返回:
        Height
      • setHeight

        public void setHeight​(int value)
        Set height
        参数:
        value - Height
      • getLegendWidth

        public int getLegendWidth()
        Get legend width
        返回:
        Legend width
      • setLegendWidth

        public void setLegendWidth​(int value)
        Set legend width
        参数:
        value - Legend width
      • getLegendHeight

        public int getLegendHeight()
        Get legend height
        返回:
        Legend height
      • setLegendHeight

        public void setLegendHeight​(int value)
        Set legend height
        参数:
        value - Legend height
      • getPlotOrientation

        public PlotOrientation getPlotOrientation()
        Get plot orientation
        返回:
        Plot orientation
      • setPlotOrientation

        public void setPlotOrientation​(PlotOrientation value)
        Set plot orientation
        参数:
        value - Plot orientation
      • getBackground

        public java.awt.Color getBackground()
        Get background
        返回:
        Background
      • setBackground

        public void setBackground​(java.awt.Color value)
        Set background
        参数:
        value - Background
      • isDrawBackground

        public boolean isDrawBackground()
        Get if draw background
        返回:
        Boolean
      • setDrawBackground

        public void setDrawBackground​(boolean value)
        Set if draw background
        参数:
        value - Boolean
      • isDrawNeatLine

        public boolean isDrawNeatLine()
        Get if draw neat line
        返回:
        If draw neat line
      • setDrawNeatLine

        public void setDrawNeatLine​(boolean istrue)
        Set if draw neat line
        参数:
        istrue - If draw neat line
      • getNeatLineColor

        public java.awt.Color getNeatLineColor()
        Get neat line color
        返回:
        Neat line color
      • setNeatLineColor

        public void setNeatLineColor​(java.awt.Color color)
        Set neat line color
        参数:
        color - Neat line color
      • getNeatLineSize

        public float getNeatLineSize()
        Get neat line size
        返回:
        Neat line size
      • setNeatLineSize

        public void setNeatLineSize​(float size)
        Set neat line size
        参数:
        size - Neat line size
      • getBreakSpace

        public float getBreakSpace()
        Get break space
        返回:
        Break space
      • setBreakSpace

        public void setBreakSpace​(float value)
        Set break space
        参数:
        value - Break space
      • getLabel

        public ChartText getLabel()
        Get label
        返回:
        Label
      • setLabel

        public void setLabel​(ChartText value)
        Set label
        参数:
        value - Label
      • getLabelFont

        public java.awt.Font getLabelFont()
        Get label font
        返回:
        Label font
      • setLabelFont

        public void setLabelFont​(java.awt.Font value)
        Set label font
        参数:
        value - Label font
      • getLabelColor

        public java.awt.Color getLabelColor()
        Get label color
        返回:
        Label color
      • setLabelColor

        public void setLabelColor​(java.awt.Color value)
        Set label color
        参数:
        value - Label color
      • getLabelLocation

        public java.lang.String getLabelLocation()
        Get label location (in, out, top, bottom, left, right)
        返回:
        Label location
      • setLabelLocation

        public void setLabelLocation​(java.lang.String value)
        Set label location
        参数:
        value - Label location
      • getTickLabelFont

        public java.awt.Font getTickLabelFont()
        Get Tick label font
        返回:
        The Tick label font
      • setTickLabelFont

        public void setTickLabelFont​(java.awt.Font font)
        Set Tick label font
        参数:
        font - The Tick label font
      • getTickLabelColor

        public java.awt.Color getTickLabelColor()
        Get tick label color
        返回:
        Tick label color
      • setTickLabelColor

        public void setTickLabelColor​(java.awt.Color value)
        Set tick label color
        参数:
        value - Tick label color
      • getTickLabelAngle

        public float getTickLabelAngle()
        Get tick lable angle
        返回:
        Tick label angle
      • setTickLabelAngle

        public void setTickLabelAngle​(float value)
        Set tick label angle
        参数:
        value - Tick label angle
      • getColumnNumber

        public int getColumnNumber()
        Get column number
        返回:
        Column number
      • setColumnNumber

        public void setColumnNumber​(int value)
        Set column number
        参数:
        value - Column number
      • isAutoRowColNum

        public boolean isAutoRowColNum()
        Get if automatic set row/col number
        返回:
        Boolean
      • setAutoRowColNum

        public void setAutoRowColNum​(boolean value)
        Set if automatic set row/col number
        参数:
        value - Boolean
      • getSymbolDimension

        public java.awt.Dimension getSymbolDimension()
        Get symbol dimension
        返回:
        Symbol dimension
      • setSymbolDimension

        public void setSymbolDimension​(java.awt.Dimension value)
        Set symbol dimension
        参数:
        value - Symbol dimension
      • setSymbolWidth

        public void setSymbolWidth​(int value)
        Set symbol width
        参数:
        value - Width
      • setSymbolHeight

        public void setSymbolHeight​(int value)
        Set symbol height
        参数:
        value - height
      • setSymbolScale

        public void setSymbolScale​(float value)
        Set symbol scale
        参数:
        value - Symble scale
      • isExtendRect

        public boolean isExtendRect()
        Get if extend rectangle - or triangle
        返回:
        Boolean
      • setExtendRect

        public void setExtendRect​(boolean value)
        Set if extend rectangle - or triangle
        参数:
        value - Boolean
      • isAutoExtendFrac

        public boolean isAutoExtendFrac()
        Get if auto set extend fraction - extend has save width and height Only valid for colorbar
        返回:
        Boolean
      • setAutoExtendFrac

        public void setAutoExtendFrac​(boolean value)
        Set if auto set extend fraction - extend has save width and height Only valid for colorbar
        参数:
        value -
      • setTickCaptions

        public void setTickCaptions​(java.util.List<java.lang.String> value)
        Set tick labels
        参数:
        value - Tick labels
      • isDrawMinLabel

        public boolean isDrawMinLabel()
        Get if draw minimum value label
        返回:
        Boolean
      • setDrawMinLabel

        public void setDrawMinLabel​(boolean value)
        Set if draw minimum value label
        参数:
        value - Boolean
      • isDrawMaxLabel

        public boolean isDrawMaxLabel()
        Get if draw maximum value label
        返回:
        Boolean
      • setDrawMaxLabel

        public void setDrawMaxLabel​(boolean value)
        Set if draw maximum value label
        参数:
        value - Boolean
      • getXShift

        public float getXShift()
        Get x shift - pixel unit
        返回:
        X shift
      • setXShift

        public void setXShift​(float value)
        Set x shift
        参数:
        value - X shift
      • getYShift

        public float getYShift()
        Get y shift - pixel unit
        返回:
        Y shift
      • setYShift

        public void setYShift​(float value)
        Set y shift
        参数:
        value - Y shift
      • draw

        public void draw​(java.awt.Graphics2D g,
                         PointF point)
        Draw legend
        参数:
        g - Graphics2D
        point - Start point
      • getLegendDimension

        public java.awt.Dimension getLegendDimension​(java.awt.Graphics2D g,
                                                     java.awt.Dimension limitDim)
        Get legend dimension
        参数:
        g - Graphics2D
        limitDim - Limit dimension
        返回:
        Legend dimension
      • getTickWidth

        protected int getTickWidth​(java.awt.Graphics2D g)
      • getTickHeight

        protected int getTickHeight​(java.awt.Graphics2D g)
      • getTickGap

        protected int getTickGap​(java.awt.Graphics2D g)
        Update tick gap
        参数:
        g - Graphics2D
        返回:
        Ticks gap