From 02588c42ec38ccc9b0ca900a5716dcc47f3c0e1a Mon Sep 17 00:00:00 2001 From: besson Date: Mon, 16 Jan 2023 00:11:01 +0100 Subject: [PATCH] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers=20'src/?= =?UTF-8?q?fr/sae/JSonInspector/Graphics'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Graphics/ArrayObjectListener.java | 86 ++++++++++--------- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java b/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java index e4061ef..46f09dd 100644 --- a/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java +++ b/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java @@ -1,40 +1,46 @@ -package fr.sae.JSonInspector.Graphics; - -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; - -public class ArrayObjectListener implements MouseListener { - private final Line line; - private final Frame frame; - - public ArrayObjectListener(Line line, Frame frame) { - this.line = line; - this.frame = frame; - } - - @Override - public void mouseClicked(MouseEvent e) { - if (line.isShow()) { - line.retreat(); - } else { - line.unfold(); - } - frame.repaintFile(); - } - - @Override - public void mousePressed(MouseEvent e) { - } - - @Override - public void mouseReleased(MouseEvent e) { - } - - @Override - public void mouseEntered(MouseEvent e) { - } - - @Override - public void mouseExited(MouseEvent e) { - } -} +package JsonInspector.Graphics; + +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; + +public class ArrayObjectListener implements MouseListener { + private final Line line; + private final Frame frame; + + + /** + * + * @param line La ligne écoutée + * @param frame la frame contenant la ligne écoutée + */ + public ArrayObjectListener(Line line, Frame frame) { + this.line = line; + this.frame = frame; + } + + /** + * Change le statut d'affichage de la ligne + * @param e the event to be processed + */ + @Override + public void mouseClicked(MouseEvent e) { + if (line.isShow()) { + line.retreat(); + } else { + line.unfold(); + } + frame.repaintFile(); + } + + @Override + public void mousePressed(MouseEvent e) {} + + @Override + public void mouseReleased(MouseEvent e) {} + + @Override + public void mouseEntered(MouseEvent e) {} + + @Override + public void mouseExited(MouseEvent e) {} +}