@Override public void paint(Graphics2D g, double timestamp) { super.paint(g); Point2D p = getPosition(timestamp); double x = p.getX() - position.getX(); double y = p.getY() - position.getY(); g.translate(x, y); double angle = getOrientation(timestamp) - orientation; g.rotate(angle); paintGauge(g); }
@Override public void paintUnscaled(Graphics2D g, double timestamp) { if (timestamp == 0d) { super.paintUnscaled(g); } }