Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-11 12:49:09 -0500
committerCamille Letavernier2014-02-11 12:49:09 -0500
commita66895a065cd66a7f322f579b06291d6a43e8a9e (patch)
tree34e057f98ff8ed8a39e83a05bbf08ced5a75259b
parent942b1c18bed4b674cc8913fa1d936e7699729a0a (diff)
downloadorg.eclipse.papyrus-a66895a065cd66a7f322f579b06291d6a43e8a9e.tar.gz
org.eclipse.papyrus-a66895a065cd66a7f322f579b06291d6a43e8a9e.tar.xz
org.eclipse.papyrus-a66895a065cd66a7f322f579b06291d6a43e8a9e.zip
417396: [CSS] The CSS Engine shall support label visibility & mask
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Fix Java compliance
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java
index 669eec3b37d..fe3de554ad8 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java
@@ -30,10 +30,10 @@ import org.eclipse.swt.widgets.Composite;
/**
* A Widget to manipulate a list of values.
- *
+ *
* The widget is configured with a Map of (String, String) entries (Key -> Label).
* It returns the list of selected keys.
- *
+ *
* @author Camille Letavernier
*/
public class StringMask extends AbstractListEditor implements SelectionListener, IChangeListener, DisposeListener {
@@ -106,14 +106,11 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
if(checkboxes != null) {
disposeCheckboxes();
}
-
checkboxes = new Button[values.size()];
-
int i = 0;
for(Entry<String, String> mask : values.entrySet()) {
String stringValue = mask.getKey();
String label = mask.getValue();
-
checkboxes[i] = new Button(checkboxContainer, SWT.CHECK);
checkboxes[i].setText(label);
checkboxes[i].setData(DATA_KEY, stringValue);
@@ -140,7 +137,6 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
public void doBinding() {
// We don't do a real databinding here
modelProperty.addChangeListener(this);
-
refreshCheckboxes();
}
@@ -148,7 +144,6 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
if(!refreshCheckboxes) {
return;
}
-
Collection<String> values = getCurrentValue();
for(Button button : checkboxes) {
String value = (String)button.getData(DATA_KEY);
@@ -161,7 +156,6 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
super.setLabelToolTipText(text);
}
- @Override
public void widgetSelected(final SelectionEvent e) {
Button button = (Button)e.widget;
String value = (String)button.getData(DATA_KEY);
@@ -182,7 +176,6 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
refreshCheckboxes = true;
}
currentValue = values;
-
commit();
}
@@ -194,7 +187,6 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
}
}
- @Override
public void widgetDefaultSelected(final SelectionEvent e) {
// Nothing
}
@@ -203,9 +195,7 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
return ((GridLayout)checkboxContainer.getLayout()).numColumns;
}
- @Override
public void handleChange(final ChangeEvent event) {
refreshCheckboxes();
}
-
}

Back to the top