public class IntensityChart
extends javax.swing.plaf.PanelUI
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.
Modifier and Type | Field and Description |
---|---|
static java.awt.Stroke |
DEFAULT_STROKE
The default grid line stroke.
|
Constructor and Description |
---|
IntensityChart(DottedChart chart,
int height,
int width) |
Modifier and Type | Method and 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) |
public static final java.awt.Stroke DEFAULT_STROKE
public IntensityChart(DottedChart chart, int height, int width)
public void setData(int[][] data, int max, java.awt.Color[] colorMap, double dataAreaXOffset)
public void setLines(int... lines)
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
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
.getPreferredSize
in class javax.swing.plaf.ComponentUI
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 componentsJComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
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.paint
in class javax.swing.plaf.ComponentUI
g
- the Graphics
context in which to paintc
- the component being painted; this argument is often ignored,
but might be used if the UI object is stateless and shared by
multiple componentsComponentUI.update(java.awt.Graphics, javax.swing.JComponent)