01: /*******************************************************************************
02: * Copyright (c) 2004, 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 org.eclipse.core.runtime.Assert;
13: import org.eclipse.ui.IViewLayout;
14:
15: /**
16: * Implementation of IViewLayout.
17: * This is an API facade on the internal ViewLayoutRec.
18: *
19: * @since 3.0
20: */
21: public class ViewLayout implements IViewLayout {
22: private ViewLayoutRec rec;
23:
24: public ViewLayout(PageLayout pageLayout, ViewLayoutRec rec) {
25: Assert.isNotNull(pageLayout);
26: Assert.isNotNull(rec);
27: this .rec = rec;
28: }
29:
30: /* (non-Javadoc)
31: * @see org.eclipse.ui.IViewLayout#getShowTitle()
32: */
33: public boolean getShowTitle() {
34: return rec.showTitle;
35: }
36:
37: /* (non-Javadoc)
38: * @see org.eclipse.ui.IViewLayout#isCloseable()
39: */
40: public boolean isCloseable() {
41: return rec.isCloseable;
42: }
43:
44: /* (non-Javadoc)
45: * @see org.eclipse.ui.IViewLayout#isMoveable()
46: */
47: public boolean isMoveable() {
48: return rec.isMoveable;
49: }
50:
51: /* (non-Javadoc)
52: * @see org.eclipse.ui.IViewLayout#isStandalone()
53: */
54: public boolean isStandalone() {
55: return rec.isStandalone;
56: }
57:
58: /* (non-Javadoc)
59: * @see org.eclipse.ui.IViewLayout#setCloseable(boolean)
60: */
61: public void setCloseable(boolean closeable) {
62: rec.isCloseable = closeable;
63: }
64:
65: /* (non-Javadoc)
66: * @see org.eclipse.ui.IViewLayout#setMoveable(boolean)
67: */
68: public void setMoveable(boolean moveable) {
69: rec.isMoveable = moveable;
70: }
71:
72: }
|