protected boolean isAxisSelected(GlimpseMouseEvent e) { GlimpseAxisLayout1D layout = getAxisLayout(e); if (layout == null) return false; if (e.isKeyDown(ModifierKey.Shift)) return true; if (layout.isHorizontal() && e.getY() < axisSize) return true; if (!layout.isHorizontal() && e.getX() < axisSize) return true; return false; }
@Override public void mouseMoved(GlimpseMouseEvent e) { GlimpseAxisLayout1D layout = getAxisLayout(e); if (layout == null) return; if (e.isAnyButtonDown() && this.axisSelected) { super.mouseMoved(e); e.setHandled(true); } }
@Override public void mouseWheelMoved(GlimpseMouseEvent e) { this.axisSelected = isAxisSelected(e); if (this.axisSelected) { super.mouseWheelMoved(e); e.setHandled(true); } }
@Override public void mousePressed(GlimpseMouseEvent e) { plot.setSelectedPlot(info); this.axisSelected = isAxisSelected(e); if (this.axisSelected) { super.mousePressed(e); e.setHandled(true); } }