Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMélanie Bats2016-04-07 04:05:08 -0400
committerMélanie Bats2016-04-11 04:58:32 -0400
commit6b8ac58400ce2b7cd7ff3a52a31a3f5e207b8b7e (patch)
treecc5b8345f7b3299f18ab01ed9a23c7766dfcccb8 /samples
parent8e5fc88cb974d85c6088923b8d5a755da5ce080a (diff)
downloadorg.eclipse.eef-6b8ac58400ce2b7cd7ff3a52a31a3f5e207b8b7e.tar.gz
org.eclipse.eef-6b8ac58400ce2b7cd7ff3a52a31a3f5e207b8b7e.tar.xz
org.eclipse.eef-6b8ac58400ce2b7cd7ff3a52a31a3f5e207b8b7e.zip
Support conditional styles
Change-Id: I1e2f419f1429be74ba66a8f967e45246da619f89 Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
Diffstat (limited to 'samples')
-rw-r--r--samples/org.eclipse.eef.sample.custom.widget.colorpicker/src/org/eclipse/eef/sample/custom/widget/colorpicker/ColorPickerLifecycleManager.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/samples/org.eclipse.eef.sample.custom.widget.colorpicker/src/org/eclipse/eef/sample/custom/widget/colorpicker/ColorPickerLifecycleManager.java b/samples/org.eclipse.eef.sample.custom.widget.colorpicker/src/org/eclipse/eef/sample/custom/widget/colorpicker/ColorPickerLifecycleManager.java
index 717d70791..b5e6041e5 100644
--- a/samples/org.eclipse.eef.sample.custom.widget.colorpicker/src/org/eclipse/eef/sample/custom/widget/colorpicker/ColorPickerLifecycleManager.java
+++ b/samples/org.eclipse.eef.sample.custom.widget.colorpicker/src/org/eclipse/eef/sample/custom/widget/colorpicker/ColorPickerLifecycleManager.java
@@ -10,6 +10,11 @@
*******************************************************************************/
package org.eclipse.eef.sample.custom.widget.colorpicker;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.eef.EEFConditionalStyle;
+import org.eclipse.eef.EEFCustomWidgetConditionalStyle;
import org.eclipse.eef.EEFCustomWidgetDescription;
import org.eclipse.eef.EEFWidgetDescription;
import org.eclipse.eef.EEFWidgetStyle;
@@ -122,12 +127,37 @@ public class ColorPickerLifecycleManager extends AbstractEEFWidgetLifecycleManag
*/
@Override
protected EEFWidgetStyle getWidgetStyle() {
+ return this.description.getStyle();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager#getWidgetStyle(org.eclipse.eef.EEFConditionalStyle)
+ */
+ @Override
+ protected EEFWidgetStyle getWidgetStyle(EEFConditionalStyle conditionalStyle) {
+ if (conditionalStyle instanceof EEFCustomWidgetConditionalStyle) {
+ return ((EEFCustomWidgetConditionalStyle) conditionalStyle).getStyle();
+ }
return null;
}
/**
* {@inheritDoc}
*
+ * @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager#getWidgetConditionalStyles()
+ */
+ @Override
+ protected List<EEFConditionalStyle> getWidgetConditionalStyles() {
+ List<EEFConditionalStyle> widgetConditionalStyles = new ArrayList<EEFConditionalStyle>();
+ widgetConditionalStyles.addAll(this.description.getConditionalStyles());
+ return widgetConditionalStyles;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager#aboutToBeShown()
*/
@Override

Back to the top