Java Doc for LayoutTree.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » internal » 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 » IDE Eclipse » ui workbench » org.eclipse.ui.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.internal.LayoutTree

All known Subclasses:   org.eclipse.ui.internal.LayoutTreeNode,
LayoutTree
public class LayoutTree implements ISizeProvider(Code)
Implementation of a tree where the node is allways a sash and it allways has two chidren. If a children is removed the sash, ie the node, is removed as well and its other children placed on its parent.


Field Summary
public static  intmaxCacheHits
    
public static  intmaxCacheMisses
    
public static  intminCacheHits
    
public static  intminCacheMisses
    
 LayoutTreeNodeparent
    
 LayoutPartpart
    

Constructor Summary
public  LayoutTree(LayoutPart part)
     Initialize this tree with its part.

Method Summary
public static  intadd(int a, int b)
     Adds two positive integers.
public static  voidassertValidSize(int toCheck)
     Asserts that toCheck is a positive integer less than INFINITE / 2 or equal to INFINITE.
final public  intcomputeMaximumSize(boolean width, int availablePerpendicular)
    
final public  intcomputeMinimumSize(boolean width, int availablePerpendicular)
     Returns the minimum size for this subtree.
final public  intcomputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)
     Computes the preferred size for this object.
public  LayoutPartcomputeRelation(ArrayList relations)
     Add the relation ship between the children in the list and returns the left children.
public  voidcreateControl(Composite parent)
     Creates SWT controls owned by the LayoutTree (ie: the sashes).
public  voiddescribeLayout(StringBuffer buf)
     Writes a description of the layout to the given string buffer. This is used for drag-drop test suites to determine if two layouts are the same.
public  voiddisposeSashes()
    
protected  intdoComputeMaximumSize(boolean width, int availablePerpendicular)
    
public  intdoComputeMinimumSize(boolean width, int availablePerpendicular)
    
protected  intdoComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)
    
protected  intdoGetSizeFlags(boolean width)
     Returns the size flags for this tree.
protected  voiddoSetBounds(Rectangle bounds)
     Resize the parts on this tree to fit in bounds.
public  LayoutTreefind(LayoutPart child)
     Find a LayoutPart in the tree and return its sub-tree.
public  LayoutPartfindBottomRight()
     Find the part that is in the bottom rigth possition.
public  LayoutPartfindPart(Point toFind)
    
public  LayoutTreeNodefindSash(LayoutPartSash sash)
     Find a sash in the tree and return its sub-tree.
public  voidfindSashes(PartPane.Sashes sashes)
    
final public  voidflushCache()
     Flushes all cached information about this node and all of its ancestors.
public  voidflushChildren()
     Flushes all cached information about this node and all of its children.
public  voidflushNode()
     Called to flush any cached information in this tree and its parents.
final public  RectanglegetBounds()
     Return the bounds of this tree which is the rectangle that contains all Controls in this tree.
public  LayoutTreeNodegetParent()
     Returns the parent of this tree or null if it is the root.
final public  intgetSizeFlags(boolean width)
    
final public  booleanhasSizeFlag(boolean width, int flag)
     This is a shorthand method that checks if the tree contains the given size flag.
public  LayoutTreeinsert(LayoutPart child, boolean left, LayoutPartSash sash, LayoutPart relative)
     Inserts a new child on the tree.
public  booleanisCompressible()
     Returns true if this tree can be compressed and expanded.
public  booleanisVisible()
     Returns true if this tree has visible parts otherwise returns false.
public static  voidprintCacheStatistics()
     For use in benchmarks and test suites only.
public  voidrecomputeRatio()
     Recompute the ratios in this tree.
public  LayoutTreeremove(LayoutPart child)
     Find a child in the tree and remove it and its parent.
final public  voidsetBounds(Rectangle bounds)
     Sets the bounds of this node.
 voidsetParent(LayoutTreeNode parent)
     Set the parent of this tree.
 voidsetPart(LayoutPart part)
    
public static  intsubtract(int a, int b)
     Subtracts two integers.
