]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - cms/ui/util/VerticalMenu.java
1 package org
.argeo
.cms
.ui
.util
;
3 import java
.util
.ArrayList
;
7 import javax
.jcr
.RepositoryException
;
9 import org
.argeo
.cms
.swt
.CmsSwtUtils
;
10 import org
.argeo
.cms
.ui
.CmsUiProvider
;
11 import org
.eclipse
.swt
.SWT
;
12 import org
.eclipse
.swt
.layout
.GridData
;
13 import org
.eclipse
.swt
.widgets
.Composite
;
14 import org
.eclipse
.swt
.widgets
.Control
;
16 public class VerticalMenu
implements CmsUiProvider
{
17 private List
<CmsUiProvider
> items
= new ArrayList
<CmsUiProvider
>();
20 public Control
createUi(Composite parent
, Node context
) throws RepositoryException
{
21 Composite part
= new Composite(parent
, SWT
.NONE
);
22 part
.setLayoutData(new GridData(SWT
.LEAD
, SWT
.TOP
, false, false));
23 // part.setData(RWT.CUSTOM_VARIANT, custom);
24 part
.setLayout(CmsSwtUtils
.noSpaceGridLayout());
25 for (CmsUiProvider uiProvider
: items
) {
26 Control subPart
= uiProvider
.createUi(part
, context
);
27 subPart
.setLayoutData(new GridData(SWT
.LEAD
, SWT
.TOP
, false, false));
32 public void add(CmsUiProvider uiProvider
) {
33 items
.add(uiProvider
);
36 public List
<CmsUiProvider
> getItems() {
40 public void setItems(List
<CmsUiProvider
> items
) {