]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/editors/EmptyNodePage.java
2 * Copyright (C) 2007-2012 Argeo GmbH
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org
.argeo
.jcr
.ui
.explorer
.editors
;
18 import org
.eclipse
.swt
.SWT
;
19 import org
.eclipse
.swt
.layout
.GridLayout
;
20 import org
.eclipse
.swt
.widgets
.Label
;
21 import org
.eclipse
.ui
.forms
.IManagedForm
;
22 import org
.eclipse
.ui
.forms
.editor
.FormEditor
;
23 import org
.eclipse
.ui
.forms
.editor
.FormPage
;
24 import org
.eclipse
.ui
.forms
.widgets
.ScrolledForm
;
27 * This page is only used at editor's creation time when current node has not
30 public class EmptyNodePage
extends FormPage
{
31 // private final static Log log = LogFactory.getLog(EmptyNodePage.class);
33 public EmptyNodePage(FormEditor editor
, String title
) {
34 super(editor
, "Empty Page", title
);
37 protected void createFormContent(IManagedForm managedForm
) {
39 ScrolledForm form
= managedForm
.getForm();
40 GridLayout twt
= new GridLayout(1, false);
41 twt
.marginWidth
= twt
.marginHeight
= 0;
42 form
.getBody().setLayout(twt
);
43 Label lbl
= new Label(form
.getBody(), SWT
.NONE
);
44 lbl
.setText("Empty page");
45 } catch (Exception e
) {