krysalis-jcharts/src/java/org/krysalis/jcharts/designer Designer.java,1.1,1.2

"Nathaniel G. Auvil" <[email protected]> Sat, 29 May 2004 13:50:16 +0000
Newsgroups gmane.comp.krysalis.jcharts.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3409/src/java/org/krysalis/jcharts/designer

Modified Files:
	Designer.java 
Log Message:


Index: Designer.java
===================================================================
RCS file: /cvsroot/jcharts/krysalis-jcharts/src/java/org/krysalis/jcharts/designer/Designer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Designer.java	9 Aug 2003 16:57:29 -0000	1.1
--- Designer.java	29 May 2004 13:50:13 -0000	1.2
***************
*** 3,7 ****
  
  
- 
  import org.krysalis.jcharts.chartData.ChartDataException;
  import org.krysalis.jcharts.designer.charts.DesignerPieChart;
--- 3,6 ----
***************
*** 13,63 ****
  
  
! /***********************************************************************************
!  *
   * @author Nathaniel Auvil
   * @version $Id$
!  **********************************************************************************/
! public class Designer extends JFrame {
  
! 	public static final String TITLE= "jCharts Designer - 1.0.0";
  
  	private ChartPanel chartPanel;
  	private LowerHalfPanel lowerHalfPanel;
  
- 
  	private DesignerPieChart designerPieChart;
  	private org.krysalis.jcharts.axisChart.AxisChart axisChart;
  
  
! 
!    /***********************************************************************************
!     *
  	 * @throws org.krysalis.jcharts.chartData.ChartDataException
!     **********************************************************************************/
! 	public Designer() throws ChartDataException {
  		super( TITLE );
  
! 		this.designerPieChart= new DesignerPieChart( 450, 450 );
  
! 	   super.setJMenuBar( new DesignerMenuBar( this ) );
! 	   super.getContentPane().setLayout( new BoxLayout( super.getContentPane(), BoxLayout.Y_AXIS ) );
  
! 	   this.chartPanel= new ChartPanel( this );
  		this.chartPanel.setChart( this.designerPieChart.getPieChart2D(), 500, 500 );
  
!       this.lowerHalfPanel= new LowerHalfPanel( this );
! 
! 
! 	   JScrollPane scrollPane= new JScrollPane( this.chartPanel );
! 	   JSplitPane jSplitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT, scrollPane, this.lowerHalfPanel );
! 	   jSplitPane.setOneTouchExpandable( true );
! 
! 	   //this.getContentPane().add( jSplitPane, BorderLayout.CENTER );
!       this.getContentPane().add( jSplitPane );
  
  
! 		//---so when they click on the 'x' in the upper right corner, the program exits
!       super.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
  
  
  		this.pack();
--- 12,60 ----
  
  
! /*******************************************************************************
!  * 
   * @author Nathaniel Auvil
   * @version $Id$
!  ******************************************************************************/
! public class Designer extends JFrame
! {
  
! 	public static final String TITLE = "jCharts Designer - 1.0.0";
  
  	private ChartPanel chartPanel;
  	private LowerHalfPanel lowerHalfPanel;
  
  	private DesignerPieChart designerPieChart;
  	private org.krysalis.jcharts.axisChart.AxisChart axisChart;
  
  
! 	/****************************************************************************
! 	 * 
  	 * @throws org.krysalis.jcharts.chartData.ChartDataException
! 	 ***************************************************************************/
! 	public Designer() throws ChartDataException
! 	{
  		super( TITLE );
  
! 		this.designerPieChart = new DesignerPieChart( 450, 450 );
  
! 		super.setJMenuBar( new DesignerMenuBar( this ) );
! 		super.getContentPane().setLayout( new BoxLayout( super.getContentPane(), BoxLayout.Y_AXIS ) );
  
! 		this.chartPanel = new ChartPanel( this );
  		this.chartPanel.setChart( this.designerPieChart.getPieChart2D(), 500, 500 );
  
! 		this.lowerHalfPanel = new LowerHalfPanel( this );
  
+ 		JScrollPane scrollPane = new JScrollPane( this.chartPanel );
+ 		JSplitPane jSplitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT, scrollPane, this.lowerHalfPanel );
+ 		jSplitPane.setOneTouchExpandable( true );
  
! 		//this.getContentPane().add( jSplitPane, BorderLayout.CENTER );
! 		this.getContentPane().add( jSplitPane );
  
+ 		//---so when they click on the 'x' in the upper right corner, the
+ 		// program exits
+ 		super.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
  
  		this.pack();
***************
*** 68,79 ****
  
  
! 	/************************************************************************************
! 	 *
! 	 ***********************************************************************************/
  	public void refreshChart()
  	{
  		try
  		{
!       	this.lowerHalfPanel.getTopLevelTabs().updateChartProperties( this.designerPieChart.getChartProperties() );
  
  			this.designerPieChart.updateChart();
--- 65,76 ----
  
  
! 	/****************************************************************************
! 	 *  
! 	 ***************************************************************************/
  	public void refreshChart()
  	{
  		try
  		{
! 			this.lowerHalfPanel.getTopLevelTabs().updateChartProperties( this.designerPieChart.getChartProperties() );
  
  			this.designerPieChart.updateChart();
***************
*** 86,122 ****
  		catch( ChartDataException chartDataException )
  		{
!          JOptionPane.showMessageDialog( this, chartDataException.getMessage(), "Chart Data Exception", JOptionPane.ERROR_MESSAGE );
  		}
  	}
  
  
! 	/***********************************************************************************
! 	 *
! 	 **********************************************************************************/
  	public static void main( String[] args ) throws ChartDataException
  	{
! 		Designer designer= new Designer();
! 
! /*
!       int width= 450;
! 		int height= 450;
! 
! 		try {
! 			String[] labels = {"BMW", "Audi", "Lexus"};
! 			String title = "Cars that Own";
! 			Paint[] paints = {Color.blue, Color.gray, Color.red};
! 			double[] data = {50d, 30d, 20d};
! 
! 			PieChart2DProperties pieChart2DProperties = new PieChart2DProperties();
! 			PieChartDataSet pieChartDataSet = new PieChartDataSet( title, data, labels, paints, pieChart2DProperties );
! 
! 			PieChart2D pieChart2D = new PieChart2D( pieChartDataSet, new LegendProperties(), new ChartProperties(), width, height );
  
! 			designer.chartPanel.setChart( pieChart2D, width, height );
! 		}
! 		catch( ChartDataException chartDataException ) {
! 			chartDataException.printStackTrace();
! 		}
! */
  	}
! }
--- 83,119 ----
  		catch( ChartDataException chartDataException )
  		{
! 			JOptionPane.showMessageDialog(	this,
! 														chartDataException.getMessage(),
! 														"Chart Data Exception",
! 														JOptionPane.ERROR_MESSAGE );
  		}
  	}
  
  
! 	/****************************************************************************
! 	 *  
! 	 ***************************************************************************/
  	public static void main( String[] args ) throws ChartDataException
  	{
! 		Designer designer = new Designer();
  
! 		/*
! 		 * int width= 450; int height= 450;
! 		 * 
! 		 * try { String[] labels = {"BMW", "Audi", "Lexus"}; String title = "Cars
! 		 * that Own"; Paint[] paints = {Color.blue, Color.gray, Color.red};
! 		 * double[] data = {50d, 30d, 20d};
! 		 * 
! 		 * PieChart2DProperties pieChart2DProperties = new PieChart2DProperties();
! 		 * PieChartDataSet pieChartDataSet = new PieChartDataSet( title, data,
! 		 * labels, paints, pieChart2DProperties );
! 		 * 
! 		 * PieChart2D pieChart2D = new PieChart2D( pieChartDataSet, new
! 		 * LegendProperties(), new ChartProperties(), width, height );
! 		 * 
! 		 * designer.chartPanel.setChart( pieChart2D, width, height ); } catch(
! 		 * ChartDataException chartDataException ) {
! 		 * chartDataException.printStackTrace(); }
! 		 */
  	}
! }
\ No newline at end of file



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click