From d53e7eb66106f10d864ceaed514588207d6160af Mon Sep 17 00:00:00 2001 From: Vieira Date: Mon, 4 Apr 2022 15:33:12 +0200 Subject: [PATCH] =?UTF-8?q?Coj=C3=ADn=20en=20la=20mejilla=20para=20amortig?= =?UTF-8?q?uar=20el=20sonido=20del=20Tokarev=20ruso=20(Ooh)=20O=20te=20pon?= =?UTF-8?q?dr=C3=A9=20un=20coj=C3=ADn=20bajo=20las=20rodillas,=20tienes=20?= =?UTF-8?q?que=20estar=20c=C3=B3modo=20cuando=20me=20la=20chupes=20(Gang)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APL2.1/TP9/Volume/Souris.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 APL2.1/TP9/Volume/Souris.java diff --git a/APL2.1/TP9/Volume/Souris.java b/APL2.1/TP9/Volume/Souris.java new file mode 100644 index 0000000..d0ec5ba --- /dev/null +++ b/APL2.1/TP9/Volume/Souris.java @@ -0,0 +1,18 @@ +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; + +public class Souris implements MouseWheelListener { + Paintvolume draw; + public Souris(Paintvolume draw) { + this.draw = draw; + } + public void mouseWheelMoved(MouseWheelEvent e) { + if (e.getWheelRotation() > 0) { + draw.downVolume(); + } else { + draw.upVolume(); + } + } + +}