Java Doc for TreeView.java in  » Portal » Open-Portal » graphical » 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 » Portal » Open Portal » graphical 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


graphical.TreeView

All known Subclasses:   components.TaxonomyTreeView,  components.SchemaTreeView,
TreeView
public class TreeView extends View implements Target,TextFieldOwner(Code)
TreeView.

Using the BinaryTree enumeration as it's spine, this widget displays information in a file mangerish fashion.

It is important to note that a selected item in the TreeView does not correspond directly to the current position in the BinaryTree. The reason for this is to allow multiple TreeViews to view the same BinaryTree.

The "look" is configurable by passing appropriate images to the constructors.

Open Issues

  • Null trees not handled. Some code stubbed in, but basically on the floor.


Field Summary
final public static  intMACFEEL
    
final public static  intMACLOOK
    
final public static  intNSFEEL
    
final public static  intNSLOOK
    
protected  BinaryTreebinaryTree
    
public  ButtoncancelBtn
    
public  ButtondelBtn
    
public  DragListViewlistView
    
public  ButtonnewChildBtn
    
public  ButtonnewPeerBtn
    
public  ButtonsaveBtn
    
public  ScrollGroupscrollGroup
    
protected  TextFieldtextField
    
protected  TextFieldOwnertextFieldOwner
    
protected  TreeViewGrouptreeViewGroup
    

Constructor Summary
public  TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, String nameSpace, String nameDocumentSel, String nameDocument, String nameFolderSel, String nameFolder, String nameBranchOpenSel, String nameBranchOpen, String nameBranchClosedSel, String nameBranchClosed)
     Construct instance of TreeView.
public  TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, int arraySpace, int arrayDocumentSel, int arrayDocument, int arrayFolderSel, int arrayFolder, int arrayBranchOpenSel, int arrayBranchOpen, int arrayBranchClosedSel, int arrayBranchClosed, Dimension imageSize, int pixelCount)
     Construct instance of TreeView.

Method Summary
public  voidbuttonEnablement()
    
public  voidcancelBtnPress()
    
protected  voidchildReorganize()
    
protected  voidchildReorganize(BTListItem listItem)
    
public  voidclearChanged()
    
public  booleanclickCommand()
    
public  voidcompleteEditing()
    
public  voiddeepSix()
    
public  voiddelBtnPress()
    
public  ImagedetermineImage(BTreeNode btn, BTListItem listItem, boolean selected)
    
public  ImagedetermineImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent)
    
public  ImagedetermineMacImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent)
    
public  ImagedetermineNSImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent)
    
public  voiddoReimaging()
    
public  voiddoubleClickCommand()
    
public  booleandupePeerNamesAllowed()
     Current status of whether duplicate peer names are allowed.
public  booleaneditable()
     Whether the TreeView instance is an editable one or not.
public  booleanemptyAllowed()
     Current value of empty allowability.
public  voidenableTextEdit(boolean b)
     Turn off the floating TextField editor.
public  BinaryTreegetBinaryTree()
     The current binary tree.
public  BTreeNodegetBinaryTreeRooted()
     Get the node where the binary tree is rooted for this view.
public  booleangetChanged()
    
public  BTListItemgetCurrentListItem()
     Get the current ListItem.
public  TreeViewGroupgetTreeViewGroup()
    
public  BTListItemgetUnaryParentItem(BTListItem listItem)
     For the target item, gets the unary parent.
public  voidhideEditButtons()
     Hides the default edit buttons.
public  voidnewChild(BTreeNode newBtn)
    
public  voidnewChildBtnPress()
    
public  voidnewPeer(BTreeNode newBtn)
    
public  voidnewPeerBtnPress()
    
public  voidnewWindow()
    
public  booleannotifyOfTFEvents(Target target)
     Notify target of key event processing in the floating TextField editor.
protected  voidopenAndClose()
     If the selected item is open it is closed, if closed it is opened.
protected  voidopenAndClose(BTListItem listItem)
     If the passed item is open it is closed, if closed it is opened.
public  TextFieldOwnerowner()
    
public  voidperformCommand(String command, Object arg)
    
