Source Code Cross Referenced for Designer.java in  » Chart » jCharts » org » krysalis » jcharts » designer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jCharts » org.krysalis.jcharts.designer 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.krysalis.jcharts.designer;
002:
003:        import org.krysalis.jcharts.chartData.ChartDataException;
004:        import org.krysalis.jcharts.designer.charts.DesignerPieChart;
005:        import org.krysalis.jcharts.designer.exceptions.DesignerException;
006:        import org.krysalis.jcharts.designer.menuBar.DesignerMenuBar;
007:        import org.krysalis.jcharts.designer.tabs.LowerHalfPanel;
008:
009:        import javax.swing.*;
010:
011:        /*******************************************************************************
012:         * 
013:         * @author Nathaniel Auvil
014:         * @version $Id: Designer.java,v 1.2 2004/05/29 13:50:13 nathaniel_auvil Exp $
015:         ******************************************************************************/
016:        public class Designer extends JFrame {
017:
018:            public static final String TITLE = "jCharts Designer - 1.0.0";
019:
020:            private ChartPanel chartPanel;
021:            private LowerHalfPanel lowerHalfPanel;
022:
023:            private DesignerPieChart designerPieChart;
024:            private org.krysalis.jcharts.axisChart.AxisChart axisChart;
025:
026:            /****************************************************************************
027:             * 
028:             * @throws org.krysalis.jcharts.chartData.ChartDataException
029:             ***************************************************************************/
030:            public Designer() throws ChartDataException {
031:                super (TITLE);
032:
033:                this .designerPieChart = new DesignerPieChart(450, 450);
034:
035:                super .setJMenuBar(new DesignerMenuBar(this ));
036:                super .getContentPane()
037:                        .setLayout(
038:                                new BoxLayout(super .getContentPane(),
039:                                        BoxLayout.Y_AXIS));
040:
041:                this .chartPanel = new ChartPanel(this );
042:                this .chartPanel.setChart(this .designerPieChart.getPieChart2D(),
043:                        500, 500);
044:
045:                this .lowerHalfPanel = new LowerHalfPanel(this );
046:
047:                JScrollPane scrollPane = new JScrollPane(this .chartPanel);
048:                JSplitPane jSplitPane = new JSplitPane(
049:                        JSplitPane.VERTICAL_SPLIT, scrollPane,
050:                        this .lowerHalfPanel);
051:                jSplitPane.setOneTouchExpandable(true);
052:
053:                //this.getContentPane().add( jSplitPane, BorderLayout.CENTER );
054:                this .getContentPane().add(jSplitPane);
055:
056:                //---so when they click on the 'x' in the upper right corner, the
057:                // program exits
058:                super .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
059:
060:                this .pack();
061:                this .setVisible(true);
062:
063:                super .setBounds(30, 30, 600, 600);
064:            }
065:
066:            /****************************************************************************
067:             *  
068:             ***************************************************************************/
069:            public void refreshChart() {
070:                try {
071:                    this .lowerHalfPanel.getTopLevelTabs()
072:                            .updateChartProperties(
073:                                    this .designerPieChart.getChartProperties());
074:
075:                    this .designerPieChart.updateChart();
076:                    this .chartPanel.repaint();
077:                } catch (DesignerException designerException) {
078:                    designerException.display(this );
079:                } catch (ChartDataException chartDataException) {
080:                    JOptionPane.showMessageDialog(this , chartDataException
081:                            .getMessage(), "Chart Data Exception",
082:                            JOptionPane.ERROR_MESSAGE);
083:                }
084:            }
085:
086:            /****************************************************************************
087:             *  
088:             ***************************************************************************/
089:            public static void main(String[] args) throws ChartDataException {
090:                Designer designer = new Designer();
091:
092:                /*
093:                 * int width= 450; int height= 450;
094:                 * 
095:                 * try { String[] labels = {"BMW", "Audi", "Lexus"}; String title = "Cars
096:                 * that Own"; Paint[] paints = {Color.blue, Color.gray, Color.red};
097:                 * double[] data = {50d, 30d, 20d};
098:                 * 
099:                 * PieChart2DProperties pieChart2DProperties = new PieChart2DProperties();
100:                 * PieChartDataSet pieChartDataSet = new PieChartDataSet( title, data,
101:                 * labels, paints, pieChart2DProperties );
102:                 * 
103:                 * PieChart2D pieChart2D = new PieChart2D( pieChartDataSet, new
104:                 * LegendProperties(), new ChartProperties(), width, height );
105:                 * 
106:                 * designer.chartPanel.setChart( pieChart2D, width, height ); } catch(
107:                 * ChartDataException chartDataException ) {
108:                 * chartDataException.printStackTrace(); }
109:                 */
110:            }
111:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.