Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java
new file mode 100644
index 00000000000..757a57126f5
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences/src/org/eclipse/papyrus/infra/gmfdiag/preferences/ui/NodeColorGroup.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr
+ * Thibault Landre (Atos Origin)
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.preferences.ui;
+
+import org.eclipse.gmf.runtime.diagram.ui.properties.internal.l10n.DiagramUIPropertiesImages;
+import org.eclipse.jface.dialogs.DialogPage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.jface.preference.ColorFieldEditor;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * The Class NodeColorGroup contains field editor to manage color of a node
+ */
+public class NodeColorGroup extends LinkColorGroup {
+
+ /** The font color editor. */
+ protected ColorFieldEditor fontColorEditor;
+
+ /** The line color editor. */
+ protected ColorFieldEditor lineColorEditor;
+
+ /** The fill color editor. */
+ protected ColorFieldEditor fillColorEditor;
+
+ /**
+ * create a composite to display the group color for a node.
+ *
+ * @param parent
+ * the parent of the composite
+ * @param dialogPage
+ * to set the page in field editor
+ * @param title
+ * the title
+ */
+
+
+ public NodeColorGroup(Composite parent, String title, DialogPage dialogPage) {
+ super(parent, title, dialogPage);
+ }
+
+ /**
+ * create the content.
+ *
+ * @param parent
+ * : the parent composite
+ */
+ protected void createContent(Composite parent) {
+ super.createContent(parent);
+
+ Composite fillColorEditorCompo = getEncapsulatedCompo(getToolbar());
+ fillColorEditor = new ColorFieldEditor(getPreferenceConstant(PreferenceConstantHelper.COLOR_FILL), DiagramUIPropertiesImages.get(DiagramUIPropertiesImages.IMG_FILL_COLOR), fillColorEditorCompo);
+ fillColorEditor.setPage(dialogPage);
+
+ addFieldEditor(fillColorEditor);
+ }
+
+}

Back to the top