public  voidsaveBtnPress()
    
public  voidselectAndDraw()
     Badly named, determines current images and forces redraw.
public  voidselectAndDraw(BTListItem listItem)
     Badly named, determines current images for target and forces redraw.
public  voidsetBinaryTree(BinaryTree binaryTree)
    
public  voidsetBinaryTree(BTreeNode btRooted)
    
public  voidsetBinaryTree(BinaryTree binaryTree, BTreeNode btRooted)
     Note that if btRooted is not found in the tree, the tree is silently assumed to be rooted at the top.
public  voidsetCurrentListItem(BTListItem li)
     Risky, provided to nullify currentListItem during a delete.
public  voidsetDragDestinationPolicy(int dragDestinationPolicy)
    
public  voidsetDragDestinationTarget(Target dragDestinationTarget)
    
public  voidsetDragDroppedNotificationCommand(String cmd)
     Drag dropped notification command, sent when Category dropped.
public  voidsetDragDroppedNotificationTarget(Target target)
     Drag dropped notification target, sent when Category dropped.
public  voidsetDragSourcePolicy(int dragSourcePolicy)
    
public  voidsetDupePeerNamesAllowed(boolean dupePeerNamesAllowed)
     Controls whether duplicate peer names are allowed.
public  voidsetEditListItem()
    
public  voidsetEditListItem(BTListItem li)
    
public  voidsetEditableRoot(boolean editableRoot)
     Set whether the root is editable or not.
public  voidsetEmptyAllowed(boolean emptyAllowed)
     Controls whether a delete of the root leaves you with an empty list or a "new" root.
public  voidsetFeel(int feel)
    
public  voidsetLauncher(Target target, String command)
    
public  voidsetLook(int look)
    
public  voidsetOwner(TextFieldOwner object)
    
public  voidsetTreeViewGroup(TreeViewGroup treeViewGroup)
    
public  voidtextEditingDidBegin(TextField textfield)
    
public  voidtextEditingDidEnd(TextField textfield, int endCondition, boolean contentsChanged)
    
public  booleantextEditingWillEnd(TextField tf, int endCondition, boolean contentsChanged)
    
public  voidtextFieldSizer()
    
public  voidtextWasModified(TextField textfield)
    
public  ViewviewForMouse(int x, int y)
    

Field Detail
MACFEEL
final public static int MACFEEL(Code)



MACLOOK
final public static int MACLOOK(Code)



NSFEEL
final public static int NSFEEL(Code)



NSLOOK
final public static int NSLOOK(Code)



binaryTree
protected BinaryTree binaryTree(Code)



cancelBtn
public Button cancelBtn(Code)



delBtn
public Button delBtn(Code)



listView
public DragListView listView(Code)



newChildBtn
public Button newChildBtn(Code)



newPeerBtn
public Button newPeerBtn(Code)



saveBtn
public Button saveBtn(Code)



scrollGroup
public ScrollGroup scrollGroup(Code)



textField
protected TextField textField(Code)



textFieldOwner
protected TextFieldOwner textFieldOwner(Code)



treeViewGroup
protected TreeViewGroup treeViewGroup(Code)




Constructor Detail
TreeView
public TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, String nameSpace, String nameDocumentSel, String nameDocument, String nameFolderSel, String nameFolder, String nameBranchOpenSel, String nameBranchOpen, String nameBranchClosedSel, String nameBranchClosed)(Code)
Construct instance of TreeView. If the passed binary tree is null, a new one is created. This constructor takes gifs as names and acquires them.
Parameters:
  binaryTree - passed binary tree
Parameters:
  editable - editable or not
Parameters:
  x - x
Parameters:
  y - y
Parameters:
  w - width
Parameters:
  h - height
Parameters:
  dragSourcePolicy - drag source policy
Parameters:
  dragDestinationPolicy - drag destination policy
Parameters:
  sizeForWindow - size for containment in a window or a view
Parameters:
  nameSpace - url for space image
Parameters:
  nameDocumentSel - url for selected document image
Parameters:
  nameDocument - url for document image
Parameters:
  nameFolderSel - url for selected folder image
Parameters:
  nameFolder - url for folder image
