blob: 5da7812f04a92aa57c21d2f21a82f2e1b8cd0096 [file] [log] [blame]
/******************************************************************************
* Copyright (c) 2005 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.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.gmf.examples.runtime.diagram.logic.internal.figures.LogicColorConstants;
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 OrGateView Factory class
*
* @author mmostafa
*/
public class OrGateViewFactory
extends LogicGateViewFactory {
/**
* @param semanticAdapter
* @param containerView
* @param semanticHint
* @param index
* @param persisted
*/
public View createView(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted, final PreferencesHint preferencesHint) {
View view = super.createView(semanticAdapter, containerView, semanticHint,
index, persisted, preferencesHint);
ShapeStyle style = (ShapeStyle)view.getStyle(NotationPackage.eINSTANCE.getShapeStyle());
style.setFillColor((FigureUtilities.colorToInteger(LogicColorConstants.orGate)).intValue());
return view;
}
}