Documentation of 'sgtplot.swing.JPlotLayout' Java class
JPlotLayout
sgtplot.swing

Class JPlotLayout

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.BaselineResizeBehavior
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int GRID 
      static int LINE 
      static int POINTS 
      static int VECTOR 
      • Fields inherited from class javax.swing.JLayeredPane

        DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
      • Fields inherited from class javax.swing.JComponent

        TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.print.Printable

        NO_SUCH_PAGE, PAGE_EXISTS
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor and Description
      JPlotLayout(boolean isGrid, boolean isPoints, boolean isXTime, boolean isYTime, java.lang.String id, java.awt.Image img, boolean is_key_pane)
      JPlotLayout constructor.
      JPlotLayout(boolean isGrid, boolean isXTime, boolean isYTime, java.lang.String id, java.awt.Image img, boolean is_key_pane)
      JPlotLayout constructor.
      JPlotLayout(int type, boolean isXTime, boolean isYTime, java.lang.String id, java.awt.Image img, boolean is_key_pane)
      JPlotLayout constructor.
      JPlotLayout(SGTData dataset)
      Default constructor.
      JPlotLayout(SGTData dataset, java.lang.String id, java.awt.Image img, boolean is_key_pane)
      JPlotLayout constructor.
    • Constructor Detail

      • JPlotLayout

        public JPlotLayout(SGTData dataset)
        Default constructor. No Logo image is used and the LineKey will be in the same JPane.
      • JPlotLayout

        public JPlotLayout(SGTData dataset,
                           java.lang.String id,
                           java.awt.Image img,
                           boolean is_key_pane)
        JPlotLayout constructor. Whether the data is GRID, POINTS, LINE, or VECTOR, isXtime, and isYTime is determined from the dataset.
        Parameters:
        dataset - the template data
        id - identifier
        img - Logo image
        is_key_pane - if true LineKey is in separate pane
      • JPlotLayout

        public JPlotLayout(boolean isGrid,
                           boolean isXTime,
                           boolean isYTime,
                           java.lang.String id,
                           java.awt.Image img,
                           boolean is_key_pane)
        JPlotLayout constructor. This constructor is retained for backward compatability.
        Parameters:
        isGrid - if true data is grid
        isXtime - if true x coordinate is time
        isYTime - if true y coordinate is time
        id - identifier
        img - Logo image
        is_key_pane - if true LineKey is in separate pane
      • JPlotLayout

        public JPlotLayout(boolean isGrid,
                           boolean isPoints,
                           boolean isXTime,
                           boolean isYTime,
                           java.lang.String id,
                           java.awt.Image img,
                           boolean is_key_pane)
        JPlotLayout constructor. All other constructors call this one. Data is not plotted during construction of the JPlotLayout object and the addData method must be called to associated data with this object.
        Parameters:
        isGrid - if true data is grid
        isPoints - if true data is points
        isXtime - if true x coordinate is time
        isYTime - if true y coordinate is time
        id - identifier
        img - Logo image
        is_key_pane - if true LineKey is in separate pane
      • JPlotLayout

        public JPlotLayout(int type,
                           boolean isXTime,
                           boolean isYTime,
                           java.lang.String id,
                           java.awt.Image img,
                           boolean is_key_pane)
        JPlotLayout constructor. All other constructors call this one. Data is not plotted during construction of the JPlotLayout object and the addData method must be called to associated data with this object.
        Parameters:
        type - type of plot , POINT, GRID, LINE, or VECTOR
        isXtime - if true x coordinate is time
        isYTime - if true y coordinate is time
        id - identifier
        img - Logo image
        is_key_pane - if true LineKey is in separate pane
    • Method Detail

      • addData

        public void addData(Collection lines)
        Add a Collection of lines using the default attributes and description. The description will be taken from the dependent variable name
      • addData

        public void addData(Collection lines,
                            Attribute attr)
        Add a Collection of lines using the default description. The description will be taken from the dependent variable name
      • addData

        public void addData(PointCollection points,
                            java.lang.String descrip)
        Add a PointCollection.
      • addData

        public void addData(Collection lines,
                            java.lang.String descrip)
        Add a Collection of lines using the default attributes.
      • addData

        public void addData(Collection lines,
                            Attribute attr,
                            java.lang.String descrip)
        Add a Collecdtion of lines.
      • addData

        public void addData(SGTData datum)
        Add data to the layout. LineKey descriptor will be taken from the dependent variable name.
        Overrides:
        addData in class JGraphicLayout
        Parameters:
        data - datum data to be added
      • addData

        public void addData(SGTData datum,
                            Attribute attr)
        Add data to the layout. LineKey descriptor will be taken from the dependent variable name.
        Parameters:
        data - datum data to be added
        attr - attribute for graphics
      • addData

        public void addData(SGTData datum,
                            java.lang.String descrip)
        Add data to the layout. JPlotLayout will use a default attribute.
        Specified by:
        addData in class JGraphicLayout
      • addData

        public void addData(SGTData datum,
                            Attribute attr,
                            java.lang.String descrip)
        Add data to the layout. Data will be added to X axis and Z_AXIS will be assigned to Y axis. If this is not the first invocation of addData a new Layer will be created. If overlayed, the Transforms from the first Layer will be attached and no axes will be created. If not overlayed, new transforms and axes will be created and adjusted so that the data is horizontally stacked.
        Parameters:
        datum - data to be added
        descrip - LineKey description for datum
      • setRange

        public void setRange(SoTDomain std)
                      throws java.beans.PropertyVetoException
        Set the x and y range of the domain.
        Parameters:
        reversed - the y axis data is reversed
        Throws:
        java.beans.PropertyVetoException
      • setRange

        public void setRange(Domain domain)
                      throws java.beans.PropertyVetoException
        Set the x and y range of the domain.
        Property Change: domainRange.
        Specified by:
        setRange in class JGraphicLayout
        Parameters:
        reversed - y axis data is reversed
        Throws:
        java.beans.PropertyVetoException
      • setRangeNoVeto

        public void setRangeNoVeto(Domain domain)
        Set the x and y range of the domain.
      • setXRange

        public void setXRange(Range2D rnge)
        Reset the x range. This method is designed to provide zooming functionality.
        Parameters:
        rnge - new x range
      • setYRange

        public void setYRange(Range2D rnge)
        Reset the y range. This method is designed to provide zooming functionality.
        Parameters:
        rnge - new y range
      • getData

        public SGTData getData(java.lang.String data_id)
        Find a dataset from the data's id.
        Parameters:
        data_id - the id
        Returns:
        SGTData
      • getData

        public SGTData getData(CartesianRenderer rend)
        Find a dataset from the renderer.
        Parameters:
        rend - the renderer
        Returns:
        SGTData
      • clear

        public void clear()
        Remove all data from the JPlotLayout
      • clear

        public void clear(java.lang.String data_id)
        Remove a specific dataset from the JPlotLayout
        Parameters:
        data_id - the data id
      • getLayerSizeP

        public Dimension2D getLayerSizeP()
        Get the JPlotLayout layer size in physical coordinates.
      • setAxesOriginP

        public void setAxesOriginP(Point2D.Double pt)
        Set the axes origin in physical units
      • getGraphDomain

        public SoTDomain getGraphDomain()
        Since:
        3.0
      • setLayerSizeP

        public void setLayerSizeP(Dimension2D d)
        Set the layer size in physical units
      • setTitleHeightP

        public void setTitleHeightP(double main,
                                    double second)
        Set the main and secondary label heights in physical units
        Parameters:
        main - main label height
        second - second and third label height
      • getMainTitleHeightP

        public double getMainTitleHeightP()
        Get main label height in physical units
      • getSecondaryTitleHeightP

        public double getSecondaryTitleHeightP()
        Get second and third label heights in physical units
      • setKeyAlignment

        public void setKeyAlignment(int vert,
                                    int horz)
        Set the key alignment
        Parameters:
        vert - vertical alignment
        horz - horizontal alignment
        See Also:
        ColorKey, LineKey, PointCollectionKey
      • getColorBar

        public ColorKey getColorBar()
      • setColorBar

        public void setColorBar(ColorKey colorKey_)
      • getKeyPositionP

        public Point2D.Double getKeyPositionP()
        Get the key position in physical units
      • setKeyLocationP

        public void setKeyLocationP(Point2D.Double loc)
        Set the key position in physical units
      • propertyChange

        public void propertyChange(java.beans.PropertyChangeEvent evt)
        Used by JPlotLayout to listen for changes in line, grid, vector, and point attributes.
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • setCoastLine

        public void setCoastLine(SGTLine coast)
        Set the coastline.
      • print

        public int print(org.freehep.graphics2d.VectorGraphics g2,
                         java.awt.print.PageFormat pf,
                         int pageIndex)
        Implements the print method in java.awt.print.Printable. Overrides JPane behavior.
      • setXAutoRange

        public void setXAutoRange(boolean xauto)
        Turn on/off the auto range feature for the x axis. Auto range creates a "nice" range with a delta of 1., 2., 5. or 10^n of these. The start and end of the range is extended to the next full delta.
      • setYAutoRange

        public void setYAutoRange(boolean yauto)
        Turn on/off the auto range feature for the y axis. Auto range creates a "nice" range with a delta of 1., 2., 5. or 10^n of these. The start and end of the range is extended to the next full delta.
      • setAutoRange

        public void setAutoRange(boolean xauto,
                                 boolean yauto)
        Turn on/off the auto range feature for the x and y axes. Auto range creates a "nice" range with a delta of 1., 2., 5. or 10^n of these. The start and end of the range is extended to the next full delta.
      • getAxis

        public Axis getAxis(int i)
      • setAxis

        public void setAxis(int i,
                            Axis axis)
      • isXAutoRange

        public boolean isXAutoRange()
        Tests if the auto range feature is enabled for the x axis.
      • isYAutoRange

        public boolean isYAutoRange()
        Tests if the auto range feature is enabled for the y axis.
      • setXAutoIntervals

        public void setXAutoIntervals(int xint)
        Set the approximate number of x axis intervals for auto range.
      • setYAutoIntervals

        public void setYAutoIntervals(int yint)
        Set the approximate number of y axis intervals for auto range.
      • setAutoIntervals

        public void setAutoIntervals(int xint,
                                     int yint)
        Set the approximate number of x and y axes intervals for auto range.
      • getXAutoIntervals

        public int getXAutoIntervals()
        Return the number of intervals for the x axis.
      • getYAutoIntervals

        public int getYAutoIntervals()
        Return the number of intervals for the y axis.
      • init

        public void init()
        Override JPane init method. The scrolling list parameters are computed here if necessary.
        Specified by:
        init in interface AbstractPane
        Overrides:
        init in class JPane

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.