public  StringtoString()
     Returns a string representation of this object.

Field Detail
maxCacheHits
public static int maxCacheHits(Code)



maxCacheMisses
public static int maxCacheMisses(Code)



minCacheHits
public static int minCacheHits(Code)



minCacheMisses
public static int minCacheMisses(Code)



parent
LayoutTreeNode parent(Code)



part
LayoutPart part(Code)




Constructor Detail
LayoutTree
public LayoutTree(LayoutPart part)(Code)
Initialize this tree with its part.




Method Detail
add
public static int add(int a, int b)(Code)
Adds two positive integers. Treates INFINITE as positive infinity.
Parameters:
  a - a positive integer
Parameters:
  b - a positive integer a + b, or INFINITE if a or b are positive infinity
since:
   3.1



assertValidSize
public static void assertValidSize(int toCheck)(Code)
Asserts that toCheck is a positive integer less than INFINITE / 2 or equal to INFINITE. Many of the methods of this class use positive integers as sizes, with INFINITE indicating positive infinity. This picks up accidental addition or subtraction from infinity.
Parameters:
  toCheck - integer to validate
since:
   3.1



computeMaximumSize
final public int computeMaximumSize(boolean width, int availablePerpendicular)(Code)



computeMinimumSize
final public int computeMinimumSize(boolean width, int availablePerpendicular)(Code)
Returns the minimum size for this subtree. Equivalent to calling computePreferredSize(width, INFINITE, availablePerpendicular, 0). Returns a cached value if possible or defers to doComputeMinimumSize otherwise. Subclasses should overload doComputeMinimumSize if they want to specialize the return value.
Parameters:
  width - true iff computing the minimum width, false iff computing the minimum height
Parameters:
  availablePerpendicular - available space (pixels) perpendicular to the dimension being computed. This is a height when computing a width, or a width when computing a height.
See Also:   LayoutPart.computePreferredSize(booleanintintint)



computePreferredSize
final public int computePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)(Code)
Computes the preferred size for this object. The interpretation of the result depends on the flags returned by getSizeFlags(). If the caller is looking for a maximum or minimum size, this delegates to computeMinimumSize or computeMaximumSize in order to benefit from caching optimizations. Otherwise, it delegates to doComputePreferredSize. Subclasses should overload one of doComputeMinimumSize, doComputeMaximumSize, or doComputePreferredSize to specialize the return value.
See Also:   LayoutPart.computePreferredSize(booleanintintint)



computeRelation
public LayoutPart computeRelation(ArrayList relations)(Code)
Add the relation ship between the children in the list and returns the left children.



createControl
public void createControl(Composite parent)(Code)
Creates SWT controls owned by the LayoutTree (ie: the sashes). Does not affect the LayoutParts that are being arranged by the LayoutTree.
Parameters:
  parent -
since:
   3.1



describeLayout
public void describeLayout(StringBuffer buf)(Code)
Writes a description of the layout to the given string buffer. This is used for drag-drop test suites to determine if two layouts are the same. Like a hash code, the description should compare as equal iff the layouts are the same. However, it should be user-readable in order to help debug failed tests. Although these are english readable strings, they should not be translated or equality tests will fail.

This is only intended for use by test suites.


Parameters:
  buf -



disposeSashes
public void disposeSashes()(Code)
Dispose all Sashs in this tree



doComputeMaximumSize
protected int doComputeMaximumSize(boolean width, int availablePerpendicular)(Code)



doComputeMinimumSize
public int doComputeMinimumSize(boolean width, int availablePerpendicular)(Code)



doComputePreferredSize
protected int doComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)(Code)
Subclasses should overload this method instead of computePreferredSize(boolean, int, int, int)
See Also:   org.eclipse.ui.presentations.StackPresentation.computePreferredSize(booleanintintint)
since:
   3.1



doGetSizeFlags
protected int doGetSizeFlags(boolean width)(Code)
Returns the size flags for this tree.
See Also:   org.eclipse.ui.presentations.StackPresentation.getSizeFlags(boolean)
Parameters:
  b - indicates whether the caller wants the flags for computing widths (=true) or heights (=false) a bitwise combiniation of flags with the same meaning as StackPresentation.getSizeFlags(boolean)