Parameters:
  nameBranchOpenSel - url for selected branch open image
Parameters:
  nameBranchOpen - url for branch open image
Parameters:
  nameBranchClosedSel - url for selected branch closed image
Parameters:
  nameBranchClosed - url for branch closed image



TreeView
public TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, int arraySpace, int arrayDocumentSel, int arrayDocument, int arrayFolderSel, int arrayFolder, int arrayBranchOpenSel, int arrayBranchOpen, int arrayBranchClosedSel, int arrayBranchClosed, Dimension imageSize, int pixelCount)(Code)
Construct instance of TreeView. If the passed binary tree is null, a new one is created.
Parameters:
  binaryTree - passed binary tree
Parameters:
  editable - editable or not
Parameters:
  x - x
Parameters:
  y - y
Parameters:
  w - width
Parameters:
  h - height
Parameters:
  dragSourcePolicy - drag source policy
Parameters:
  dragDestinationPolicy - drag destination policy
Parameters:
  sizeForWindow - size for containment in a window or a view
Parameters:
  arraySpace - pixel array for space
Parameters:
  arrayDocumentSel - pixel array for selected document
Parameters:
  arrayDocument - pixel array for document
Parameters:
  arrayFolderSel - pixel array for selected folder
Parameters:
  arrayFolder - pixel array for folder
Parameters:
  arrayBranchOpenSel - pixel array for selected branch open
Parameters:
  arrayBranchOpen - pixel array for branch open
Parameters:
  arrayBranchClosedSel - pixel array for selected branch closed
Parameters:
  arrayBranchClosed - pixel array for branch closed
Parameters:
  imageSize - the expected dimension for the tree images
Parameters:
  pixelCount - the expected pixel count for the tree images




Method Detail
buttonEnablement
public void buttonEnablement()(Code)



cancelBtnPress
public void cancelBtnPress()(Code)
stub to override



childReorganize
protected void childReorganize()(Code)



childReorganize
protected void childReorganize(BTListItem listItem)(Code)



clearChanged
public void clearChanged()(Code)



clickCommand
public boolean clickCommand()(Code)



completeEditing
public void completeEditing()(Code)



deepSix
public void deepSix()(Code)



delBtnPress
public void delBtnPress()(Code)



determineImage
public Image determineImage(BTreeNode btn, BTListItem listItem, boolean selected)(Code)



determineImage
public Image determineImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent)(Code)



determineMacImage
public Image determineMacImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent)(Code)



determineNSImage
public Image determineNSImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent)(Code)



doReimaging
public void doReimaging()(Code)



doubleClickCommand
public void doubleClickCommand()(Code)



dupePeerNamesAllowed
public boolean dupePeerNamesAllowed()(Code)
Current status of whether duplicate peer names are allowed.



editable
public boolean editable()(Code)
Whether the TreeView instance is an editable one or not.



emptyAllowed
public boolean emptyAllowed()(Code)
Current value of empty allowability.



enableTextEdit
public void enableTextEdit(boolean b)(Code)
Turn off the floating TextField editor.



getBinaryTree
public BinaryTree getBinaryTree()(Code)
The current binary tree.



getBinaryTreeRooted
public BTreeNode getBinaryTreeRooted()(Code)
Get the node where the binary tree is rooted for this view.



getChanged
public boolean getChanged()(Code)



getCurrentListItem
public BTListItem getCurrentListItem()(Code)
Get the current ListItem. This isn't quite the same as the currently selected ListItem because some actions need to occur during transitions from the previously selected ListItem and the currently selected ListItem.



getTreeViewGroup
public TreeViewGroup getTreeViewGroup()(Code)



getUnaryParentItem
public BTListItem getUnaryParentItem(BTListItem listItem)(Code)
For the target item, gets the unary parent.



hideEditButtons
public void hideEditButtons()(Code)
Hides the default edit buttons. Typically used by windows supplying their own menus and calling the button action methods directly. Expected to be done as part of construction rather than during display, so no setDirty() and no showEditButtons().



newChild
public void newChild(BTreeNode newBtn)(Code)



