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�fer * DHBW Stuttgart/Campus Horb AI2008
*
*/ 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")); } }