org.jfree.chart.fx.interaction.ChartMouseListenerFX Java Examples

The following examples show how to use org.jfree.chart.fx.interaction.ChartMouseListenerFX. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChartViewer.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseMoved(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #2
Source File: ChartViewer.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseClicked(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #3
Source File: ChartCanvas.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseMovedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #4
Source File: TaDispatchHandler.java    From TAcharting with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void handleMouseMoved(TaChartCanvas canvas, MouseEvent e) {
    double x = e.getX();
    double y = e.getY();
    ChartEntity entity = canvas.getRenderingInfo().getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(canvas.getChart(), e, entity);
    for (ChartMouseListenerFX listener : canvas.getChartMouseListeners()) {
        listener.chartMouseMoved(event);
    }
}
 
Example #5
Source File: TaDispatchHandler.java    From TAcharting with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * Handles a mouse clicked event by setting the anchor point for the
 * canvas and redrawing the org.sjwimmer.tacharting.chart (the anchor point is a reference point
 * used by the org.sjwimmer.tacharting.chart to determine crosshair lines).
 *
 * @param canvas  the org.sjwimmer.tacharting.chart canvas ({@code null} not permitted).
 * @param e  the mouse event ({@code null} not permitted).
 */
@Override
public void handleMouseClicked(TaChartCanvas canvas, MouseEvent e) {
    if (this.mousePressedPoint == null) {
        return;
    }
    double x = e.getX();
    double y = e.getY();
    ChartEntity entity = canvas.getRenderingInfo().getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(canvas.getChart(), e, entity);
    for (ChartMouseListenerFX listener : canvas.getChartMouseListeners()) {
        listener.chartMouseClicked(event);
    }
}
 
Example #6
Source File: ChartViewer.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseMoved(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #7
Source File: ChartCanvas.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseClickedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #8
Source File: ChartCanvas.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseMovedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #9
Source File: ChartCanvas.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseClickedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #10
Source File: ChartViewer.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseClicked(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #11
Source File: ChartViewer.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseMoved(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #12
Source File: ChartCanvas.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
public void dispatchMouseMovedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #13
Source File: ChartViewer.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
@Override
public void chartMouseClicked(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #14
Source File: ChartCanvas.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
public void dispatchMouseMovedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #15
Source File: ChartCanvas.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
public void dispatchMouseClickedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #16
Source File: ChartViewer.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void chartMouseClicked(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #17
Source File: ChartViewer.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void chartMouseMoved(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #18
Source File: ChartCanvas.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseMovedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #19
Source File: ChartCanvas.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseClickedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #20
Source File: ChartViewer.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
@Override
public void chartMouseMoved(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #21
Source File: ChartViewer.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseClicked(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #22
Source File: ChartViewer.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseMoved(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #23
Source File: ChartCanvas.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseMovedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseMoved(event);
    }
}
 
Example #24
Source File: ChartCanvas.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
public void dispatchMouseClickedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #25
Source File: ChartViewer.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void chartMouseClicked(ChartMouseEventFX event) {
    // relay the event from the canvas to our registered listeners
    for (ChartMouseListenerFX listener: this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #26
Source File: ChartCanvas.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
public void dispatchMouseClickedEvent(Point2D point, MouseEvent e) {
    double x = point.getX();
    double y = point.getY();
    ChartEntity entity = this.info.getEntityCollection().getEntity(x, y);
    ChartMouseEventFX event = new ChartMouseEventFX(this.chart, e, entity);
    for (ChartMouseListenerFX listener : this.chartMouseListeners) {
        listener.chartMouseClicked(event);
    }
}
 
Example #27
Source File: ChartViewer.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Registers a listener to receive {@link ChartMouseEvent} notifications
 * from this viewer.
 *
 * @param listener  the listener ({@code null} not permitted).
 */
public void addChartMouseListener(ChartMouseListenerFX listener) {
    ParamChecks.nullNotPermitted(listener, "listener");
    this.chartMouseListeners.add(listener);
}
 
Example #28
Source File: ChartViewer.java    From openstock with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Removes a listener from the list of objects listening for chart mouse
 * events.
 *
 * @param listener  the listener.
 */
public void removeChartMouseListener(ChartMouseListenerFX listener) {
    ParamChecks.nullNotPermitted(listener, "listener");
    this.chartMouseListeners.remove(listener);
}
 
Example #29
Source File: ChartViewerSkin.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Removes a listener from the list of objects listening for chart mouse
 * events.
 *
 * @param listener  the listener.
 */
public void removeChartMouseListener(ChartMouseListenerFX listener) {
    this.canvas.removeChartMouseListener(listener);
}
 
Example #30
Source File: ChartCanvas.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Removes a listener from the list of objects listening for chart mouse
 * events.
 *
 * @param listener  the listener.
 */
public void removeChartMouseListener(ChartMouseListenerFX listener) {
    this.chartMouseListeners.remove(listener);
}