ProjektGraph/OurApplication/OurLegendArea.java
2024-07-02 21:13:30 +02:00

39 lines
1.0 KiB
Java
Raw Blame History

package OurApplication;
import visualisation.LegendArea;
import javax.swing.*;
import java.awt.*;
/**
* This class represents a visualization.LegendArea implementation and has been created for demonstration purposes only.
* Method initialize(Graphics) is overridden and now implements logic for drawing parameters on the legend area.
* @author MSch<63>fer
* DHBW Stuttgart/Campus Horb AI2008<br>
* <br>
*/
public class OurLegendArea extends LegendArea{
private static final long serialVersionUID = 1L;
/**
* Standard constructor
*/
public OurLegendArea(){
super();
//set the legend area's preferred size manually for best visualization
setPreferredSize(new Dimension(150, 170));
}
/**
* Overridden method from super class.
* Draws all elements and descriptions on the LegendArea
* @param g the Graphics object of the corresponding panel
*/
public void initialize(Graphics g){
//Create a new TitledBorder for the LegendArea
setBorder(BorderFactory.createTitledBorder("LegendArea"));
}
}