Programmieren_Projekt/testApplication/TestDrawArea.java

69 lines
1.8 KiB
Java
Raw Blame History

package testApplication;
import java.awt.Color;
import java.awt.Graphics;
import java.util.Vector;
import graph.*;
import logging.GraphLogElement;
import logging.NewLogElement;
import visualization.DrawArea;
import visualizationElements.BarChart;
import visualizationElements.BarChartElement;
import visualizationElements.ChessBoard;
import visualizationElements.DotChart;
import visualizationElements.Edge;
import visualizationElements.EdgeStyle;
import visualizationElements.Graph;
import visualizationElements.Hashtable;
import visualizationElements.List;
import visualizationElements.Maze;
import visualizationElements.Queue;
import visualizationElements.Stack;
import visualizationElements.Table;
import visualizationElements.Vertex;
import logging.LogElementList;
/**
* This class provides an example for using visualization.DrawArea.
* @see logging.Algorithm
@author MSch<63>fer
* DHBW Stuttgart/Campus Horb AI2008<br>
* <br>
*/
public class TestDrawArea extends DrawArea{
private static final long serialVersionUID = 1L;
private Maze maze;
private visualizationElements.Graph graph;
/**
* Standard constructor.
*/
public TestDrawArea() {
super();
}
/**
* Creates a test draw area and sets the specified log list.
* @param logList the draw area's log list test log elements.
* @param drawAreaName The display name over the draw area.
*/
public TestDrawArea(LogElementList<TestLogElement> logList, String drawAreaName){
super(logList, drawAreaName);
}
/**
* Draws a visualization element.
*/
public void draw(Graphics g){
TestLogElement logElement = (TestLogElement) logList.get();
logElement.getGraph().draw(g);
}
public void actualizeGraph(visualizationElements.Graph graph){
this.graph = graph;
}
}