| /****************************************************************************** |
| * Copyright (c) 2005, 2009 IBM Corporation and others. |
| * 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: |
| * IBM Corporation - initial API and implementation |
| ****************************************************************************/ |
| |
| package org.eclipse.gmf.examples.runtime.diagram.logic.internal.views.factories; |
| |
| import org.eclipse.core.runtime.IAdaptable; |
| import org.eclipse.gmf.examples.runtime.diagram.logic.internal.figures.LogicColorConstants; |
| import org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.ShapeViewFactory; |
| import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities; |
| import org.eclipse.gmf.runtime.notation.NotationPackage; |
| import org.eclipse.gmf.runtime.notation.ShapeStyle; |
| import org.eclipse.gmf.runtime.notation.View; |
| |
| /** |
| * The LogicGateView Factory class |
| * @author mmostafa |
| */ |
| public class LogicGateViewFactory |
| extends ShapeViewFactory { |
| |
| protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { |
| super.decorateView(containerView, view, semanticAdapter, semanticHint, index, |
| persisted); |
| ShapeStyle style = (ShapeStyle)view.getStyle(NotationPackage.eINSTANCE.getShapeStyle()); |
| style.setLineColor((FigureUtilities.colorToInteger(LogicColorConstants.logicBlack)).intValue()); |
| |
| } |
| } |