projects
/
gpl
/
argeo-suite.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major refactoring of Argeo CMS UI
[gpl/argeo-suite.git]
/
org.argeo.entity.ui
/
src
/
org
/
argeo
/
entity
/
ui
/
forms
/
MultiTermsPart.java
diff --git
a/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java
b/org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java
index 8d407638626ecc8885b08b2b78d53b47f86bc591..00bcd7068af1ef185d427d478451418db67a19ea 100644
(file)
--- a/
org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java
+++ b/
org.argeo.entity.ui/src/org/argeo/entity/ui/forms/MultiTermsPart.java
@@
-7,13
+7,13
@@
import javax.jcr.Item;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.argeo.cms.swt.CmsSwtUtils;
+import org.argeo.cms.swt.MouseDoubleClick;
+import org.argeo.cms.swt.MouseDown;
+import org.argeo.cms.swt.Selected;
import org.argeo.cms.ui.forms.FormStyle;
import org.argeo.cms.ui.forms.FormStyle;
-import org.argeo.cms.ui.util.CmsUiUtils;
import org.argeo.cms.ui.viewers.EditablePart;
import org.argeo.cms.ui.widgets.ContextOverlay;
import org.argeo.cms.ui.viewers.EditablePart;
import org.argeo.cms.ui.widgets.ContextOverlay;
-import org.argeo.eclipse.ui.MouseDoubleClick;
-import org.argeo.eclipse.ui.MouseDown;
-import org.argeo.eclipse.ui.Selected;
import org.argeo.entity.Term;
import org.argeo.entity.TermsManager;
import org.argeo.jcr.Jcr;
import org.argeo.entity.Term;
import org.argeo.entity.TermsManager;
import org.argeo.jcr.Jcr;
@@
-44,7
+44,7
@@
public class MultiTermsPart extends AbstractTermsPart {
boolean vertical = SWT.VERTICAL == (getStyle() & SWT.VERTICAL);
RowLayout rl = new RowLayout(vertical ? SWT.VERTICAL : SWT.HORIZONTAL);
boolean vertical = SWT.VERTICAL == (getStyle() & SWT.VERTICAL);
RowLayout rl = new RowLayout(vertical ? SWT.VERTICAL : SWT.HORIZONTAL);
- rl = Cms
Ui
Utils.noMarginsRowLayout(rl);
+ rl = Cms
Swt
Utils.noMarginsRowLayout(rl);
// rl.wrap = true;
// rl.justify = true;
placeholder.setLayout(rl);
// rl.wrap = true;
// rl.justify = true;
placeholder.setLayout(rl);
@@
-52,11
+52,11
@@
public class MultiTermsPart extends AbstractTermsPart {
if (currentValue != null && !currentValue.isEmpty()) {
for (Term value : currentValue) {
Composite block = new Composite(placeholder, SWT.NONE);
if (currentValue != null && !currentValue.isEmpty()) {
for (Term value : currentValue) {
Composite block = new Composite(placeholder, SWT.NONE);
- block.setLayout(Cms
Ui
Utils.noSpaceGridLayout(3));
+ block.setLayout(Cms
Swt
Utils.noSpaceGridLayout(3));
Label lbl = new Label(block, SWT.NONE);
String display = getTermLabel(value);
lbl.setText(display);
Label lbl = new Label(block, SWT.NONE);
String display = getTermLabel(value);
lbl.setText(display);
- Cms
Ui
Utils.style(lbl, style == null ? FormStyle.propertyText.style() : style);
+ Cms
Swt
Utils.style(lbl, style == null ? FormStyle.propertyText.style() : style);
processTermListLabel(value, lbl);
if (isEditable())
lbl.addMouseListener((MouseDoubleClick) (e) -> {
processTermListLabel(value, lbl);
if (isEditable())
lbl.addMouseListener((MouseDoubleClick) (e) -> {
@@
-94,15
+94,15
@@
public class MultiTermsPart extends AbstractTermsPart {
if (isEditing()) {
Composite block = new Composite(placeholder, SWT.NONE);
if (isEditing()) {
Composite block = new Composite(placeholder, SWT.NONE);
- block.setLayout(Cms
Ui
Utils.noSpaceGridLayout(3));
+ block.setLayout(Cms
Swt
Utils.noSpaceGridLayout(3));
createHighlight(block);
Text txt = new Text(block, SWT.SINGLE | SWT.BORDER);
createHighlight(block);
Text txt = new Text(block, SWT.SINGLE | SWT.BORDER);
- txt.setLayoutData(Cms
Ui
Utils.fillWidth());
+ txt.setLayoutData(Cms
Swt
Utils.fillWidth());
// txt.setMessage("[new]");
// txt.setMessage("[new]");
- Cms
Ui
Utils.style(txt, style == null ? FormStyle.propertyText.style() : style);
+ Cms
Swt
Utils.style(txt, style == null ? FormStyle.propertyText.style() : style);
ToolBar toolBar = new ToolBar(block, SWT.HORIZONTAL);
ToolItem cancelItem = new ToolItem(toolBar, SWT.FLAT);
ToolBar toolBar = new ToolBar(block, SWT.HORIZONTAL);
ToolItem cancelItem = new ToolItem(toolBar, SWT.FLAT);
@@
-151,7
+151,7
@@
public class MultiTermsPart extends AbstractTermsPart {
@Override
protected void refresh(ContextOverlay contextArea, String filter, Text txt) {
@Override
protected void refresh(ContextOverlay contextArea, String filter, Text txt) {
- Cms
Ui
Utils.clear(contextArea);
+ Cms
Swt
Utils.clear(contextArea);
List<? extends Term> terms = termsManager.listAllTerms(typology.getId());
List<Term> currentValue = getValue();
terms: for (Term term : terms) {
List<? extends Term> terms = termsManager.listAllTerms(typology.getId());
List<Term> currentValue = getValue();
terms: for (Term term : terms) {