Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2014-12-16 08:00:37 +0000
committerQuentin Le Menez2015-01-15 14:38:04 +0000
commit5533c91d1a0bc214878d968e5b858b838a40abf3 (patch)
treed69bb8d86c9afb677511644e697d390e14a70389 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets
parent2845b050da3fde4df55c44023009fdd9dc8fedfa (diff)
downloadorg.eclipse.papyrus-5533c91d1a0bc214878d968e5b858b838a40abf3.tar.gz
org.eclipse.papyrus-5533c91d1a0bc214878d968e5b858b838a40abf3.tar.xz
org.eclipse.papyrus-5533c91d1a0bc214878d968e5b858b838a40abf3.zip
455295: You should be able to choose the base color of the ColorPickerEditor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=455295 - Addition of a constructor allowing the edittion of the base color Change-Id: Ieb486f71220913836a5d5e63cd370dffe717058d Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/ColorPickerEditor.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/ColorPickerEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/ColorPickerEditor.java
index 0f96ad77657..44749f7f164 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/ColorPickerEditor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets/src/org/eclipse/papyrus/infra/gmfdiag/widgets/editors/ColorPickerEditor.java
@@ -77,6 +77,21 @@ public class ColorPickerEditor extends AbstractValueEditor implements IChangeLis
});
}
+ /**
+ *
+ * Constructor. Allows to choose the default color of the button, else it be black.
+ *
+ * @param parent
+ * @param style
+ * @param defaultColor
+ * {@link FigureUtilities#colorToInteger(Color)}
+ */
+ public ColorPickerEditor(Composite parent, int style, int defaultColor) {
+ this(parent, style);
+ this.defaultColor = defaultColor;
+ doSetColor(defaultColor);
+ }
+
@Override
protected void doBinding() {
// We don't do a real databinding here

Back to the top