package testApplication; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.BorderFactory; import visualization.LegendArea; /** * 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 TestLegendArea extends LegendArea{ private static final long serialVersionUID = 1L; /** * Standard constructor */ public TestLegendArea(){ 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")); } }