import javax.jcr.query.Query;
import javax.jcr.query.QueryResult;
-import org.argeo.api.NodeConstants;
import org.argeo.cms.ui.CmsTheme;
import org.argeo.cms.ui.CmsUiProvider;
import org.argeo.cms.ui.CmsView;
import org.argeo.connect.ui.widgets.DelayedText;
import org.argeo.connect.util.XPathUtils;
import org.argeo.eclipse.ui.EclipseUiUtils;
+import org.argeo.entity.EntityConstants;
import org.argeo.entity.EntityTypes;
import org.argeo.jcr.Jcr;
import org.argeo.jcr.JcrUtils;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
public Control createUi(Composite parent, Node context) throws RepositoryException {
theme = CmsTheme.getCmsTheme(parent);
parent.setLayout(new GridLayout());
+// parent.setLayout(CmsUiUtils.noSpaceGridLayout());
+ parent.setLayout(new GridLayout());
- Composite top = new Composite(parent, SWT.NONE);
- CmsUiUtils.style(top, SuiteStyle.recentItems);
- top.setLayoutData(CmsUiUtils.fillWidth());
- top.setLayout(CmsUiUtils.noSpaceGridLayout(2));
- Label lbl = new Label(top, SWT.NONE);
- lbl.setLayoutData(CmsUiUtils.fillAll());
- lbl.setText(SuiteMsg.recentItems.lead());
- CmsUiUtils.style(lbl, SuiteStyle.recentItems);
-
- ToolBar topToolBar = new ToolBar(top, SWT.NONE);
- ToolItem addItem = new ToolItem(topToolBar, SWT.FLAT);
-// CmsUiUtils.style(addItem, SuiteStyle.recentItems);
- addItem.setImage(SuiteIcon.add.getSmallIcon(theme));
+// Composite top = new Composite(parent, SWT.BORDER);
+// CmsUiUtils.style(top, SuiteStyle.recentItems);
+// top.setLayoutData(CmsUiUtils.fillWidth());
+// top.setLayout(CmsUiUtils.noSpaceGridLayout(2));
+// Label lbl = new Label(top, SWT.FLAT);
+// lbl.setLayoutData(CmsUiUtils.fillWidth());
+// lbl.setText(SuiteMsg.recentItems.lead());
+// CmsUiUtils.style(lbl, SuiteStyle.recentItems);
+//
+// ToolBar topToolBar = new ToolBar(top, SWT.NONE);
+// ToolItem addItem = new ToolItem(topToolBar, SWT.FLAT);
+//// CmsUiUtils.style(addItem, SuiteStyle.recentItems);
+// addItem.setImage(SuiteIcon.add.getSmallIcon(theme));
if (context == null)
return null;
deleteItem.setEnabled(false);
// CmsUiUtils.style(deleteItem, SuiteStyle.recentItems);
deleteItem.setImage(SuiteIcon.delete.getSmallIcon(theme));
-
+ ToolItem addItem = new ToolItem(bottomToolBar, SWT.FLAT);
+ addItem.setImage(SuiteIcon.add.getSmallIcon(theme));
entityViewer.getViewer().addDoubleClickListener(new IDoubleClickListener() {
@Override
}
public void init(Map<String, String> properties) {
- entityType = properties.get(NodeConstants.DATA_TYPE);
+ entityType = properties.get(EntityConstants.TYPE);
}
class SingleEntityViewer {
}
protected TableViewer createListPart(Composite parent, ILabelProvider labelProvider) {
- parent.setLayout(new GridLayout());
+// parent.setLayout(new GridLayout());
+// parent.setLayout(CmsUiUtils.noSpaceGridLayout());
Composite tableComposite = new Composite(parent, SWT.NONE);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL