Java Code Examples for org.jfree.chart.fx.interaction.ChartMouseListenerFX#chartMouseClicked()

The following examples show how to use org.jfree.chart.fx.interaction.ChartMouseListenerFX#chartMouseClicked() . 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: 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 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: 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 4
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 5
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 6
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 7
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 8
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 9
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 10
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 11
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 12
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 13
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);
    }
}