Class ChartZoom
java.lang.Object
java.awt.event.MouseAdapter
org.knowm.xchart.internal.chartpart.ChartZoom
- All Implemented Interfaces:
ActionListener, MouseListener, MouseMotionListener, MouseWheelListener, EventListener, ChartPart
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Rectangleprotected booleanprotected final ChartButtonprotected intprotected intprotected final XChartPanel<XYChart> protected final XYChartFields inherited from interface ChartPart
SOLID_STROKE -
Constructor Summary
ConstructorsConstructorDescriptionChartZoom(XYChart xyChart, XChartPanel<XYChart> xChartPanel, String resetString) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfilterXByIndex(int startIndex, int endIndex) booleanfilterXByScreen(int screenXmin, int screenXmax) private booleanWhether all points are selected in all series.private booleanisOnePointSeleted(double minValue, double maxValue) Is there a point selected in all series.private booleanWhether the selectZoom overlaps with the chart.plotvoidvoidvoidvoidvoidpaint(Graphics2D g) private voidrepaint()voidprotected voidMethods inherited from class MouseAdapter
mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
-
Field Details
-
xChartPanel
-
xyChart
-
bounds
-
resetButton
-
x1
protected int x1 -
x2
protected int x2 -
filtered
protected boolean filtered
-
-
Constructor Details
-
ChartZoom
Constructor- Parameters:
xChartPanel-resetString-
-
-
Method Details
-
resetZoom
protected void resetZoom() -
repaint
private void repaint() -
getBounds
-
paint
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseAdapter
-
filterXByScreen
public boolean filterXByScreen(int screenXmin, int screenXmax) -
isOnePointSeleted
private boolean isOnePointSeleted(double minValue, double maxValue) Is there a point selected in all series.- Parameters:
minValue-maxValue-- Returns:
-
resetFilter
public void resetFilter() -
filterXByIndex
public void filterXByIndex(int startIndex, int endIndex) -
isAllPointsSelected
private boolean isAllPointsSelected()Whether all points are selected in all series.- Returns:
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classMouseAdapter
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
isOverlapping
private boolean isOverlapping()Whether the selectZoom overlaps with the chart.plot- Returns:
- true:overlapping, false: No overlap
-