ProjektGraph/OurApplication/OurLegendArea.java

39 lines
1.0 KiB
Java
Raw Normal View History

2024-07-02 19:13:30 +00:00
package OurApplication;
2024-07-02 19:13:30 +00:00
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.
2024-07-02 19:13:30 +00:00
* @author MSch<EFBFBD>fer
* DHBW Stuttgart/Campus Horb AI2008<br>
* <br>
*/
2024-07-02 19:13:30 +00:00
public class OurLegendArea extends LegendArea{
private static final long serialVersionUID = 1L;
/**
* Standard constructor
*/
2024-07-02 19:13:30 +00:00
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"));
}
}