KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 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 import org.eclipse.core.runtime.Assert;
14 import org.eclipse.ui.IViewLayout;
15
16 /**
17  * Implementation of IViewLayout.
18  * This is an API facade on the internal ViewLayoutRec.
19  *
20  * @since 3.0
21  */

22 public class ViewLayout implements IViewLayout {
23     private ViewLayoutRec rec;
24
25     public ViewLayout(PageLayout pageLayout, ViewLayoutRec rec) {
26         Assert.isNotNull(pageLayout);
27         Assert.isNotNull(rec);
28         this.rec = rec;
29     }
30
31     /* (non-Javadoc)
32      * @see org.eclipse.ui.IViewLayout#getShowTitle()
33      */

34     public boolean getShowTitle() {
35         return rec.showTitle;
36     }
37
38     /* (non-Javadoc)
39      * @see org.eclipse.ui.IViewLayout#isCloseable()
40      */

41     public boolean isCloseable() {
42         return rec.isCloseable;
43     }
44
45     /* (non-Javadoc)
46      * @see org.eclipse.ui.IViewLayout#isMoveable()
47      */

48     public boolean isMoveable() {
49         return rec.isMoveable;
50     }
51
52     /* (non-Javadoc)
53      * @see org.eclipse.ui.IViewLayout#isStandalone()
54      */

55     public boolean isStandalone() {
56         return rec.isStandalone;
57     }
58
59     /* (non-Javadoc)
60      * @see org.eclipse.ui.IViewLayout#setCloseable(boolean)
61      */

62     public void setCloseable(boolean closeable) {
63         rec.isCloseable = closeable;
64     }
65
66     /* (non-Javadoc)
67      * @see org.eclipse.ui.IViewLayout#setMoveable(boolean)
68      */

69     public void setMoveable(boolean moveable) {
70         rec.isMoveable = moveable;
71     }
72
73 }
74
Popular Tags