diff options
author | Quentin Le Menez | 2014-12-16 08:00:37 +0000 |
---|---|---|
committer | Quentin Le Menez | 2014-12-16 09:31:36 +0000 |
commit | 8831435b751382adbc9808bdf9100dbce8778889 (patch) | |
tree | 35c2f9d5c2b36b8d19cc25b7484a44dc4c9c78ba /plugins | |
parent | e02728cd745de91b1660a67df6caf00aa097a4a0 (diff) | |
download | org.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.java | 15 |
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
|