newChildBtnPress
public void newChildBtnPress()(Code)



newPeer
public void newPeer(BTreeNode newBtn)(Code)



newPeerBtnPress
public void newPeerBtnPress()(Code)



newWindow
public void newWindow()(Code)



notifyOfTFEvents
public boolean notifyOfTFEvents(Target target)(Code)
Notify target of key event processing in the floating TextField editor. Returns false if the TextField is null.
Parameters:
  target - target



openAndClose
protected void openAndClose()(Code)
If the selected item is open it is closed, if closed it is opened. Done twice (when open), forces the child display to be updated which is useful when the children are modified.



openAndClose
protected void openAndClose(BTListItem listItem)(Code)
If the passed item is open it is closed, if closed it is opened. Done twice (when open), forces the child display to be updated which is useful when the children are modified.



owner
public TextFieldOwner owner()(Code)



performCommand
public void performCommand(String command, Object arg)(Code)



saveBtnPress
public void saveBtnPress()(Code)
stub to override



selectAndDraw
public void selectAndDraw()(Code)
Badly named, determines current images and forces redraw. No selection occurs.



selectAndDraw
public void selectAndDraw(BTListItem listItem)(Code)
Badly named, determines current images for target and forces redraw. No selection occurs.
Parameters:
  listItem - target ListItem



setBinaryTree
public void setBinaryTree(BinaryTree binaryTree)(Code)



setBinaryTree
public void setBinaryTree(BTreeNode btRooted)(Code)



setBinaryTree
public void setBinaryTree(BinaryTree binaryTree, BTreeNode btRooted)(Code)
Note that if btRooted is not found in the tree, the tree is silently assumed to be rooted at the top. Behaviour may be changed later to throw an exception. If btRooted is null, the top of the tree is also assumed.



setCurrentListItem
public void setCurrentListItem(BTListItem li)(Code)
Risky, provided to nullify currentListItem during a delete. Shouldn't be used otherwise.



setDragDestinationPolicy
public void setDragDestinationPolicy(int dragDestinationPolicy)(Code)



setDragDestinationTarget
public void setDragDestinationTarget(Target dragDestinationTarget)(Code)



setDragDroppedNotificationCommand
public void setDragDroppedNotificationCommand(String cmd)(Code)
Drag dropped notification command, sent when Category dropped.



setDragDroppedNotificationTarget
public void setDragDroppedNotificationTarget(Target target)(Code)
Drag dropped notification target, sent when Category dropped.



setDragSourcePolicy
public void setDragSourcePolicy(int dragSourcePolicy)(Code)



setDupePeerNamesAllowed
public void setDupePeerNamesAllowed(boolean dupePeerNamesAllowed)(Code)
Controls whether duplicate peer names are allowed. Does not unduplicate if mistakes have already been made. Default is true.



setEditListItem
public void setEditListItem()(Code)



setEditListItem
public void setEditListItem(BTListItem li)(Code)



setEditableRoot
public void setEditableRoot(boolean editableRoot)(Code)
Set whether the root is editable or not.



setEmptyAllowed
public void setEmptyAllowed(boolean emptyAllowed)(Code)
Controls whether a delete of the root leaves you with an empty list or a "new" root. Default is true.



setFeel
public void setFeel(int feel) throws IllegalArgumentException(Code)



setLauncher
public void setLauncher(Target target, String command)(Code)



setLook
public void setLook(int look) throws IllegalArgumentException(Code)



setOwner
public void setOwner(TextFieldOwner object)(Code)



setTreeViewGroup
public void setTreeViewGroup(TreeViewGroup treeViewGroup)(Code)



textEditingDidBegin
public void textEditingDidBegin(TextField textfield)(Code)



textEditingDidEnd
public void textEditingDidEnd(TextField textfield, int endCondition, boolean contentsChanged)(Code)



textEditingWillEnd
public boolean textEditingWillEnd(TextField tf, int endCondition, boolean contentsChanged)(Code)



textFieldSizer
public void textFieldSizer()(Code)



textWasModified
public void textWasModified(TextField textfield)(Code)



viewForMouse
public View viewForMouse(int x, int y)(Code)



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