KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > ILayoutContainer


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal;
12
13 public interface ILayoutContainer {
14     public boolean allowsAdd(LayoutPart toAdd);
15     
16     /**
17      * Add a child to the container.
18      */

19     public void add(LayoutPart newPart);
20
21     /**
22      * Returns a list of layout children.
23      */

24     public LayoutPart[] getChildren();
25
26     /**
27      * Remove a child from the container.
28      */

29     public void remove(LayoutPart part);
30
31     /**
32      * Replace one child with another
33      */

34     public void replace(LayoutPart oldPart, LayoutPart newPart);
35     
36     public void findSashes(LayoutPart toFind, PartPane.Sashes result);
37
38     /**
39      * When a layout part closes, focus will return to the previously active part.
40      * This method determines whether the parts in this container should participate
41      * in this behavior. If this method returns true, its parts may automatically be
42      * given focus when another part is closed.
43      *
44      * @return true iff the parts in this container may be given focus when the active
45      * part is closed
46      */

47     public boolean allowsAutoFocus();
48
49     /**
50      * Called by child parts to request a zoom in, given an immediate child
51      *
52      * @param toZoom
53      * @since 3.1
54      */

55     public void childRequestZoomIn(LayoutPart toZoom);
56     
57     /**
58      * Called by child parts to request a zoom out
59      *
60      * @since 3.1
61      */

62     public void childRequestZoomOut();
63     
64     /**
65      * Returns true iff the given child is obscured due to the fact that the container is zoomed into
66      * another part.
67      *
68      * @param toTest
69      * @return
70      * @since 3.1
71      */

72     public boolean childObscuredByZoom(LayoutPart toTest);
73     
74     /**
75      * Returns true iff we are zoomed into the given part, given an immediate child of this container.
76      *
77      * @param toTest
78      * @return
79      * @since 3.1
80      */

81     public boolean childIsZoomed(LayoutPart toTest);
82
83     /**
84      * Called when the preferred size of the given child has changed, requiring a
85      * layout to be triggered.
86      *
87      * @param childThatChanged the child that triggered the new layout
88      */

89     public void resizeChild(LayoutPart childThatChanged);
90
91 }
92
Popular Tags