public class DottedChart
extends org.jfree.chart.plot.Plot
implements org.jfree.chart.plot.ValueAxisPlot, org.jfree.chart.plot.Pannable, org.jfree.chart.plot.Zoomable, org.jfree.chart.LegendItemSource
Modifier and Type | Class and Description |
---|---|
static class |
DottedChart.AttributeType |
static class |
DottedChart.DottedChartException |
Modifier and Type | Field and Description |
---|---|
protected static java.text.DateFormat |
DATEFORMATABS |
protected static java.text.DateFormat |
DATEFORMATREL |
static java.awt.Paint |
DEFAULT_GRIDLINE_PAINT
The default grid line paint.
|
static java.awt.Stroke |
DEFAULT_GRIDLINE_STROKE
The default grid line stroke.
|
static java.awt.Stroke |
DEFAULT_LINE_STROKE
The default outline stroke.
|
Constructor and Description |
---|
DottedChart(LogView log,
Attribute xAttribute,
Attribute yAttribute,
Attribute colorAttribute,
Attribute shapeAttribute) |
Modifier and Type | Method and Description |
---|---|
void |
addEventFilter(EventFilter eventFilter,
boolean signalChange) |
void |
applyEventFilters(boolean signalChange) |
protected org.jfree.chart.axis.AxisSpace |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea) |
protected org.jfree.chart.axis.AxisSpace |
calculateDomainAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
org.jfree.chart.axis.AxisSpace space)
Calculates the space required for the domain axis/axes.
|
protected org.jfree.chart.axis.AxisSpace |
calculateRangeAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
org.jfree.chart.axis.AxisSpace space)
Calculates the space required for the range axis/axes.
|
void |
connectSameEvents(boolean connectSameEventFlag,
boolean signalChange) |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
java.awt.geom.Point2D anchor,
org.jfree.chart.plot.PlotState parentState,
org.jfree.chart.plot.PlotRenderingInfo info)
Draws the fast scatter plot on a Java 2D graphics device (such as the
screen or a printer).
|
protected void |
drawDomainGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the gridlines for the plot, if they are visible.
|
protected void |
drawRangeGridlines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
java.util.List ticks)
Draws the gridlines for the plot, if they are visible.
|
boolean |
equals(java.lang.Object obj)
Tests an arbitrary object for equality with this plot.
|
LightLog |
exportViewToLightLog(boolean visibleOnly,
java.lang.String name) |
org.deckfour.xes.model.XLog |
exportViewToXLog(boolean visibleOnly,
java.lang.String name) |
void |
fireChangeEvent()
fire change event
added by Guangming on June 21, 2018
|
Attribute |
getAttribute(DottedChart.AttributeType type) |
static java.awt.Color |
getColor(float x) |
Attribute |
getColorAttribute() |
java.util.Map<java.lang.String,java.awt.Color> |
getColorMap() |
org.jfree.data.Range |
getDataRange(org.jfree.chart.axis.ValueAxis axis)
Returns the range of data values to be plotted along the axis, or
null if the specified axis isn't the domain axis or the
range axis for the plot. |
double |
getDefaultSize() |
org.jfree.chart.axis.ValueAxis |
getDomainAxis()
Returns the domain axis for the plot.
|
java.awt.Paint |
getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain
axis.
|
java.awt.Stroke |
getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the domain
axis.
|
double |
getDotScale() |
java.lang.String |
getEventClass(DataManager<?> manager,
int e) |
org.jfree.chart.LegendItemCollection |
getLegendItems() |
LogView |
getLogView() |
org.jfree.chart.plot.PlotOrientation |
getOrientation()
Returns the orientation of the plot.
|
java.lang.String |
getPercentageRendered() |
java.lang.String |
getPlotType()
Returns a short string describing the plot type.
|
org.jfree.chart.axis.ValueAxis |
getRangeAxis()
Returns the range axis for the plot.
|
java.awt.Paint |
getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range
axis.
|
java.awt.Stroke |
getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range
axis.
|
java.lang.String |
getRenderTime() |
Attribute |
getShapeAttribute() |
java.lang.String |
getToolTipForScreenLocation(org.jfree.chart.ChartPanel panel,
java.awt.event.MouseEvent event) |
Attribute |
getXAxisAttribute() |
Attribute |
getYAxisAttribute() |
boolean |
isDomainGridlinesVisible()
Returns
true if the domain gridlines are visible, and
false otherwise. |
boolean |
isDomainPannable()
Returns
true if panning is enabled for the domain axes, and
false otherwise. |
boolean |
isDomainZoomable()
Returns
true . |
boolean |
isRangeGridlinesVisible()
Returns
true if the range axis grid is visible, and
false otherwise. |
boolean |
isRangePannable()
Returns
true if panning is enabled for the range axes, and
false otherwise. |
boolean |
isRangeZoomable()
Returns
true . |
boolean |
isXAxisContinuous() |
boolean |
isYAxisContinuous() |
void |
panDomainAxes(double percent,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Pans the domain axes by the specified percentage.
|
void |
panRangeAxes(double percent,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Pans the range axes by the specified percentage.
|
void |
removeEventFilter(EventFilter eventFilter,
boolean signalChange) |
void |
render(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.chart.plot.PlotRenderingInfo info,
org.jfree.chart.plot.CrosshairState crosshairState)
Draws a representation of the data within the dataArea region.
|
protected void |
renderShape(java.awt.Graphics2D g2,
double halfDotSize,
int transX,
int transY,
byte shape) |
void |
setAttribute(DottedChart.AttributeType type,
Attribute attribute,
boolean signalChange) |
void |
setColorAttribute(Attribute colorAttribute,
boolean signalChange) |
void |
setDefaultSize(double size) |
void |
setDomainAxis(org.jfree.chart.axis.ValueAxis axis)
Sets the domain axis and sends a
PlotChangeEvent to all
registered listeners. |
void |
setDomainGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the domain axis and
sends a
PlotChangeEvent to all registered listeners. |
void |
setDomainGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis and
sends a
PlotChangeEvent to all registered listeners. |
void |
setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are
visible.
|
void |
setDomainPannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along the
domain axes.
|
void |
setDotScale(double scale,
boolean signalChange) |
void |
setIntensityPanel(javax.swing.JPanel intensityPanel,
IntensityChart intensityChart) |
void |
setLinesOn(boolean lines,
boolean signalChange) |
void |
setRangeAxis(org.jfree.chart.axis.ValueAxis axis)
Sets the range axis and sends a
PlotChangeEvent to all registered
listeners. |
void |
setRangeGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the range axis and
sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis and
sends a
PlotChangeEvent to all registered listeners. |
void |
setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis grid lines are
visible.
|
void |
setRangePannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along the
range axes.
|
void |
setShapeAttribute(Attribute shapeAttribute,
boolean signalChange) |
void |
setXAxisAttribute(Attribute attribute,
boolean signalChange) |
void |
setYAxisAttribute(Attribute attribute,
boolean signalChange) |
void |
zoomDomainAxes(double lowerPercent,
double upperPercent,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Zooms in on the domain axes.
|
void |
zoomDomainAxes(double factor,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
/** Multiplies the range on the domain axis by the specified factor.
|
void |
zoomDomainAxes(double factor,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source,
boolean useAnchor)
Multiplies the range on the domain axis by the specified factor.
|
void |
zoomRangeAxes(double lowerPercent,
double upperPercent,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Zooms in on the range axes.
|
void |
zoomRangeAxes(double factor,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
|
void |
zoomRangeAxes(double factor,
org.jfree.chart.plot.PlotRenderingInfo info,
java.awt.geom.Point2D source,
boolean useAnchor)
Multiplies the range on the range axis by the specified factor.
|
addChangeListener, annotationChanged, axisChanged, clone, createAndAddEntity, datasetChanged, drawBackground, drawBackgroundImage, drawNoDataMessage, drawOutline, fillBackground, fillBackground, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, handleClick, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
protected static final java.text.DateFormat DATEFORMATABS
protected static final java.text.DateFormat DATEFORMATREL
public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
public static final java.awt.Stroke DEFAULT_LINE_STROKE
public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
public DottedChart(LogView log, Attribute xAttribute, Attribute yAttribute, Attribute colorAttribute, Attribute shapeAttribute) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public void setXAxisAttribute(Attribute attribute, boolean signalChange) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public void setYAxisAttribute(Attribute attribute, boolean signalChange) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public void addEventFilter(EventFilter eventFilter, boolean signalChange)
public void removeEventFilter(EventFilter eventFilter, boolean signalChange)
public void applyEventFilters(boolean signalChange)
public void setColorAttribute(Attribute colorAttribute, boolean signalChange) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public static java.awt.Color getColor(float x)
public void setShapeAttribute(Attribute shapeAttribute, boolean signalChange) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public java.lang.String getPlotType()
getPlotType
in class org.jfree.chart.plot.Plot
public org.jfree.chart.plot.PlotOrientation getOrientation()
getOrientation
in interface org.jfree.chart.plot.Pannable
getOrientation
in interface org.jfree.chart.plot.Zoomable
PlotOrientation.VERTICAL
).public org.jfree.chart.axis.ValueAxis getDomainAxis()
null
).setDomainAxis(ValueAxis)
public void setDomainAxis(org.jfree.chart.axis.ValueAxis axis)
PlotChangeEvent
to all
registered listeners.axis
- the axis (null
not permitted).getDomainAxis()
public org.jfree.chart.axis.ValueAxis getRangeAxis()
null
).setRangeAxis(ValueAxis)
public void setRangeAxis(org.jfree.chart.axis.ValueAxis axis)
PlotChangeEvent
to all registered
listeners.axis
- the axis (null
not permitted).getRangeAxis()
public boolean isDomainGridlinesVisible()
true
if the domain gridlines are visible, and
false
otherwise.true
or false
.setDomainGridlinesVisible(boolean)
,
setDomainGridlinePaint(Paint)
public void setDomainGridlinesVisible(boolean visible)
PlotChangeEvent
is sent
to all registered listeners.visible
- the new value of the flag.getDomainGridlinePaint()
public java.awt.Stroke getDomainGridlineStroke()
null
).setDomainGridlineStroke(Stroke)
public void setDomainGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getDomainGridlineStroke()
public java.awt.Paint getDomainGridlinePaint()
null
).setDomainGridlinePaint(Paint)
public void setDomainGridlinePaint(java.awt.Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getDomainGridlinePaint()
public boolean isRangeGridlinesVisible()
true
if the range axis grid is visible, and
false
otherwise.true
or false
.setRangeGridlinesVisible(boolean)
public void setRangeGridlinesVisible(boolean visible)
PlotChangeEvent
is sent
to all registered listeners.visible
- the new value of the flag.isRangeGridlinesVisible()
public java.awt.Stroke getRangeGridlineStroke()
null
).setRangeGridlineStroke(Stroke)
public void setRangeGridlineStroke(java.awt.Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
permitted).getRangeGridlineStroke()
public java.awt.Paint getRangeGridlinePaint()
null
).setRangeGridlinePaint(Paint)
public void setRangeGridlinePaint(java.awt.Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRangeGridlinePaint()
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.awt.geom.Point2D anchor, org.jfree.chart.plot.PlotState parentState, org.jfree.chart.plot.PlotRenderingInfo info)
draw
in class org.jfree.chart.plot.Plot
g2
- the graphics device.area
- the area within which the plot (including axis labels) should
be drawn.anchor
- the anchor point (null
permitted).parentState
- the state from the parent plot (ignored).info
- collects chart drawing information (null
permitted).protected org.jfree.chart.axis.AxisSpace calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea)
protected org.jfree.chart.axis.AxisSpace calculateDomainAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).protected org.jfree.chart.axis.AxisSpace calculateRangeAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, org.jfree.chart.axis.AxisSpace space)
g2
- the graphics device.plotArea
- the plot area.space
- a carrier for the result (null
permitted).public void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.plot.PlotRenderingInfo info, org.jfree.chart.plot.CrosshairState crosshairState)
info
and crosshairState
arguments may be
null
.g2
- the graphics device.dataArea
- the region in which the data is to be drawn.info
- an optional object for collection dimension information.crosshairState
- collects crosshair information (null
permitted).public void setLinesOn(boolean lines, boolean signalChange)
public void connectSameEvents(boolean connectSameEventFlag, boolean signalChange)
protected void renderShape(java.awt.Graphics2D g2, double halfDotSize, int transX, int transY, byte shape)
public double getDotScale()
public void setDotScale(double scale, boolean signalChange)
public void setDefaultSize(double size)
public double getDefaultSize()
protected void drawDomainGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.protected void drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.public org.jfree.data.Range getDataRange(org.jfree.chart.axis.ValueAxis axis)
null
if the specified axis isn't the domain axis or the
range axis for the plot.getDataRange
in interface org.jfree.chart.plot.ValueAxisPlot
axis
- the axis (null
permitted).null
).public void zoomDomainAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomDomainAxes
in interface org.jfree.chart.plot.Zoomable
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.public void zoomDomainAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source, boolean useAnchor)
zoomDomainAxes
in interface org.jfree.chart.plot.Zoomable
factor
- the zoom factor.info
- the plot rendering info.source
- the source point (in Java2D space).useAnchor
- use source point as zoom anchor?zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean)
public void zoomDomainAxes(double lowerPercent, double upperPercent, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomDomainAxes
in interface org.jfree.chart.plot.Zoomable
lowerPercent
- the new lower bound as a percentage of the current range.upperPercent
- the new upper bound as a percentage of the current range.info
- the plot rendering info.source
- the source point.public void zoomRangeAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomRangeAxes
in interface org.jfree.chart.plot.Zoomable
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.public void zoomRangeAxes(double factor, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source, boolean useAnchor)
zoomRangeAxes
in interface org.jfree.chart.plot.Zoomable
factor
- the zoom factor.info
- the plot rendering info.source
- the source point (in Java2D space).useAnchor
- use source point as zoom anchor?zoomDomainAxes(double, PlotRenderingInfo, Point2D, boolean)
public void zoomRangeAxes(double lowerPercent, double upperPercent, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
zoomRangeAxes
in interface org.jfree.chart.plot.Zoomable
lowerPercent
- the new lower bound as a percentage of the current range.upperPercent
- the new upper bound as a percentage of the current range.info
- the plot rendering info.source
- the source point.public boolean isDomainZoomable()
true
.isDomainZoomable
in interface org.jfree.chart.plot.Zoomable
public boolean isRangeZoomable()
true
.isRangeZoomable
in interface org.jfree.chart.plot.Zoomable
public boolean isDomainPannable()
true
if panning is enabled for the domain axes, and
false
otherwise.isDomainPannable
in interface org.jfree.chart.plot.Pannable
public void setDomainPannable(boolean pannable)
pannable
- the new flag value.public boolean isRangePannable()
true
if panning is enabled for the range axes, and
false
otherwise.isRangePannable
in interface org.jfree.chart.plot.Pannable
public void setRangePannable(boolean pannable)
pannable
- the new flag value.public void panDomainAxes(double percent, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
panDomainAxes
in interface org.jfree.chart.plot.Pannable
percent
- the distance to pan (as a percentage of the axis length).info
- the plot infosource
- the source point where the pan action started.public void panRangeAxes(double percent, org.jfree.chart.plot.PlotRenderingInfo info, java.awt.geom.Point2D source)
panRangeAxes
in interface org.jfree.chart.plot.Pannable
percent
- the distance to pan (as a percentage of the axis length).info
- the plot infosource
- the source point where the pan action started.public boolean equals(java.lang.Object obj)
FastScatterPlot
carries its data around with it (rather than
referencing a dataset), and the data is included in the equality test.equals
in class org.jfree.chart.plot.Plot
obj
- the object (null
permitted).public Attribute getXAxisAttribute()
public Attribute getYAxisAttribute()
public Attribute getColorAttribute()
public Attribute getShapeAttribute()
public void setAttribute(DottedChart.AttributeType type, Attribute attribute, boolean signalChange) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public Attribute getAttribute(DottedChart.AttributeType type)
public java.lang.String getToolTipForScreenLocation(org.jfree.chart.ChartPanel panel, java.awt.event.MouseEvent event)
public boolean isYAxisContinuous()
public boolean isXAxisContinuous()
public org.deckfour.xes.model.XLog exportViewToXLog(boolean visibleOnly, java.lang.String name) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public LightLog exportViewToLightLog(boolean visibleOnly, java.lang.String name) throws DottedChart.DottedChartException
DottedChart.DottedChartException
public LogView getLogView()
public void setIntensityPanel(javax.swing.JPanel intensityPanel, IntensityChart intensityChart)
public java.lang.String getPercentageRendered()
public java.lang.String getRenderTime()
public java.util.Map<java.lang.String,java.awt.Color> getColorMap()
public java.lang.String getEventClass(DataManager<?> manager, int e)
public org.jfree.chart.LegendItemCollection getLegendItems()
getLegendItems
in interface org.jfree.chart.LegendItemSource
getLegendItems
in class org.jfree.chart.plot.Plot
public void fireChangeEvent()
fireChangeEvent
in class org.jfree.chart.plot.Plot