package OurApplication; import graph.*; import logging.LogElementList; import visualisation.HybridWindow; import visualizationElements.Vertex; import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.Random; /** * 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�fer * DHBW Stuttgart/Campus Horb AI2008
*
*/ 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 myGraph = new DirectedGraph<>(); System.out.println(myGraph.toString()); LogElementList logList = new LogElementList<>(); OurParameterArea parameterArea = new OurParameterArea(); OurMethodButtons methodButtons = new OurMethodButtons(); OurDrawArea drawArea = new OurDrawArea(logList,"GraphVisualization"); OurTextArea textArea = new OurTextArea(logList); OurAlgorithm algorithm = new OurAlgorithm(parameterArea, methodButtons); OurLegendArea legendArea = new OurLegendArea(); OurHybridWindow applet = new OurHybridWindow<>(drawArea, textArea, parameterArea, algorithm, logList, legendArea, methodButtons); JFrame frame = new JFrame("Visualise"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(applet); frame.pack(); applet.init(); applet.start(); frame.setSize(1350,800); frame.setVisible(true); } }