01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal;
11:
12: public interface ILayoutContainer {
13: public boolean allowsAdd(LayoutPart toAdd);
14:
15: /**
16: * Add a child to the container.
17: */
18: public void add(LayoutPart newPart);
19:
20: /**
21: * Returns a list of layout children.
22: */
23: public LayoutPart[] getChildren();
24:
25: /**
26: * Remove a child from the container.
27: */
28: public void remove(LayoutPart part);
29:
30: /**
31: * Replace one child with another
32: */
33: public void replace(LayoutPart oldPart, LayoutPart newPart);
34:
35: public void findSashes(LayoutPart toFind, PartPane.Sashes result);
36:
37: /**
38: * When a layout part closes, focus will return to the previously active part.
39: * This method determines whether the parts in this container should participate
40: * in this behavior. If this method returns true, its parts may automatically be
41: * given focus when another part is closed.
42: *
43: * @return true iff the parts in this container may be given focus when the active
44: * part is closed
45: */
46: public boolean allowsAutoFocus();
47:
48: /**
49: * Called by child parts to request a zoom in, given an immediate child
50: *
51: * @param toZoom
52: * @since 3.1
53: */
54: public void childRequestZoomIn(LayoutPart toZoom);
55:
56: /**
57: * Called by child parts to request a zoom out
58: *
59: * @since 3.1
60: */
61: public void childRequestZoomOut();
62:
63: /**
64: * Returns true iff the given child is obscured due to the fact that the container is zoomed into
65: * another part.
66: *
67: * @param toTest
68: * @return
69: * @since 3.1
70: */
71: public boolean childObscuredByZoom(LayoutPart toTest);
72:
73: /**
74: * Returns true iff we are zoomed into the given part, given an immediate child of this container.
75: *
76: * @param toTest
77: * @return
78: * @since 3.1
79: */
80: public boolean childIsZoomed(LayoutPart toTest);
81:
82: /**
83: * Called when the preferred size of the given child has changed, requiring a
84: * layout to be triggered.
85: *
86: * @param childThatChanged the child that triggered the new layout
87: */
88: public void resizeChild(LayoutPart childThatChanged);
89:
90: }
|