Source Code Cross Referenced for DemoTree.java in  » Swing-Library » Swinglets » com » javelin » examples » swinglets » 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 » Swing Library » Swinglets » com.javelin.examples.swinglets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright Javelin Software, All rights reserved.
003:         */
004:
005:        package com.javelin.examples.swinglets;
006:
007:        import java.util.*;
008:        import java.io.*;
009:        import java.awt.*;
010:
011:        import javax.servlet.*;
012:        import javax.servlet.http.*;
013:        import javax.swing.tree.*;
014:
015:        import com.javelin.swinglets.*;
016:
017:        /** 
018:         * A Demo STree
019:         * 
020:         * @author Robin Sharp
021:         */
022:
023:        public class DemoTree extends STree {
024:            public DemoTree() {
025:                super (getTreeModel());
026:            }
027:
028:            public static TreeModel getTreeModel() {
029:                DefaultMutableTreeNode top = new DefaultMutableTreeNode("Music");
030:                DefaultMutableTreeNode catagory;
031:                DefaultMutableTreeNode composer;
032:                DefaultMutableTreeNode style;
033:                DefaultMutableTreeNode album;
034:
035:                // Classical
036:                catagory = new DefaultMutableTreeNode("Classical");
037:                top.add(catagory);
038:
039:                // Beethoven
040:                catagory
041:                        .add(composer = new DefaultMutableTreeNode("Beethoven"));
042:                composer.add(style = new DefaultMutableTreeNode("Concertos"));
043:
044:                //style.add(new DefaultMutableTreeNode("No. 1 - C Major"));
045:                style.add(new DefaultMutableTreeNode("No. 2 - B-Flat Major"));
046:                style.add(new DefaultMutableTreeNode("No. 3 - C Minor"));
047:                style.add(new DefaultMutableTreeNode("No. 4 - G Major"));
048:                style.add(new DefaultMutableTreeNode("No. 5 - E-Flat Major"));
049:
050:                composer.add(style = new DefaultMutableTreeNode("Quartets"));
051:                style.add(new DefaultMutableTreeNode("Six String Quartets"));
052:                style.add(new DefaultMutableTreeNode("Three String Quartets"));
053:                style.add(new DefaultMutableTreeNode(
054:                        "Grosse Fugue for String Quartets"));
055:
056:                composer.add(style = new DefaultMutableTreeNode("Sonatas"));
057:                style.add(new DefaultMutableTreeNode("Sonata in A Minor"));
058:                style.add(new DefaultMutableTreeNode("Sonata in F Major"));
059:
060:                composer.add(style = new DefaultMutableTreeNode("Symphonies"));
061:                style.add(new DefaultMutableTreeNode("No. 1 - C Major"));
062:                style.add(new DefaultMutableTreeNode("No. 2 - D Major"));
063:                style.add(new DefaultMutableTreeNode("No. 3 - E-Flat Major"));
064:                style.add(new DefaultMutableTreeNode("No. 4 - B-Flat Major"));
065:                style.add(new DefaultMutableTreeNode("No. 5 - C Minor"));
066:                style.add(new DefaultMutableTreeNode("No. 6 - F Major"));
067:                style.add(new DefaultMutableTreeNode("No. 7 - A Major"));
068:                style.add(new DefaultMutableTreeNode("No. 8 - F Major"));
069:                style.add(new DefaultMutableTreeNode("No. 9 - D Minor"));
070:
071:                // Brahms
072:                catagory.add(composer = new DefaultMutableTreeNode("Brahms"));
073:                composer.add(style = new DefaultMutableTreeNode("Concertos"));
074:                style.add(new DefaultMutableTreeNode("Violin Concerto"));
075:                style.add(new DefaultMutableTreeNode(
076:                        "Double Concerto - A Minor"));
077:                style.add(new DefaultMutableTreeNode(
078:                        "Piano Concerto No. 1 - D Minor"));
079:                style.add(new DefaultMutableTreeNode(
080:                        "Piano Concerto No. 2 - B-Flat Major"));
081:
082:                composer.add(style = new DefaultMutableTreeNode("Quartets"));
083:                style.add(new DefaultMutableTreeNode(
084:                        "Piano Quartet No. 1 - G Minor"));
085:                style.add(new DefaultMutableTreeNode(
086:                        "Piano Quartet No. 2 - A Major"));
087:                style.add(new DefaultMutableTreeNode(
088:                        "Piano Quartet No. 3 - C Minor"));
089:                style.add(new DefaultMutableTreeNode(
090:                        "String Quartet No. 3 - B-Flat Minor"));
091:
092:                composer.add(style = new DefaultMutableTreeNode("Sonatas"));
093:                style.add(new DefaultMutableTreeNode(
094:                        "Two Sonatas for Clarinet - F Minor"));
095:                style.add(new DefaultMutableTreeNode(
096:                        "Two Sonatas for Clarinet - E-Flat Major"));
097:
098:                composer.add(style = new DefaultMutableTreeNode("Symphonies"));
099:                style.add(new DefaultMutableTreeNode("No. 1 - C Minor"));
100:                style.add(new DefaultMutableTreeNode("No. 2 - D Minor"));
101:                style.add(new DefaultMutableTreeNode("No. 3 - F Major"));
102:                style.add(new DefaultMutableTreeNode("No. 4 - E Minor"));
103:
104:                // Mozart
105:                catagory.add(composer = new DefaultMutableTreeNode("Mozart"));
106:                composer.add(style = new DefaultMutableTreeNode("Concertos"));
107:                style.add(new DefaultMutableTreeNode("Piano Concerto No. 12"));
108:                style.add(new DefaultMutableTreeNode("Piano Concerto No. 17"));
109:                style.add(new DefaultMutableTreeNode("Clarinet Concerto"));
110:                style.add(new DefaultMutableTreeNode("Violin Concerto No. 5"));
111:                style.add(new DefaultMutableTreeNode("Violin Concerto No. 4"));
112:
113:                composer.add(style = new DefaultMutableTreeNode("Sonatas"));
114:                style.add(new DefaultMutableTreeNode(
115:                        "String Quintet in G Minor"));
116:                style.add(new DefaultMutableTreeNode("Clarinet Quintet"));
117:                style.add(new DefaultMutableTreeNode("Piano Sonata No. 14"));
118:
119:                composer.add(style = new DefaultMutableTreeNode("Symphonies"));
120:                style.add(new DefaultMutableTreeNode("No. 39"));
121:                style.add(new DefaultMutableTreeNode("No. 40"));
122:                style.add(new DefaultMutableTreeNode("No. 41"));
123:
124:                catagory.add(composer = new DefaultMutableTreeNode("Schubert"));
125:                composer.add(style = new DefaultMutableTreeNode("Quartets"));
126:                style.add(new DefaultMutableTreeNode("No. 1 - D Major"));
127:                style.add(new DefaultMutableTreeNode("No. 2 - C Major"));
128:                style.add(new DefaultMutableTreeNode("No. 3 - B-Flat"));
129:                style
130:                        .add(new DefaultMutableTreeNode(
131:                                "No. 4 - B Major,D Major"));
132:                style.add(new DefaultMutableTreeNode("No. 5 - B-Flat Major"));
133:                style.add(new DefaultMutableTreeNode("No. 6 - D Major"));
134:                style.add(new DefaultMutableTreeNode("No. 7 - D Major"));
135:                style.add(new DefaultMutableTreeNode("No. 8 - B-Flat Major"));
136:                style
137:                        .add(new DefaultMutableTreeNode(
138:                                "No. 9 - G Minor,D Major"));
139:                style.add(new DefaultMutableTreeNode("No. 10 - E-Flat Major"));
140:                style.add(new DefaultMutableTreeNode("No. 11 - E,D"));
141:                style.add(new DefaultMutableTreeNode("No. 12 - C Minor,D"));
142:
143:                composer.add(style = new DefaultMutableTreeNode("Sonatas"));
144:                style
145:                        .add(new DefaultMutableTreeNode(
146:                                "No. 1 - E Major, D Major"));
147:                style
148:                        .add(new DefaultMutableTreeNode(
149:                                "No. 2 - C Major, D Major"));
150:                style
151:                        .add(new DefaultMutableTreeNode(
152:                                "No. 3 - E Major, D Major"));
153:                style
154:                        .add(new DefaultMutableTreeNode(
155:                                "No. 4 - A Minor, D Major"));
156:                style.add(new DefaultMutableTreeNode("No. 6 - D Major"));
157:                style
158:                        .add(new DefaultMutableTreeNode(
159:                                "No. 7 - E Minor, D Major"));
160:                style
161:                        .add(new DefaultMutableTreeNode(
162:                                "No. 9 - B Major, D Major"));
163:
164:                // Jazz
165:                top.add(catagory = new DefaultMutableTreeNode("Jazz"));
166:
167:                // Ayler
168:                catagory.add(composer = new DefaultMutableTreeNode(
169:                        "Albert Ayler"));
170:                composer.add(album = new DefaultMutableTreeNode(
171:                        "My Name is Albert Ayler"));
172:                album.add(new DefaultMutableTreeNode("Bye Bye Blackbird"));
173:                album.add(new DefaultMutableTreeNode("Billie's Bounce"));
174:                album.add(new DefaultMutableTreeNode("Summertime"));
175:                album
176:                        .add(new DefaultMutableTreeNode(
177:                                "On Green Dolphin Street"));
178:                album.add(new DefaultMutableTreeNode("C.T."));
179:
180:                composer.add(album = new DefaultMutableTreeNode(
181:                        "Swing Low Seet Spiritual"));
182:                album.add(new DefaultMutableTreeNode("Goin' Home"));
183:                album.add(new DefaultMutableTreeNode("Old Man River"));
184:                album.add(new DefaultMutableTreeNode(
185:                        "When The Saints Go Marching In"));
186:                album.add(new DefaultMutableTreeNode("Deep River"));
187:                album.add(new DefaultMutableTreeNode("Down By The Riverside"));
188:                album.add(new DefaultMutableTreeNode("Spirits"));
189:                album.add(new DefaultMutableTreeNode("Witches and Devils"));
190:                album.add(new DefaultMutableTreeNode("Holy, Holy"));
191:                album.add(new DefaultMutableTreeNode("Saints"));
192:
193:                composer.add(album = new DefaultMutableTreeNode("Prophesy"));
194:                album.add(new DefaultMutableTreeNode("Spirits"));
195:                album.add(new DefaultMutableTreeNode("Wizard"));
196:                album.add(new DefaultMutableTreeNode("Ghosts"));
197:                album.add(new DefaultMutableTreeNode("Prophecy"));
198:
199:                composer.add(album = new DefaultMutableTreeNode("New Grass"));
200:                album.add(new DefaultMutableTreeNode("Free At Last"));
201:                album.add(new DefaultMutableTreeNode("Everybody's Movin'"));
202:                album.add(new DefaultMutableTreeNode("New Generation"));
203:                album.add(new DefaultMutableTreeNode("Heart Love"));
204:                album.add(new DefaultMutableTreeNode("Sun Watcher"));
205:
206:                // Chet Baker
207:                catagory
208:                        .add(composer = new DefaultMutableTreeNode("Chet Baker"));
209:                composer.add(album = new DefaultMutableTreeNode(
210:                        "Sings and Plays"));
211:                album.add(new DefaultMutableTreeNode("Let's Get Lost"));
212:                album.add(new DefaultMutableTreeNode("This Is Always"));
213:                album.add(new DefaultMutableTreeNode("Long Ago and Far Away"));
214:                album.add(new DefaultMutableTreeNode("I Wish I Knew"));
215:                album.add(new DefaultMutableTreeNode("Daybreak"));
216:                album.add(new DefaultMutableTreeNode("Grey December"));
217:                album.add(new DefaultMutableTreeNode("I Remember You"));
218:
219:                composer.add(album = new DefaultMutableTreeNode(
220:                        "My Funny Valentine"));
221:                album.add(new DefaultMutableTreeNode("My Funny Valentine"));
222:                album
223:                        .add(new DefaultMutableTreeNode(
224:                                "Someone To Watch Over Me"));
225:                album.add(new DefaultMutableTreeNode("Moonlight Becomes You"));
226:                album.add(new DefaultMutableTreeNode("I'm Glad There is You"));
227:                album.add(new DefaultMutableTreeNode("This is Always"));
228:                album.add(new DefaultMutableTreeNode("Time After Time"));
229:                album.add(new DefaultMutableTreeNode("Sweet Lorraine"));
230:                album.add(new DefaultMutableTreeNode("It's Always You"));
231:                album.add(new DefaultMutableTreeNode("Moon Love"));
232:                album.add(new DefaultMutableTreeNode("Like Someone In Love"));
233:                album.add(new DefaultMutableTreeNode(
234:                        "I've Never Been In Love Before"));
235:                album.add(new DefaultMutableTreeNode("Isn't it Romantic"));
236:                album.add(new DefaultMutableTreeNode(
237:                        "I Fall In Love Too Easily"));
238:
239:                composer
240:                        .add(album = new DefaultMutableTreeNode("Grey December"));
241:                album.add(new DefaultMutableTreeNode("Grey December"));
242:                album.add(new DefaultMutableTreeNode("I Wish I Knew"));
243:                album
244:                        .add(new DefaultMutableTreeNode(
245:                                "Someone To Watch Over Me"));
246:                album.add(new DefaultMutableTreeNode("Headline"));
247:                album.add(new DefaultMutableTreeNode("Bockhanal"));
248:                album.add(new DefaultMutableTreeNode("A Dandy Line"));
249:                album.add(new DefaultMutableTreeNode("Pro Defunctus"));
250:                album.add(new DefaultMutableTreeNode("Little Old Lady"));
251:                album.add(new DefaultMutableTreeNode("Goodbye"));
252:
253:                composer.add(album = new DefaultMutableTreeNode("The Route"));
254:                album.add(new DefaultMutableTreeNode("Tynan Time"));
255:                album.add(new DefaultMutableTreeNode("The Route"));
256:                album.add(new DefaultMutableTreeNode("Minor Yours"));
257:                album.add(new DefaultMutableTreeNode("Little Girl"));
258:                album.add(new DefaultMutableTreeNode("Ol' Croix"));
259:                album.add(new DefaultMutableTreeNode("The Great Lie"));
260:                album.add(new DefaultMutableTreeNode("Sweet Lorrain"));
261:                album.add(new DefaultMutableTreeNode("If I Should Lose You"));
262:
263:                return new DefaultTreeModel(top);
264:            }
265:
266:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.