Java Doc for Tree.java in  » Web-Framework » ThinWire » thinwire » ui » 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 » Web Framework » ThinWire » thinwire.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


thinwire.ui.Tree

Tree
public class Tree extends AbstractHierarchyComponent (Code)
A component that displays a set of hierarchical data as an outline.

Example:

 Dialog treeFrame = new Dialog("Tree Test");
 treeFrame.setBounds(25, 25, 400, 350);
 final Label label = new Label("???????");
 label.setBounds(225, 25, 150, 20);
 Tree tree = new Tree();
 tree.setBounds(10, 10, 200, 300);
 Tree.Item root = tree.getRootItem();
 root.setText("System Root");
 root.setImage(SCORE_IMAGE);
 tree.setRootItemVisible(false);
 root.setExpanded(false);
 Tree.Item readme = new Tree.Item("readme", FILE_IMAGE);
 root.getChildren().add(readme);
 Tree.Item bill = new Tree.Item("bill", FOLDER_IMAGE);
 root.getChildren().add(bill);
 Tree.Item startup = new Tree.Item("startup", FILE_IMAGE);
 bill.getChildren().add(startup);
 Tree.Item billFiles = new Tree.Item("files", FOLDER_IMAGE);
 bill.getChildren().add(billFiles);
 Tree.Item billFilesAddress = new Tree.Item("Address List", FILE_IMAGE);
 billFiles.getChildren().add(billFilesAddress);
 Tree.Item billFilesPhone = new Tree.Item("Phone List", FILE_IMAGE);
 billFiles.getChildren().add(billFilesPhone);
 bill.setExpanded(true);
 billFiles.setExpanded(true);
 Tree.Item billMusic = new Tree.Item("music", FOLDER_IMAGE);
 bill.getChildren().add(billMusic);
 Tree.Item billMusicSong1 = new Tree.Item("song1.mp3", FILE_IMAGE);
 billMusic.getChildren().add(billMusicSong1);
 Tree.Item billPic = new Tree.Item("pictures", FOLDER_IMAGE);
 bill.getChildren().add(billPic);
 Tree.Item billPicHome = new Tree.Item("home", FOLDER_IMAGE);
 billPic.getChildren().add(billPicHome);
 Tree.Item billPicS = new Tree.Item("s.jpg", PICTURE_IMAGE);
 billPicHome.getChildren().add(billPicS);
 Tree.Item billPicP = new Tree.Item("p.jpg", PICTURE_IMAGE);
 billPicHome.getChildren().add(billPicP);
 Tree.Item billPicM = new Tree.Item("m.jpg", PICTURE_IMAGE);
 billPicHome.getChildren().add(billPicM);
 Tree.Item jim = new Tree.Item("jim", FOLDER_IMAGE);
 root.getChildren().add(jim);
 Tree.Item jimStartup = new Tree.Item("startup", FILE_IMAGE);
 jim.getChildren().add(jimStartup);
 Tree.Item copyright = new Tree.Item("copyright", FILE_IMAGE);
 root.getChildren().add(copyright);
 tree.addPropertyChangeListener(Tree.Item.PROPERTY_SELECTED, new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent ev) {
 label.setText(((Tree.Item) ev.getSource()).getText());
 }
 });
 treeFrame.getChildren().add(tree);
 treeFrame.getChildren().add(label);
 treeFrame.setVisible(true);
 

Keyboard Navigation:
KEY RESPONSE NOTE
Space Fires PropertyChangeEvent( propertyName = Tree.Item.PROPERTY_CHECKED ) Only if the component has focus.


author:
   Joshua J. Gertzen

Inner Class :final public static class Item extends AbstractHierarchyComponent.Item

Field Summary
final public static  StringPROPERTY_ROOT_ITEM_VISIBLE
    

Constructor Summary
public  Tree()
     Constructs a new Tree.

Method Summary
public  voidfireAction(ActionEvent ev)
    
public  ItemgetPriorSelectedItem()
     Gets the prior selected item of Tree.
public  ItemgetSelectedItem()
     Get the selected item of Tree.
public  booleanisRootItemVisible()
     Get the rootItemVisible state of the Tree.
 voidremovingItem(Tree.Item item)
    
public  voidsetRootItemVisible(boolean rootItemVisible)
     Set the rootItemVisible state of the Tree.

Field Detail
PROPERTY_ROOT_ITEM_VISIBLE
final public static String PROPERTY_ROOT_ITEM_VISIBLE(Code)




Constructor Detail
Tree
public Tree()(Code)
Constructs a new Tree.




Method Detail
fireAction
public void fireAction(ActionEvent ev)(Code)



getPriorSelectedItem
public Item getPriorSelectedItem()(Code)
Gets the prior selected item of Tree. the prior selected item of Tree.



getSelectedItem
public Item getSelectedItem()(Code)
Get the selected item of Tree. the selected item of Tree.



isRootItemVisible
public boolean isRootItemVisible()(Code)
Get the rootItemVisible state of the Tree. true if the root item is visible, false otherwise.



removingItem
void removingItem(Tree.Item item)(Code)



setRootItemVisible
public void setRootItemVisible(boolean rootItemVisible)(Code)
Set the rootItemVisible state of the Tree.
Parameters:
  rootItemVisible - true if you want the root item of the tree to be visible, false otherwise.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.