$
This commit is contained in:
parent
8b68b3677e
commit
888d0404a8
2
Makefile
2
Makefile
@ -26,9 +26,9 @@ run:
|
||||
make clean
|
||||
mkdir build/ && mkdir docs/
|
||||
${JAVAC} ${JAVAC_OPTIONS} ${SETTINGS} ${GRAPHICS} ${STORAGE} ${EXCEPTION} ${MAIN}
|
||||
make docs
|
||||
${JAR} cvfe JSonInspector.jar fr.sae.JSonInspector.Main -C build fr
|
||||
cd build && java fr.sae.JSonInspector.Main && cd ..
|
||||
make docs
|
||||
|
||||
clean:
|
||||
rm -rf build && rm -rf docs
|
||||
|
@ -5,8 +5,19 @@ import fr.sae.JSonInspector.Main;
|
||||
import fr.sae.JSonInspector.Settings.Parameters;
|
||||
import fr.sae.JSonInspector.Storage.Tree;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JOptionPane;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.CardLayout;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
@ -8,13 +8,14 @@ import fr.sae.JSonInspector.Storage.Value;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GraphicFile extends JPanel {
|
||||
private final GridBagConstraints gbc = new GridBagConstraints();
|
||||
private final JPanel alignementPanel = new JPanel();
|
||||
private final Frame frame;
|
||||
private final ArrayList<Line> lines;
|
||||
private final List<Line> lines;
|
||||
private boolean php = false;
|
||||
private Node firstNode;
|
||||
|
||||
@ -29,7 +30,7 @@ public class GraphicFile extends JPanel {
|
||||
displayLines();
|
||||
}
|
||||
|
||||
public GraphicFile(Frame frame, ArrayList<Line> lines) {
|
||||
public GraphicFile(Frame frame, List<Line> lines) {
|
||||
super();
|
||||
init();
|
||||
this.frame = frame;
|
||||
@ -262,7 +263,7 @@ public class GraphicFile extends JPanel {
|
||||
* @param line la ligne sur laquelle afficher la valeur
|
||||
* @param value la valeur à afficher
|
||||
*/
|
||||
private void createValue(Line line, Value value) {
|
||||
private void createValue(Line line, Value<?> value) {
|
||||
if (value.isNumber()) {
|
||||
line.add("" + value.getValue(), Parameters.NUMBER_COLOR);
|
||||
} else if (value.isString()) {
|
||||
@ -394,7 +395,7 @@ public class GraphicFile extends JPanel {
|
||||
*
|
||||
* @return la liste des lignes du fichier
|
||||
*/
|
||||
public ArrayList<Line> getLines() {
|
||||
public List<Line> getLines() {
|
||||
return lines;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
package fr.sae.JSonInspector.Graphics;
|
||||
|
||||
import fr.sae.JSonInspector.Storage.Node;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
|
||||
/**
|
||||
* Représente une ligne dans l'IHM
|
||||
|
@ -1,9 +1,8 @@
|
||||
package fr.sae.JSonInspector.Graphics;
|
||||
|
||||
import fr.sae.JSonInspector.Settings.Parameters;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import javax.swing.JLabel;
|
||||
import java.awt.Color;
|
||||
|
||||
public class MyJLabel extends JLabel {
|
||||
/**
|
||||
|
@ -1,9 +1,9 @@
|
||||
package fr.sae.JSonInspector.Graphics;
|
||||
|
||||
import fr.sae.JSonInspector.Settings.Parameters;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import javax.swing.JPanel;
|
||||
import java.awt.Color;
|
||||
import java.awt.FlowLayout;
|
||||
|
||||
public class MyJPanel extends JPanel {
|
||||
/**
|
||||
|
@ -3,8 +3,10 @@ package fr.sae.JSonInspector;
|
||||
import fr.sae.JSonInspector.Exception.JsonSyntaxException;
|
||||
import fr.sae.JSonInspector.Graphics.Frame;
|
||||
import fr.sae.JSonInspector.Storage.Tree;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package fr.sae.JSonInspector.Settings;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Font;
|
||||
import java.awt.Color;
|
||||
|
||||
/**
|
||||
* Contient uniquement les paramètres de l'application
|
||||
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Node {
|
||||
private final List<Value> values = new ArrayList<>();
|
||||
private final List<Value<?>> values = new ArrayList<>();
|
||||
private final String name;
|
||||
private final Type type;
|
||||
|
||||
@ -82,7 +82,7 @@ public class Node {
|
||||
* @param index l'index de la valeur
|
||||
* @return la valeur trouvée
|
||||
*/
|
||||
public Value get(int index) {
|
||||
public Value<?> get(int index) {
|
||||
return values.get(index);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ package fr.sae.JSonInspector.Storage;
|
||||
|
||||
import fr.sae.JSonInspector.Exception.JsonSyntaxException;
|
||||
import fr.sae.JSonInspector.Settings.Parameters;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user