package org.argeo.suite.ui;
-import java.util.HashMap;
import java.util.Map;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.argeo.cms.Localized;
import org.argeo.cms.ui.CmsTheme;
import org.argeo.cms.ui.CmsUiProvider;
import org.argeo.cms.ui.CmsView;
import org.argeo.cms.ui.util.CmsIcon;
import org.argeo.cms.ui.util.CmsUiUtils;
-import org.argeo.eclipse.ui.Selected;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.osgi.service.event.Event;
-import org.osgi.service.event.EventAdmin;
+import org.eclipse.swt.widgets.Label;
/** Side pane listing various perspectives. */
public class DefaultLeadPane implements CmsUiProvider {
- private final static Log log = LogFactory.getLog(DefaultLeadPane.class);
- private EventAdmin eventAdmin;
+ // private final static Log log = LogFactory.getLog(DefaultLeadPane.class);
@Override
public Control createUi(Composite parent, Node node) throws RepositoryException {
Button dashboardB = createButton(parent, SuiteMsg.dashboard.name(), SuiteMsg.dashboard, SuiteIcon.dashboard);
if (!cmsView.isAnonymous()) {
- createButton(parent, SuiteMsg.documents.name(), SuiteMsg.documents, SuiteIcon.documents);
- createButton(parent, SuiteMsg.people.name(), SuiteMsg.people, SuiteIcon.people);
- createButton(parent, SuiteMsg.locations.name(), SuiteMsg.locations, SuiteIcon.location);
+// createButton(parent, SuiteMsg.documents.name(), SuiteMsg.documents, SuiteIcon.documents);
+// createButton(parent, SuiteMsg.people.name(), SuiteMsg.people, SuiteIcon.people);
+// createButton(parent, SuiteMsg.locations.name(), SuiteMsg.locations, SuiteIcon.location);
}
return dashboardB;
}
CmsTheme theme = CmsTheme.getCmsTheme(parent);
Button button = new Button(parent, SWT.PUSH);
CmsUiUtils.style(button, SuiteStyle.leadPane);
- button.setToolTipText(msg.lead());
button.setImage(icon.getBigIcon(theme));
- CmsUiUtils.sendEventOnSelect(button, SuiteEvent.switchLayer.topic(), SuiteEvent.LAYER_PARAM, layer);
+ button.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, true, false));
+ // button.setToolTipText(msg.lead());
+ Label lbl = new Label(parent, SWT.NONE);
+ CmsUiUtils.style(lbl, SuiteStyle.leadPane);
+ lbl.setText(msg.lead());
+ lbl.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, false));
+ CmsUiUtils.sendEventOnSelect(button, SuiteEvent.switchLayer.topic(), SuiteEvent.LAYER, layer);
return button;
}
public void init(Map<String, String> properties) {
}
-
- public void setEventAdmin(EventAdmin eventAdmin) {
- this.eventAdmin = eventAdmin;
- }
-
}