Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2014-12-16 08:00:37 +0000
committerQuentin Le Menez2014-12-16 09:31:36 +0000
commit8831435b751382adbc9808bdf9100dbce8778889 (patch)
tree35c2f9d5c2b36b8d19cc25b7484a44dc4c9c78ba /plugins
parente02728cd745de91b1660a67df6caf00aa097a4a0 (diff)
downloadorg.eclipse.papyrus-8831435b751382adbc9808bdf9100dbce8778889.tar.gz
org.eclipse.papyrus-8831435b751382adbc9808bdf9100dbce8778889.tar.xz
org.eclipse.papyrus-8831435b751382adbc9808bdf9100dbce8778889.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')
-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