| java.lang.Object org.eclipse.ui.internal.LayoutTree org.eclipse.ui.internal.LayoutTreeNode
LayoutTreeNode | public class LayoutTreeNode extends LayoutTree (Code) | | Implementation of a tree node. The node represents a
sash and it allways has two children.
|
Inner Class :static class ChildSizes | |
Method Summary | |
ChildSizes | computeChildSizes(int width, int height, int left, int right, int preferredWidth) Computes the pixel sizes of this node's children, given the available
space for this node. | public LayoutPart | computeRelation(ArrayList relations) Add the relation ship between the children in the list
and returns the left children. | public void | createControl(Composite parent) | public void | describeLayout(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 void | disposeSashes() | public int | doComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel) | protected int | doGetSizeFlags(boolean width) | public void | doSetBounds(Rectangle bounds) Resize the parts on this tree to fit in bounds . | public LayoutTree | find(LayoutPart child) Find a LayoutPart in the tree and return its sub-tree. | public LayoutPart | findBottomRight() Find the part that is in the bottom right position. | public LayoutTreeNode | findCommonParent(LayoutPart child1, LayoutPart child2) Go up in the tree finding a parent that is common of both children. | LayoutTreeNode | findCommonParent(LayoutPart child1, LayoutPart child2, boolean foundChild1, boolean foundChild2) Go up in the tree finding a parent that is common of both children. | public LayoutPart | findPart(Point toFind) | public LayoutTreeNode | findSash(LayoutPartSash sash) Find a sash in the tree and return its sub-tree. | void | findSashes(LayoutTree child, PartPane.Sashes sashes) Sets the elements in the array of sashes with the
Left,Rigth,Top and Botton sashes. | public void | flushChildren() | LayoutTree | getChild(boolean left) | public int | getCompressionBias() Returns 0 if there is no bias. | public LayoutPartSash | getSash() Returns the sash of this node. | public boolean | isCompressible() | boolean | isLeftChild(LayoutTree toTest) | public boolean | isVisible() Returns true if this tree has visible parts otherwise returns false. | LayoutTree | remove(LayoutTree child) | void | replaceChild(LayoutTree oldChild, LayoutTree newChild) Replace a child with a new child and sets the new child's parent. | public boolean | sameDirection(boolean isVertical, LayoutTreeNode subTree) | void | setChild(boolean left, LayoutPart part) | void | setChild(boolean left, LayoutTree child) | public String | toString() Returns a string representation of this object. |
SASH_WIDTH | final static int SASH_WIDTH(Code) | | |
computeChildSizes | ChildSizes computeChildSizes(int width, int height, int left, int right, int preferredWidth)(Code) | | Computes the pixel sizes of this node's children, given the available
space for this node. Note that "width" and "height" actually refer
to the distance perpendicular and parallel to the sash respectively.
That is, their meaning is reversed when computing a horizontal sash.
Parameters: width - the pixel width of a vertical node, or the pixel heightof a horizontal node (INFINITE if unbounded) Parameters: height - the pixel height of a vertical node, or the pixel widthof a horizontal node (INFINITE if unbounded) a struct describing the pixel sizes of the left and right children(this is a width for horizontal nodes and a height for vertical nodes) |
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) | | |
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.
Parameters: buf - |
disposeSashes | public void disposeSashes()(Code) | | Dispose all Sashs in this tree
|
doComputePreferredSize | public int doComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)(Code) | | |
doGetSizeFlags | protected int doGetSizeFlags(boolean width)(Code) | | |
doSetBounds | public 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 right position.
|
findCommonParent | LayoutTreeNode findCommonParent(LayoutPart child1, LayoutPart child2, boolean foundChild1, boolean foundChild2)(Code) | | Go up in the tree finding a parent that is common of both children.
Return the subtree.
|
findPart | public LayoutPart findPart(Point toFind)(Code) | | Traverses the tree to find the part that intersects the given point
Parameters: toFind - the part that intersects the given point |
findSashes | void findSashes(LayoutTree child, PartPane.Sashes sashes)(Code) | | Sets the elements in the array of sashes with the
Left,Rigth,Top and Botton sashes. The elements
may be null depending whether there is a shash
beside the part
|
flushChildren | public void flushChildren()(Code) | | |
getCompressionBias | public int getCompressionBias()(Code) | | Returns 0 if there is no bias. Returns -1 if the first child should be of
fixed size, and the second child should be compressed. Returns 1 if the
second child should be of fixed size.
the bias |
isCompressible | public boolean isCompressible()(Code) | | |
isVisible | public boolean isVisible()(Code) | | Returns true if this tree has visible parts otherwise returns false.
|
replaceChild | void replaceChild(LayoutTree oldChild, LayoutTree newChild)(Code) | | Replace a child with a new child and sets the new child's parent.
|
sameDirection | public boolean sameDirection(boolean isVertical, LayoutTreeNode subTree)(Code) | | Go up from the subtree and return true if all the sash are
in the direction specified by isVertical
|
setChild | void setChild(boolean left, LayoutPart part)(Code) | | Sets a child in this node
|
setChild | void setChild(boolean left, LayoutTree child)(Code) | | Sets a child in this node
|
toString | public String toString()(Code) | | Returns a string representation of this object.
|
Methods inherited from org.eclipse.ui.internal.LayoutTree | public static int add(int a, int b)(Code)(Java Doc) public static void assertValidSize(int toCheck)(Code)(Java Doc) final public int computeMaximumSize(boolean width, int availablePerpendicular)(Code)(Java Doc) final public int computeMinimumSize(boolean width, int availablePerpendicular)(Code)(Java Doc) final public int computePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)(Code)(Java Doc) public LayoutPart computeRelation(ArrayList relations)(Code)(Java Doc) public void createControl(Composite parent)(Code)(Java Doc) public void describeLayout(StringBuffer buf)(Code)(Java Doc) public void disposeSashes()(Code)(Java Doc) protected int doComputeMaximumSize(boolean width, int availablePerpendicular)(Code)(Java Doc) public int doComputeMinimumSize(boolean width, int availablePerpendicular)(Code)(Java Doc) protected int doComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel)(Code)(Java Doc) protected int doGetSizeFlags(boolean width)(Code)(Java Doc) protected void doSetBounds(Rectangle bounds)(Code)(Java Doc) public LayoutTree find(LayoutPart child)(Code)(Java Doc) public LayoutPart findBottomRight()(Code)(Java Doc) public LayoutPart findPart(Point toFind)(Code)(Java Doc) public LayoutTreeNode findSash(LayoutPartSash sash)(Code)(Java Doc) public void findSashes(PartPane.Sashes sashes)(Code)(Java Doc) final public void flushCache()(Code)(Java Doc) public void flushChildren()(Code)(Java Doc) public void flushNode()(Code)(Java Doc) final public Rectangle getBounds()(Code)(Java Doc) public LayoutTreeNode getParent()(Code)(Java Doc) final public int getSizeFlags(boolean width)(Code)(Java Doc) final public boolean hasSizeFlag(boolean width, int flag)(Code)(Java Doc) public LayoutTree insert(LayoutPart child, boolean left, LayoutPartSash sash, LayoutPart relative)(Code)(Java Doc) public boolean isCompressible()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public static void printCacheStatistics()(Code)(Java Doc) public void recomputeRatio()(Code)(Java Doc) public LayoutTree remove(LayoutPart child)(Code)(Java Doc) final public void setBounds(Rectangle bounds)(Code)(Java Doc) void setParent(LayoutTreeNode parent)(Code)(Java Doc) void setPart(LayoutPart part)(Code)(Java Doc) public static int subtract(int a, int b)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|