I am using mouseclicks to zoom into my chart. When i do a regular click with an isShiftDown() function call, the zoom in functionality works fine. But when i try to zoom out using a shift + right click combination, it does not happen. This is my sample code
Code: Select all
public void mouseClicked(MouseEvent e) {
if(e.isShiftDown())
{
this.chartPanel.setZoomAroundAnchor(true);
this.chartPanel.setZoomInFactor(.5);
this.chartPanel.zoomInRange(e.getX(), e.getY());
this.chartPanel.zoomInDomain(e.getX(),e.getY());
}
else if(e.isMetaDown()&&e.isShiftDown()){
this.chartPanel.setZoomAroundAnchor(true);
this.chartPanel.setZoomOutFactor(.1);
this.chartPanel.zoomOutRange(e.getX(), e.getY());
this.chartPanel.zoomOutDomain(e.getX(),e.getY());
}
}
Avanidhar