diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation/src/org/eclipse/papyrus/uml/diagram/navigation/UMLNavigationColorProvider.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation/src/org/eclipse/papyrus/uml/diagram/navigation/UMLNavigationColorProvider.java | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation/src/org/eclipse/papyrus/uml/diagram/navigation/UMLNavigationColorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation/src/org/eclipse/papyrus/uml/diagram/navigation/UMLNavigationColorProvider.java index cfe7eb42769..21591b3d0d6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation/src/org/eclipse/papyrus/uml/diagram/navigation/UMLNavigationColorProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation/src/org/eclipse/papyrus/uml/diagram/navigation/UMLNavigationColorProvider.java @@ -1,43 +1,43 @@ -/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.navigation;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.papyrus.infra.gmfdiag.navigation.NavigableElement;
-import org.eclipse.swt.graphics.Color;
-
-public class UMLNavigationColorProvider implements IColorProvider {
-
- @Override
- public Color getForeground(Object element) {
- // not used
- return getBackground(element);
- }
-
- @Override
- public Color getBackground(Object element) {
- if (element instanceof NavigableElement) {
- String navType = UMLNavigationHelper.getNavigationType((NavigableElement) element);
- if (UMLNavigationHelper.BEHAVIORAL_NAVIGATION.equals(navType)) {
- return ColorConstants.lightGreen;
- }
- if (UMLNavigationHelper.STRUCTURAL_NAVIGATION.equals(navType)) {
- return ColorConstants.lightBlue;
- }
- }
- return null;
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2011 Atos Origin. + * + * + * 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: + * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.navigation; + +import org.eclipse.draw2d.ColorConstants; +import org.eclipse.jface.viewers.IColorProvider; +import org.eclipse.papyrus.infra.gmfdiag.navigation.NavigableElement; +import org.eclipse.swt.graphics.Color; + +public class UMLNavigationColorProvider implements IColorProvider { + + @Override + public Color getForeground(Object element) { + // not used + return getBackground(element); + } + + @Override + public Color getBackground(Object element) { + if (element instanceof NavigableElement) { + String navType = UMLNavigationHelper.getNavigationType((NavigableElement) element); + if (UMLNavigationHelper.BEHAVIORAL_NAVIGATION.equals(navType)) { + return ColorConstants.lightGreen; + } + if (UMLNavigationHelper.STRUCTURAL_NAVIGATION.equals(navType)) { + return ColorConstants.lightBlue; + } + } + return null; + } + +} |