ProjektGraph/OurApplication/OurApplication.java

73 lines
2.0 KiB
Java
Raw Normal View History

2024-07-02 19:13:30 +00:00
package OurApplication;
2024-07-03 17:41:46 +00:00
import graph.*;
2024-07-02 19:13:30 +00:00
import logging.LogElementList;
import visualisation.HybridWindow;
2024-07-07 18:34:38 +00:00
import visualizationElements.Vertex;
2024-07-02 19:13:30 +00:00
import javax.swing.*;
2024-07-07 21:39:17 +00:00
import java.awt.*;
2024-07-07 18:34:38 +00:00
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
2024-07-03 17:41:46 +00:00
import java.util.Random;
2024-07-02 19:13:30 +00:00
/**
* This application provides an example for using logging and visualization packages.
* It uses extended classes from logging and visualization.
* @see OurAlgorithm
* @see OurApplication
* @see OurDrawArea
* @see OurHybridWindow
* @see OurLogElement
* @see OurParameterArea
* @see OurTextArea
* @see OurLegendArea
* @see JPanel
* @author MSch<EFBFBD>fer
* DHBW Stuttgart/Campus Horb AI2008<br>
* <br>
*/
public class OurApplication {
/**
* Standard constructor.
*/
public OurApplication() {
super();
}
/**
* The applications main method.
* Creates a HybridWindow with TestParameterArea, TestLegendArea ,TestDrawArea, TestTextArea and TestAlgorithm and starts it.
* @param args
*/
public static void main(String[]args){
DirectedGraph<VertexMarking, EdgeMarking> myGraph = new DirectedGraph<>();
System.out.println(myGraph.toString());
2024-07-07 21:39:17 +00:00
LogElementList<OurLogElement> logList = new LogElementList<>();
2024-07-02 22:46:21 +00:00
OurParameterArea parameterArea = new OurParameterArea();
2024-07-07 17:49:31 +00:00
OurMethodButtons methodButtons = new OurMethodButtons();
OurDrawArea drawArea = new OurDrawArea(logList,"GraphVisualization");
OurTextArea textArea = new OurTextArea(logList);
2024-07-07 17:49:31 +00:00
OurAlgorithm algorithm = new OurAlgorithm(parameterArea, methodButtons);
2024-07-02 22:46:21 +00:00
OurLegendArea legendArea = new OurLegendArea();
2024-07-07 19:13:34 +00:00
OurHybridWindow<OurDrawArea, OurTextArea, OurParameterArea, OurAlgorithm, OurLogElement, OurLegendArea, OurMethodButtons> applet = new OurHybridWindow<>(drawArea, textArea, parameterArea, algorithm, logList, legendArea, methodButtons);
2024-07-07 14:29:45 +00:00
2024-07-02 22:46:21 +00:00
JFrame frame = new JFrame("Visualise");
2024-07-02 19:13:30 +00:00
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(applet);
frame.pack();
applet.init();
applet.start();
2024-07-08 16:03:30 +00:00
frame.setSize(1350,800);
2024-07-02 19:13:30 +00:00
frame.setVisible(true);
2024-07-02 22:46:21 +00:00
2024-07-02 19:13:30 +00:00
}
}