List of usage examples for org.jfree.chart.plot CombinedDomainXYPlot setDomainCrosshairLockedOnData
public void setDomainCrosshairLockedOnData(boolean flag)
From source file:com.att.aro.diagnostics.GraphPanel.java
/** * Sets the Cross hair value.//from w w w. ja v a 2 s . c o m */ private void setCrossHair(double crossHairValue) { // set the cross hair values of plot and sub-plots Plot mainplot = advancedGraph.getPlot(); if (mainplot instanceof CombinedDomainXYPlot) { CombinedDomainXYPlot combinedPlot = (CombinedDomainXYPlot) mainplot; List<?> plots = combinedPlot.getSubplots(); for (Object p : plots) { if (p instanceof XYPlot) { XYPlot subPlot = (XYPlot) p; subPlot.setDomainCrosshairLockedOnData(false); subPlot.setDomainCrosshairValue(crossHairValue); subPlot.setDomainCrosshairVisible(true); } } combinedPlot.setDomainCrosshairLockedOnData(false); combinedPlot.setDomainCrosshairValue(crossHairValue, true); combinedPlot.setDomainCrosshairVisible(true); } handlePanel.setHandlePosition(getHandleCoordinate()); }