X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=swt%2Forg.argeo.app.ui%2Fsrc%2Forg%2Fargeo%2Fapp%2Fui%2FSuiteUiUtils.java;h=e649bfc9b1f4118cb5c20f7ed5655609c724b047;hb=3757251d0be9b74dda727c51df355be9d7cbb3bf;hp=dce6d13822ef5dd0309b20f214f9c22a2679dd03;hpb=c0995155ef2c0c48830e4ff22a9a7b15bc070cca;p=gpl%2Fargeo-suite.git diff --git a/swt/org.argeo.app.ui/src/org/argeo/app/ui/SuiteUiUtils.java b/swt/org.argeo.app.ui/src/org/argeo/app/ui/SuiteUiUtils.java index dce6d13..e649bfc 100644 --- a/swt/org.argeo.app.ui/src/org/argeo/app/ui/SuiteUiUtils.java +++ b/swt/org.argeo.app.ui/src/org/argeo/app/ui/SuiteUiUtils.java @@ -18,7 +18,6 @@ import org.argeo.api.cms.ux.CmsStyle; import org.argeo.app.api.EntityNames; import org.argeo.app.api.EntityType; import org.argeo.app.swt.ux.SuiteSwtUtils; -import org.argeo.app.swt.ux.SwtArgeoApp; import org.argeo.app.ux.SuiteUxEvent; import org.argeo.cms.jcr.acr.JcrContent; import org.argeo.cms.swt.CmsSwtUtils; @@ -41,13 +40,13 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; /** UI utilities around SWT and JCR. */ +@Deprecated public class SuiteUiUtils { public static Text addFormLine(Composite parent, String label, Node node, String property, CmsEditable cmsEditable) { Composite lineComposite = SuiteSwtUtils.addLineComposite(parent, 2); SuiteSwtUtils.addFormLabel(lineComposite, label); String text = Jcr.get(node, property); -// int style = cmsEditable.isEditing() ? SWT.WRAP : SWT.WRAP; Text txt = SuiteSwtUtils.addFormTextField(lineComposite, text, null, SWT.WRAP); if (cmsEditable != null && cmsEditable.isEditing()) { txt.addModifyListener((e) -> { @@ -63,12 +62,8 @@ public class SuiteUiUtils { public static Text addFormColumn(Composite parent, String label, Node node, String property, CmsEditable cmsEditable) { -// Composite columnComposite = new Composite(parent, SWT.NONE); -// columnComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); -// columnComposite.setLayout(new GridLayout(1, false)); SuiteSwtUtils.addFormLabel(parent, label); String text = Jcr.get(node, property); -// int style = cmsEditable.isEditing() ? SWT.WRAP : SWT.WRAP; Text txt = SuiteSwtUtils.addFormTextField(parent, text, null, SWT.WRAP); if (cmsEditable != null && cmsEditable.isEditing()) { txt.addModifyListener((e) -> { @@ -82,12 +77,12 @@ public class SuiteUiUtils { return txt; } - public static Label addFormPicture(Composite parent, String label, Node fileNode) throws RepositoryException { - Composite lineComposite = SuiteSwtUtils.addLineComposite(parent, 2); - SuiteSwtUtils.addFormLabel(lineComposite, label); - - return addPicture(lineComposite, fileNode); - } +// public static Label addFormPicture(Composite parent, String label, Node fileNode) throws RepositoryException { +// Composite lineComposite = SuiteSwtUtils.addLineComposite(parent, 2); +// SuiteSwtUtils.addFormLabel(lineComposite, label); +// +// return addPicture(lineComposite, fileNode); +// } public static Label addPicture(Composite parent, Node fileNode) throws RepositoryException { return addPicture(parent, fileNode, null); @@ -225,8 +220,7 @@ public class SuiteUiUtils { } public static String toLink(Node node) { - return node != null ? "#" + CmsSwtUtils.cleanPathForUrl(SwtArgeoApp.nodeToState(JcrContent.nodeToContent(node))) - : null; + return node != null ? "#" + CmsSwtUtils.cleanPathForUrl(JcrContent.nodeToContent(node).getPath()) : null; } public static Control addLink(Composite parent, String label, Node node, CmsStyle style)