01: /*******************************************************************************
02: * Copyright (c) 2006 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: import java.util.List;
13:
14: import org.eclipse.swt.graphics.Rectangle;
15:
16: /**
17: * This class represents a logical partition in the overall trim layout. The
18: * <code>TrimLayoutData</code> will specify the id of the area to be used for
19: * a particular trim element and the <code>WorkbenchLayout</code> will filter
20: * each trim control into the appropriate area based on the id.
21: * <p>
22: * This is a utility class used to support the <code>WorkbenchLayout</code> so
23: * the fields are all scoped to the package level to provide the layout full
24: * access to the structure.
25: * </p>
26: * <p>
27: * NOTE: This class is a part of a 'work in progress' and should not be used
28: * without consulting the Platform UI group. No guarantees are made as to the
29: * stability of the API (except that the javadoc will get better...;-).
30: * </p>
31: * <p>
32: *
33: * @see WorkbenchLayout
34: * @see TrimLayoutData
35: * </p>
36: *
37: * @since 3.2
38: *
39: */
40: public class TrimArea {
41:
42: /**
43: * The id of this area. Trim controls whose <code>TrimLayoutData</code>
44: * specifies an id that matches this area's id are slotted into this area by
45: * the workbench layout.
46: */
47: String areaId;
48:
49: /**
50: * This
51: */
52: int orientation;
53:
54: int defaultMinor;
55:
56: // 'Cache' variables
57: boolean cacheOK;
58:
59: Rectangle areaBounds;
60:
61: List trimContents;
62:
63: List trimLines;
64:
65: public TrimArea(String id, int orientation, int defaultMinor) {
66: this .areaId = id;
67: this .orientation = orientation;
68: this .defaultMinor = defaultMinor;
69:
70: areaBounds = new Rectangle(0, 0, 0, 0);
71:
72: // First use will fill the cache
73: cacheOK = false;
74: }
75: }
|