doSetBounds
protected void doSetBounds(Rectangle bounds)(Code)
Resize the parts on this tree to fit in bounds.



find
public LayoutTree find(LayoutPart child)(Code)
Find a LayoutPart in the tree and return its sub-tree. Returns null if the child is not found.



findBottomRight
public LayoutPart findBottomRight()(Code)
Find the part that is in the bottom rigth possition.



findPart
public LayoutPart findPart(Point toFind)(Code)
Locates the part that intersects the given point
Parameters:
  toFind -



findSash
public LayoutTreeNode findSash(LayoutPartSash sash)(Code)
Find a sash in the tree and return its sub-tree. Returns null if the sash is not found.



findSashes
public void findSashes(PartPane.Sashes sashes)(Code)
Find the Left,Right,Top and Botton sashes around this tree and set them in sashes



flushCache
final public void flushCache()(Code)
Flushes all cached information about this node and all of its ancestors. This should be called when a single child changes.
since:
   3.1



flushChildren
public void flushChildren()(Code)
Flushes all cached information about this node and all of its children. This should be called if something may have caused all children to become out of synch with their cached information (for example, if a lot of changes may have happened without calling flushCache after each change)
since:
   3.1



flushNode
public void flushNode()(Code)
Called to flush any cached information in this tree and its parents.



getBounds
final public Rectangle getBounds()(Code)
Return the bounds of this tree which is the rectangle that contains all Controls in this tree.



getParent
public LayoutTreeNode getParent()(Code)
Returns the parent of this tree or null if it is the root.



getSizeFlags
final public int getSizeFlags(boolean width)(Code)



hasSizeFlag
final public boolean hasSizeFlag(boolean width, int flag)(Code)
This is a shorthand method that checks if the tree contains the given size flag. For example, hasSizeFlag(false, SWT.MIN) returns true iff the receiver enforces a minimum height, or hasSizeFlag(true, SWT.WRAP) returns true iff the receiver needs to know its height when computing its preferred width.
Parameters:
  vertical -
since:
   3.1



insert
public LayoutTree insert(LayoutPart child, boolean left, LayoutPartSash sash, LayoutPart relative)(Code)
Inserts a new child on the tree. The child will be placed beside the relative child. Returns the new root of the tree.



isCompressible
public boolean isCompressible()(Code)
Returns true if this tree can be compressed and expanded. true if springy



isVisible
public boolean isVisible()(Code)
Returns true if this tree has visible parts otherwise returns false.



printCacheStatistics
public static void printCacheStatistics()(Code)
For use in benchmarks and test suites only. Displays cache utilization statistics for all LayoutTree instances.
since:
   3.1



recomputeRatio
public void recomputeRatio()(Code)
Recompute the ratios in this tree.



remove
public LayoutTree remove(LayoutPart child)(Code)
Find a child in the tree and remove it and its parent. The other child of its parent is placed on the parent's parent. Returns the new root of the tree.



setBounds
final public void setBounds(Rectangle bounds)(Code)
Sets the bounds of this node. If the bounds have changed or any children have changed then the children will be recursively layed out. This implementation filters out redundant calls and delegates to doSetBounds to layout the children. Subclasses should overload doSetBounds to lay out their children.
Parameters:
  bounds - new bounds of the tree



setParent
void setParent(LayoutTreeNode parent)(Code)
Set the parent of this tree.



setPart
void setPart(LayoutPart part)(Code)
Set the part of this leaf



subtract
public static int subtract(int a, int b)(Code)
Subtracts two integers. If a is INFINITE, this is treated as positive infinity.
Parameters:
  a - a positive integer or INFINITE indicating positive infinity
Parameters:
  b - a positive integer (may not be INFINITE) a - b, or INFINITE if a == INFINITE
since:
   3.1



toString
public String toString()(Code)
Returns a string representation of this object.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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