From: Nathaniel G. A. <nat...@us...> - 2004-06-09 01:47:07
|
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24429/src/java/org/krysalis/jcharts/designer/tabs/allChart Modified Files: AllChartTabs.java ChartPropertiesTab.java Added Files: GeneralTab.java Log Message: Index: AllChartTabs.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/AllChartTabs.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AllChartTabs.java 3 Jun 2004 00:57:58 -0000 1.2 --- AllChartTabs.java 9 Jun 2004 01:46:52 -0000 1.3 *************** *** 37,40 **** --- 37,41 ---- import org.krysalis.jcharts.designer.tabs.TopLevelTabs; + import org.krysalis.jcharts.designer.tabs.allChart.legendProperties.LegendPropertiesTab; import javax.swing.*; *************** *** 48,55 **** public class AllChartTabs extends JTabbedPane { - private TopLevelTabs topLevelTabs; ! private ChartPropertiesTab allChartTabPanel; ! /*************************************************************************************** --- 49,58 ---- public class AllChartTabs extends JTabbedPane { private TopLevelTabs topLevelTabs; ! ! private GeneralTab generalTab; ! private ChartPropertiesTab chartPropertiesTab; ! private LegendPropertiesTab legendPropertiesTab; ! /*************************************************************************************** *************** *** 62,72 **** this.topLevelTabs.addTab( "All Charts", this ); ! this.allChartTabPanel = new ChartPropertiesTab( this ); } ! ! public ChartPropertiesTab getAllChartTabPanel() { ! return allChartTabPanel; } } \ No newline at end of file --- 65,106 ---- this.topLevelTabs.addTab( "All Charts", this ); ! this.generalTab= new GeneralTab(); ! this.addTab( "General", this.generalTab ); ! ! this.chartPropertiesTab = new ChartPropertiesTab(); ! this.addTab( "Chart Properties", this.chartPropertiesTab ); ! ! this.legendPropertiesTab= new LegendPropertiesTab(); ! this.addTab( "Legend Properties", this.legendPropertiesTab ); } ! ! /************************************************************* ! * ! * @return ChartPropertiesTab ! *************************************************************/ ! public ChartPropertiesTab getChartPropertiesTab() { ! return chartPropertiesTab; ! } ! ! ! /***************************************************************** ! * ! * @return GeneralTab ! *****************************************************************/ ! public GeneralTab getGeneralTab() ! { ! return this.generalTab; ! } ! ! ! /**************************************************************** ! * ! * @return LegendPropertiesTab ! ****************************************************************/ ! public LegendPropertiesTab getLegendPropertiesTab() ! { ! return this.legendPropertiesTab; } } \ No newline at end of file Index: ChartPropertiesTab.java =================================================================== RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/tabs/allChart/ChartPropertiesTab.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChartPropertiesTab.java 3 Jun 2004 00:57:58 -0000 1.4 --- ChartPropertiesTab.java 9 Jun 2004 01:46:52 -0000 1.5 *************** *** 40,44 **** import javax.swing.BorderFactory; import javax.swing.BoxLayout; - import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.JScrollPane; --- 40,43 ---- *************** *** 58,65 **** * @version $Id$ ************************************************************************************/ ! public class ChartPropertiesTab //extends JPanel { - private AllChartTabs allChartTabs; - private FontChooser titleFont; private StrokeChooser borderStroke; --- 57,62 ---- * @version $Id$ ************************************************************************************/ ! public class ChartPropertiesTab extends JScrollPane { private FontChooser titleFont; private StrokeChooser borderStroke; *************** *** 68,85 **** private AntiAliasing antiAliasing; ! private JScrollPane jScrollPane; ! /************************************************************************************ * - * @param allChartTabs ***********************************************************************************/ ! public ChartPropertiesTab( AllChartTabs allChartTabs ) { - this.allChartTabs = allChartTabs; - JPanel jPanel= new JPanel(); BoxLayout boxLayout= new BoxLayout( jPanel, BoxLayout.Y_AXIS ); jPanel.setLayout( boxLayout ); ! jScrollPane= new JScrollPane( jPanel ); this.titleFont= new FontChooser( "Title Font" ); --- 65,78 ---- private AntiAliasing antiAliasing; ! /************************************************************************************ * ***********************************************************************************/ ! public ChartPropertiesTab() { JPanel jPanel= new JPanel(); BoxLayout boxLayout= new BoxLayout( jPanel, BoxLayout.Y_AXIS ); jPanel.setLayout( boxLayout ); ! this.titleFont= new FontChooser( "Title Font" ); *************** *** 101,106 **** jPanel.add( this.antiAliasing ); ! ! allChartTabs.addTab( "Chart Properties", jScrollPane ); } --- 94,98 ---- jPanel.add( this.antiAliasing ); ! super.setViewportView( jPanel ); } *************** *** 118,124 **** chartProperties.setBackgroundPaint( this.backgroundPaint.getPaint() ); chartProperties.setUseAntiAliasing( this.antiAliasing.useAntiAliasing() ); - - //TODO add more stuff - //validate? } } --- 110,113 ---- --- NEW FILE: GeneralTab.java --- /*********************************************************************************************** * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved. * * Redistribution and use of this software and associated documentation ("Software"), with or * without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain copyright statements and notices. * Redistributions must also contain a copy of this document. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote * products derived from this Software without prior written permission of Nathaniel G. * Auvil. For written permission, please contact nat...@us... * * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a * registered trademark of Nathaniel G. Auvil. * * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/). * * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE ************************************************************************************************/ package org.krysalis.jcharts.designer.tabs.allChart; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; import org.krysalis.jcharts.designer.common.LabelledTextfield; /************************************************************************************* * * @author Nathaniel Auvil * @version $Id: GeneralTab.java,v 1.1 2004/06/09 01:46:52 nathaniel_auvil Exp $ ************************************************************************************/ public class GeneralTab extends JPanel { private LabelledTextfield chartWidth; private LabelledTextfield chartHeight; /************************************************************************************ * ***********************************************************************************/ public GeneralTab() { //---dimensions------------------ JPanel dimensions= new JPanel(); dimensions.setBorder( BorderFactory.createTitledBorder( "Dimensions" ) ); this.chartWidth= new LabelledTextfield( "Width", 4 ); this.chartWidth.setText( "400" ); dimensions.add( this.chartWidth ); this.chartHeight= new LabelledTextfield( "Height", 4 ); this.chartHeight.setText( "400" ); dimensions.add( this.chartHeight ); //JPanel jPanel= new JPanel(); //jPanel.add( dimensions ); super.add( dimensions ); } public int getChartWidth() { return Integer.parseInt( this.chartWidth.getText() ); } public int getChartHeight() { return Integer.parseInt( this.chartHeight.getText() ); } } |