X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=core%2Forg.argeo.suite.ui%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fui%2FSuiteUi.java;h=ca2d9c38378321042e3997468a40bf431a3f8060;hp=b245762cc7d8f27220d7ee6bfef5f5eff82246d8;hb=0d09664471edab1033c304198d09b099d74bb3a7;hpb=418ea1efbf3f0d6b706603c6ff1c0fdd17314773 diff --git a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java index b245762..ca2d9c3 100644 --- a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java +++ b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java @@ -11,6 +11,7 @@ import javax.jcr.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.api.NodeConstants; +import org.argeo.cms.Localized; import org.argeo.cms.ui.CmsView; import org.argeo.cms.ui.util.CmsUiUtils; import org.argeo.jcr.Jcr; @@ -22,13 +23,16 @@ import org.eclipse.swt.widgets.Composite; class SuiteUi extends Composite { private static final long serialVersionUID = 6207018859086689108L; private final static Log log = LogFactory.getLog(SuiteUi.class); + + private Localized title; private Composite header; + private Composite footer; private Composite belowHeader; private Composite leadPane; private Composite dynamicArea; private Session sysSession; -// private Session homeSession; + private Session homeSession; private Node userDir; private Map layers = new HashMap<>(); @@ -49,6 +53,11 @@ class SuiteUi extends Composite { belowHeader = new Composite(this, SWT.NONE); belowHeader.setLayoutData(CmsUiUtils.fillAll()); + + footer = new Composite(this, SWT.NONE); + footer.setLayout(CmsUiUtils.noSpaceGridLayout()); + CmsUiUtils.style(footer, SuiteStyle.footer); + footer.setLayoutData(CmsUiUtils.fillWidth()); } public void refreshBelowHeader(boolean initApp) { @@ -178,6 +187,10 @@ class SuiteUi extends Composite { return header; } + Composite getFooter() { + return footer; + } + Composite getLeadPane() { return leadPane; } @@ -192,11 +205,11 @@ class SuiteUi extends Composite { // synchronized void initSessions(Repository repository, String userDirPath) throws RepositoryException { this.sysSession = repository.login(); -// this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE); + this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE); userDir = sysSession.getNode(userDirPath); addDisposeListener((e) -> { Jcr.logout(sysSession); -// Jcr.logout(homeSession); + Jcr.logout(homeSession); }); } @@ -213,8 +226,8 @@ class SuiteUi extends Composite { return sysSession; if (NodeConstants.SYS_WORKSPACE.equals(workspaceName)) return sysSession; -// else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) -// return homeSession; + else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) + return homeSession; else throw new IllegalArgumentException("Unknown workspace " + workspaceName); } @@ -223,4 +236,12 @@ class SuiteUi extends Composite { return cmsView; } + public Localized getTitle() { + return title; + } + + public void setTitle(Localized title) { + this.title = title; + } + }