Пример #1
0
 public void mouseDragged(MouseEvent e) {
   // System.out.println("Dragged");
   double beatWidth = sp.beatWidth;
   beatWidth += (double) ((double) e.getX() - (double) startX) / 5.0;
   if (beatWidth < 1.0) beatWidth = 1.0;
   if (beatWidth > 256.0) beatWidth = 256.0;
   // System.out.println("beatWidth = "+beatWidth);
   sp.beatWidth = beatWidth;
   startX = e.getX();
   // sp.update();
   this.repaint();
 }
Пример #2
0
 public void mouseReleased(MouseEvent e) {
   this.setCursor(new Cursor(13));
   sp.update();
 }