Documentation of 'sgtplot.beans.Legend' Java class
Legend
sgtplot.beans

Class Legend

  • All Implemented Interfaces:
    java.io.Serializable


    public class Legend
    extends java.lang.Object
    implements java.io.Serializable
    Encapsulates reference to SGTData and key.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • Legend

        public Legend()
        Default constructor. Legend id and bounds set to null.
      • Legend

        public Legend(java.lang.String id,
                      Rectangle2D.Double boundsP)
        Legend constructor.
        Parameters:
        id - legend identifier
        boundsP - bounds in physical units
    • Method Detail

      • setId

        public void setId(java.lang.String id)
        Set legend identifier.
        Parameters:
        id - identifier
      • getId

        public java.lang.String getId()
        Get legend identifier
        Returns:
        ident
      • setBoundsP

        public void setBoundsP(Rectangle2D.Double boundsP)
        Set legend bounds.
        Parameters:
        boundsP - bounds in physical coordinates
      • setLocationP

        public void setLocationP(Point2D.Double locationP)
        Set the location of the TOP-LEFT corner
        Parameters:
        locationP - upper left corner in physical coordinates
      • getLocationP

        public Point2D.Double getLocationP()
        Get the location of the upper left corner.
        Returns:
        upper left corner
      • setHeightP

        public void setHeightP(double heightP)
        Set legend height.
        Parameters:
        heightP - height on physical coordinates
      • getHeightP

        public double getHeightP()
        Get legend height.
        Returns:
        height
      • setWidthP

        public void setWidthP(double widthP)
        Set legend width
        Parameters:
        widthP - width in physcial coordinates
      • getWidthP

        public double getWidthP()
        Get legend width
        Returns:
        width
      • removeChangeListener

        public void removeChangeListener(javax.swing.event.ChangeListener l)
        Remove change listener.
        Parameters:
        l - change listener
      • addChangeListener

        public void addChangeListener(javax.swing.event.ChangeListener l)
        Add change listener.
        Parameters:
        l - change listener
      • removeDesignChangeListeners

        public void removeDesignChangeListeners()
        Remove change listeners that implement DesignListener.
      • removeAllChangeListeners

        public void removeAllChangeListeners()
        Remove all change listeners.
      • setVisible

        public void setVisible(boolean visible)
        Set visibility for legend.
        Parameters:
        visible - visibility state
      • isVisible

        public boolean isVisible()
        Test if legend visible.
        Returns:
        true, if legend is visible
      • setInstantiated

        public void setInstantiated(boolean instantiated)
        Set legend state to instatiated. This is called internally when the property Key has been instatiated.
        Parameters:
        instantiated - instatiation state
      • isInstantiated

        public boolean isInstantiated()
        Test if the key instantiated.
        Returns:
        true, if key has been instantiated
      • isColor

        public boolean isColor()
        Test if legend of type COLOR.
        Returns:
        true, if legend is COLOR
      • getType

        public int getType()
        Get legend type.
        Returns:
        legend type.
      • setType

        public void setType(int type)
        Set legend type. Types include COLOR, LINE, POINT, and VECTOR.
        Parameters:
        type - legend type
      • getBorderStyle

        public int getBorderStyle()
        Get legend border style.
        Returns:
        border style
      • setBorderStyle

        public void setBorderStyle(int borderStyle)
        Set legend border style. Border styles include: PLAIN_LINE, RAISED, and NO_BORDER. Default = NO_BORDER.
        Parameters:
        borderStyle - border style
      • getColumns

        public int getColumns()
        Get number of columns. Not used with COLOR legends.
        Returns:
        number of columns
      • setColumns

        public void setColumns(int columns)
        Set number of columns. Not used with COLOR legends. Default = 1.
        Parameters:
        columns - number of columns
      • getLineLength

        public double getLineLength()
        Get the legend line, or vector length in physical coordinages. Not used with COLOR legends.
        Returns:
        line or vector length
      • setLineLength

        public void setLineLength(double lineLength)
        Set the legend line or vector lenght in physical units. Not used with COLOR legends. Defautl = 0.3
        Parameters:
        lineLength - line or vector length
      • getScaleColor

        public java.awt.Color getScaleColor()
        Get COLOR legend scale color. Only used with COLOR legends.
        Returns:
        scale color
      • setScaleColor

        public void setScaleColor(java.awt.Color scaleColor)
        Set COLOR legend scale color. Only used with COLOR legends. Deault = black.
        Parameters:
        scaleColor - scale color
      • getScaleLabelFont

        public java.awt.Font getScaleLabelFont()
        Get COLOR legend scale font. Only used with COLOR legends.
        Returns:
        scale font
      • setScaleLabelFont

        public void setScaleLabelFont(java.awt.Font scaleLabelFont)
        Set COLOR legend scale font. Only used with COLOR legends. Deault = ("Helvetica", PLAIN, 10).
        Parameters:
        scaleLabelFont - scale font
      • getScaleLabelHeightP

        public double getScaleLabelHeightP()
        Get COLOR legend scale label height in physical coordinates. Only used with COLOR legends.
        Returns:
        scale label height
      • setScaleLabelHeightP

        public void setScaleLabelHeightP(double scaleLabelHeightP)
        Set COLOR legend scale label heigth. Only used with COLOR legends. Deault = 0.2.
        Parameters:
        scaleLabelHeightP - scale label height
      • getScaleLabelInterval

        public int getScaleLabelInterval()
        Get COLOR legend scale label interval. Only used with COLOR legends.
        Returns:
        scale label interval
      • setScaleLabelInterval

        public void setScaleLabelInterval(int scaleLabelInterval)
        Set COLOR legend scale label interval. Only used with COLOR legends. Deault = 2.
        Parameters:
        scaleLabelInterval - scale label interval
      • getScaleNumberSmallTics

        public int getScaleNumberSmallTics()
        Get COLOR legend scale number of small tics. Only used with COLOR legends.
        Returns:
        scale number of small tics
      • setScaleNumberSmallTics

        public void setScaleNumberSmallTics(int scaleNumberSmallTics)
        Set COLOR legend scale number of small tics. Only used with COLOR legends. Deault = 0.
        Parameters:
        scaleNumberSmallTics - scale number of small tics
      • getScaleLabelFormat

        public java.lang.String getScaleLabelFormat()
        Get COLOR legend scale label format. Only used with COLOR legends.
        Returns:
        scale label format
      • setScaleLabelFormat

        public void setScaleLabelFormat(java.lang.String scaleLabelFormat)
        Set COLOR legend scale label format. Only used with COLOR legends. Deault = "".
        Parameters:
        scaleLabelFormat - scale label format
      • getScaleLargeTicHeightP

        public double getScaleLargeTicHeightP()
        Get COLOR legend scale large tick height. Only used with COLOR legends.
        Returns:
        scale large tick height
      • setScaleLargeTicHeightP

        public void setScaleLargeTicHeightP(double scaleLargeTicHeightP)
        Set COLOR legend scale large tick height in physical coordinates. Only used with COLOR legends. Deault = 0.1.
        Parameters:
        scaleLargeTicHeightP - scale large tick height
      • getScaleSignificantDigits

        public int getScaleSignificantDigits()
        Get COLOR legend scale significant digits. Only used with COLOR legends.
        Returns:
        scale significant digits
      • setScaleSignificantDigits

        public void setScaleSignificantDigits(int scaleSignificantDigits)
        Set COLOR legend scale significant digits. Only used with COLOR legends. Deault = 2.
        Parameters:
        scaleSignificantDigits - scale significant digits
      • getScaleSmallTicHeightP

        public double getScaleSmallTicHeightP()
        Get COLOR legend scale small tick height. Only used with COLOR legends.
        Returns:
        scale small tick height
      • setScaleSmallTicHeightP

        public void setScaleSmallTicHeightP(double scaleSmallTicHeightP)
        Set COLOR legend scale small tick height in physical coordinates. Only used with COLOR legends. Deault = 0.05.
        Parameters:
        scaleSmallTicHeightP - scale small tick height
      • isScaleVisible

        public boolean isScaleVisible()
        Test if COLOR legend scale visible. Only used with COLOR legends.
        Returns:
        true, if scale visible
      • setScaleVisible

        public void setScaleVisible(boolean scaleVisible)
        Set COLOR legend scale visible. Only used with COLOR legends. Deault = true.
        Parameters:
        scaleVisible - scale visible
      • getPanelHolder

        public PanelHolder getPanelHolder()
        Get PanelHolder parent.
        Returns:
        panelholder
      • setPanelHolder

        public void setPanelHolder(PanelHolder pHolder)
        Set PanelHolder parent.
        Parameters:
        pHolder - panelholder
      • getKeyLabelHeightP

        public double getKeyLabelHeightP()
        Get key label height.
        Returns:
        key label height
      • setKeyLabelHeightP

        public void setKeyLabelHeightP(double keyLabelHeightP)
        Set key label height in physical coordinates. Default = 0.16.
        Parameters:
        keyLabelHeightP - key label height

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.