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