1 34 35 36 package org.krysalis.jcharts.designer.tabs.allChart; 37 38 39 import javax.swing.JPanel ; 40 41 import org.krysalis.jcharts.designer.common.font.FontChooser; 42 import org.krysalis.jcharts.designer.common.stroke.StrokeChooser; 43 import org.krysalis.jcharts.designer.exceptions.DesignerException; 44 import org.krysalis.jcharts.designer.tabs.allChart.items.EdgePadding; 45 import org.krysalis.jcharts.properties.ChartProperties; 46 47 48 53 public class ChartPropertiesTab extends JPanel 54 { 55 private AllChartTabs allChartTabs; 56 57 private FontChooser titleFont; 58 private StrokeChooser borderStroke; 59 private EdgePadding edgePadding; 60 61 62 66 public ChartPropertiesTab( AllChartTabs allChartTabs ) 67 { 68 super(); 69 this.allChartTabs = allChartTabs; 70 71 allChartTabs.addTab( "Chart Properties", this ); 72 73 this.titleFont= new FontChooser( "Title Font" ); 74 this.add( this.titleFont ); 75 76 this.borderStroke= new StrokeChooser( "Border Stroke" ); 77 this.add( this.borderStroke ); 78 79 this.edgePadding= new EdgePadding( "Edge Padding" ); 80 this.add( this.edgePadding ); 81 } 82 83 84 89 public void updateChartProperties( ChartProperties chartProperties ) throws DesignerException 90 { 91 chartProperties.setTitleFont( this.titleFont.getChartFont() ); 92 chartProperties.setBorderStroke( this.borderStroke.getChartStroke() ); 93 chartProperties.setEdgePadding( this.edgePadding.getEdgePadding() ); 94 95 } 97 } 98 | Popular Tags |