Class IntensityChart


  • public class IntensityChart
    extends javax.swing.plaf.PanelUI
    A general class for plotting data in the form of (x, y) pairs. This plot can use data from any class that implements the XYDataset interface.

    XYPlot makes use of an XYItemRenderer to draw each point on the plot. By using different renderers, various chart types can be produced.

    The ChartFactory class contains static methods for creating pre-configured charts.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.awt.Stroke DEFAULT_STROKE
      The default grid line stroke.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)
      Returns the specified component's preferred size appropriate for the look and feel.
      void paint​(java.awt.Graphics g, javax.swing.JComponent c)
      Paints the specified component appropriately for the look and feel.
      void setData​(int[][] data, int max, java.awt.Color[] colorMap, double dataAreaXOffset)  
      void setLines​(int... lines)  
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installUI, uninstallUI, update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_STROKE

        public static final java.awt.Stroke DEFAULT_STROKE
        The default grid line stroke.
    • Constructor Detail

      • IntensityChart

        public IntensityChart​(DottedChart chart,
                              int height,
                              int width)
    • Method Detail

      • setData

        public void setData​(int[][] data,
                            int max,
                            java.awt.Color[] colorMap,
                            double dataAreaXOffset)
      • setLines

        public void setLines​(int... lines)
      • getPreferredSize

        public java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)
        Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.
        Overrides:
        getPreferredSize in class javax.swing.plaf.ComponentUI
        Parameters:
        c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
        See Also:
        JComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)
      • paint

        public void paint​(java.awt.Graphics g,
                          javax.swing.JComponent c)
        Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.
        Overrides:
        paint in class javax.swing.plaf.ComponentUI
        Parameters:
        g - the Graphics context in which to paint
        c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
        See Also:
        ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)