Transférer les fichiers vers 'src/fr/sae/JSonInspector/Graphics'

This commit is contained in:
Romain BESSON 2023-01-16 00:11:01 +01:00
parent 77cb91dc32
commit 02588c42ec

View File

@ -1,40 +1,46 @@
package fr.sae.JSonInspector.Graphics; package JsonInspector.Graphics;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
public class ArrayObjectListener implements MouseListener { public class ArrayObjectListener implements MouseListener {
private final Line line; private final Line line;
private final Frame frame; private final Frame frame;
public ArrayObjectListener(Line line, Frame frame) {
this.line = line; /**
this.frame = frame; *
} * @param line La ligne écoutée
* @param frame la frame contenant la ligne écoutée
@Override */
public void mouseClicked(MouseEvent e) { public ArrayObjectListener(Line line, Frame frame) {
if (line.isShow()) { this.line = line;
line.retreat(); this.frame = frame;
} else { }
line.unfold();
} /**
frame.repaintFile(); * Change le statut d'affichage de la ligne
} * @param e the event to be processed
*/
@Override @Override
public void mousePressed(MouseEvent e) { public void mouseClicked(MouseEvent e) {
} if (line.isShow()) {
line.retreat();
@Override } else {
public void mouseReleased(MouseEvent e) { line.unfold();
} }
frame.repaintFile();
@Override }
public void mouseEntered(MouseEvent e) {
} @Override
public void mousePressed(MouseEvent e) {}
@Override
public void mouseExited(MouseEvent e) { @Override
} public void mouseReleased(MouseEvent e) {}
}
@Override
public void mouseEntered(MouseEvent e) {}
@Override
public void mouseExited(MouseEvent e) {}
}