import org.argeo.jcr.JcrUtils;
import org.argeo.slc.akb.AkbException;
import org.argeo.slc.akb.AkbService;
+import org.argeo.slc.akb.ui.AkbUiUtils;
import org.argeo.slc.akb.utils.AkbJcrUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.SWT;
setTitleToolTip("Display and edit " + name);
}
+ /** Overwrite to provide supplementary pages between main and history page */
+ protected void addOtherPages() throws PartInitException {
+ }
+
/* Pages management */
@Override
protected void addPages() {
try {
addPage(new ConnectorAliasPage(this, "mainPage", "Main"));
- // TODO Add history page
- // addPage(new ConnectorAliasPage(this, "mainPage", "Main"));
+ // Add AKB Type specific pages
+ addOtherPages();
+ addPage(new HistoryPage(this, "historyPage", "History"));
} catch (PartInitException e) {
throw new AkbException("Unable to initialise pages for editor "
+ getEditorId(), e);
}
}
+ /**
+ * Display history
+ */
+ private class HistoryPage extends FormPage {
+
+ public HistoryPage(FormEditor editor, String id, String title) {
+ super(editor, id, title);
+ }
+
+ protected void createFormContent(IManagedForm managedForm) {
+ super.createFormContent(managedForm);
+ ScrolledForm form = managedForm.getForm();
+ form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Composite parent = form.getBody();
+ parent.setLayout(AkbUiUtils.gridLayoutNoBorder());
+ getToolkit().createLabel(parent,
+ "This page will display history " + "for current AKB Node");
+ }
+ }
+
/* EXPOSES TO CHILDREN CLASSES */
protected Session getSession() {
return session;