@Override public void mouseWheelMoved(MouseWheelEvent e) { super.mouseWheelMoved(e); int v = e.getWheelRotation() > 0 ? 1 : -1; float zoomFact = 1.05f; double cx = camera.pos.getX(); double cy = camera.pos.getY(); cx -= e.getPoint().x; cy -= e.getPoint().y; if (v < 0) { camera.scale *= zoomFact; cx *= zoomFact; cy *= zoomFact; } else { camera.scale /= zoomFact; cx /= zoomFact; cy /= zoomFact; } cx += e.getPoint().x; cy += e.getPoint().y; camera.pos.set(cx, cy); camera.proot.updateThis(); }
@Override public void mousePressed(MouseEvent e) { super.mousePressed(e); if (g != null) { select = isSelected(); } }
@Override public void mouseExited(MouseEvent e) { super.mouseExited(e); if (e.getSource() instanceof Gripper) { if (((Gripper) e.getSource()).isRolloverEnabled()) { ((Gripper) e.getSource()).setRollover(false); } } }
@Override public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) constructPopUpMenu(e); super.mouseReleased(e); }
@Override public void mousePressed(MouseEvent e) { super.mousePressed(e); down = e.getButton() == 3; }
@Override public void mouseReleased(MouseEvent e) { super.mouseReleased(e); resetDrag(); }
@Override public void mouseReleased(MouseEvent e) { super.mouseReleased(e); buttonPressed.remove(Button.getButton(e.getButton())); buttonTyped.add(Button.getButton(e.getButton())); }
@Override public void mousePressed(MouseEvent e) { super.mousePressed(e); buttonPressed.add(Button.getButton(e.getButton())); }
@Override public void mouseMoved(MouseEvent e) { super.mouseMoved(e); mouseX = e.getX(); mouseY = e.getY(); }