View Javadoc

1   /*
2    * Copyright 2002,2004 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.commons.jelly.tags.jface.impl;
17  
18  import org.eclipse.jface.window.ApplicationWindow;
19  import org.eclipse.swt.SWT;
20  import org.eclipse.swt.widgets.Control;
21  import org.eclipse.swt.widgets.Shell;
22  
23  /***
24   * This is the default implementation for a ApplicationWindowTag
25   *
26   * @author <a href="mailto:ckl@dacelo.nl">Christiaan ten Klooster</a>
27   */
28  public class ApplicationWindowImpl extends ApplicationWindow {
29  
30      /***
31       * @param shell
32       */
33      public ApplicationWindowImpl(Shell parentShell) {
34  
35          super(parentShell);
36  
37          // default at all
38          addMenuBar();
39          addStatusLine();
40          addToolBar(SWT.NULL);
41  
42          setBlockOnOpen(true);
43  
44          // create window
45          create();
46      }
47  
48      /*
49       * override to make public
50       * @see org.eclipse.jface.window.Window#getContents()
51       */
52      public Control getContents() {
53          return super.getContents();
54      }
55  
56  }
57