25 lines
530 B
Java
25 lines
530 B
Java
|
import java.awt.event.*;
|
||
|
|
||
|
public class VolumeAct implements MouseWheelListener {
|
||
|
private int a;
|
||
|
private Cercles ce;
|
||
|
public VolumeAct(Cercles chat){
|
||
|
super();
|
||
|
this.a=0;
|
||
|
this.ce=chat;
|
||
|
}
|
||
|
|
||
|
public void mouseWheelMoved(MouseWheelEvent e){
|
||
|
int i;
|
||
|
i=e.getWheelRotation();
|
||
|
if(i<0 && this.a<10){
|
||
|
this.a++;
|
||
|
ce.getNombre(this.a);
|
||
|
}
|
||
|
|
||
|
if(i>0 && this.a>0){
|
||
|
this.a--;
|
||
|
ce.getNombre(this.a);
|
||
|
}
|
||
|
}
|
||
|
}
|