当前位置: 首页>>代码示例>>Java>>正文


Java FontStyle.setFontColor方法代码示例

本文整理汇总了Java中org.eclipse.gmf.runtime.notation.FontStyle.setFontColor方法的典型用法代码示例。如果您正苦于以下问题:Java FontStyle.setFontColor方法的具体用法?Java FontStyle.setFontColor怎么用?Java FontStyle.setFontColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.gmf.runtime.notation.FontStyle的用法示例。


在下文中一共展示了FontStyle.setFontColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createState_2001

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createState_2001(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Node node = NotationFactory.eINSTANCE.createNode();
	node.getStyles()
			.add(NotationFactory.eINSTANCE.createDescriptionStyle());
	node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(StatemachineVisualIDRegistry
			.getType(StateEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Node label5001 = createLabel(node,
			StatemachineVisualIDRegistry
					.getType(StateNameEditPart.VISUAL_ID));
	return node;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:38,代码来源:StatemachineViewProvider.java

示例2: createTransition_4001

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createTransition_4001(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
			.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
			2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(StatemachineVisualIDRegistry
			.getType(TransitionEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Routing routing = Routing.get(prefStore
			.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge,
				NotationPackage.eINSTANCE.getRoutingStyle_Routing(),
				routing);
	}
	return edge;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:53,代码来源:StatemachineViewProvider.java

示例3: createSMC_2001

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createSMC_2001(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SmcVisualIDRegistry.getType(SMCEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE
			.getLineStyle_LineColor(), FigureUtilities
			.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE
			.getFillStyle_FillColor(), FigureUtilities
			.RGBToInteger(fillRGB));
	Node label5003 = createLabel(node, SmcVisualIDRegistry
			.getType(SMCNameEditPart.VISUAL_ID));
	label5003.setLayoutConstraint(NotationFactory.eINSTANCE
			.createLocation());
	Location location5003 = (Location) label5003.getLayoutConstraint();
	location5003.setX(0);
	location5003.setY(5);
	createCompartment(node, SmcVisualIDRegistry
			.getType(SMCSMCCompartmentEditPart.VISUAL_ID), false, false,
			false, false);
	return node;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:52,代码来源:SmcViewProvider.java

示例4: createPlayer_2002

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createPlayer_2002(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SmcVisualIDRegistry.getType(PlayerEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE
			.getLineStyle_LineColor(), FigureUtilities
			.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node, NotationPackage.eINSTANCE
			.getFillStyle_FillColor(), FigureUtilities
			.RGBToInteger(fillRGB));
	Node label5004 = createLabel(node, SmcVisualIDRegistry
			.getType(WrappingLabelEditPart.VISUAL_ID));
	label5004.setLayoutConstraint(NotationFactory.eINSTANCE
			.createLocation());
	Location location5004 = (Location) label5004.getLayoutConstraint();
	location5004.setX(0);
	location5004.setY(5);
	return node;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:49,代码来源:SmcViewProvider.java

示例5: createDataObject_2008

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createDataObject_2008(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
			.getType(SimpleBPMN.diagram.edit.parts.DataObjectEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getFillStyle_FillColor(),
			FigureUtilities.RGBToInteger(fillRGB));
	Node label5008 = createLabel(
			node,
			SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
					.getType(SimpleBPMN.diagram.edit.parts.DataObjectNameEditPart.VISUAL_ID));
	label5008.setLayoutConstraint(NotationFactory.eINSTANCE
			.createLocation());
	Location location5008 = (Location) label5008.getLayoutConstraint();
	location5008.setX(0);
	location5008.setY(5);
	return node;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:53,代码来源:SimpleBPMNViewProvider.java

示例6: createStartEvent_3006

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createStartEvent_3006(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
			.getType(SimpleBPMN.diagram.edit.parts.StartEvent2EditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getFillStyle_FillColor(),
			FigureUtilities.RGBToInteger(fillRGB));
	Node label5019 = createLabel(
			node,
			SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
					.getType(SimpleBPMN.diagram.edit.parts.StartEventName2EditPart.VISUAL_ID));
	label5019.setLayoutConstraint(NotationFactory.eINSTANCE
			.createLocation());
	Location location5019 = (Location) label5019.getLayoutConstraint();
	location5019.setX(0);
	location5019.setY(5);
	return node;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:52,代码来源:SimpleBPMNViewProvider.java

示例7: createActivity_3009

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createActivity_3009(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
			.getType(SimpleBPMN.diagram.edit.parts.Activity2EditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getFillStyle_FillColor(),
			FigureUtilities.RGBToInteger(fillRGB));
	Node label5022 = createLabel(
			node,
			SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
					.getType(SimpleBPMN.diagram.edit.parts.ActivityName2EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:46,代码来源:SimpleBPMNViewProvider.java

示例8: createEliminationMatchWinner_4006

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createEliminationMatchWinner_4006(View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
			.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
			2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(Wc2014VisualIDRegistry
			.getType(EliminationMatchWinnerEditPart.VISUAL_ID));
	edge.setElement(null);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Routing routing = Routing.get(prefStore
			.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge,
				NotationPackage.eINSTANCE.getRoutingStyle_Routing(),
				routing);
	}
	return edge;
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:52,代码来源:Wc2014ViewProvider.java

示例9: createPool_2005

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createPool_2005(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
			.getType(SimpleBPMN.diagram.edit.parts.PoolEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getFillStyle_FillColor(),
			FigureUtilities.RGBToInteger(fillRGB));
	Node label5005 = createLabel(
			node,
			SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
					.getType(SimpleBPMN.diagram.edit.parts.PoolNameEditPart.VISUAL_ID));
	return node;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:47,代码来源:SimpleBPMNViewProvider.java

示例10: createMessageFlow_4001

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createMessageFlow_4001(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Edge edge = NotationFactory.eINSTANCE.createEdge();
	edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
			.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
			2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
			.getType(SimpleBPMN.diagram.edit.parts.MessageFlowEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();
	FontStyle edgeFontStyle = (FontStyle) edge
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Routing routing = Routing.get(prefStore
			.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge,
				NotationPackage.eINSTANCE.getRoutingStyle_Routing(),
				routing);
	}
	return edge;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:48,代码来源:SimpleBPMNViewProvider.java

示例11: createFactLink_4006

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createFactLink_4006(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
			.createRelativeBendpoints();
	ArrayList points = new ArrayList(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(SmcVisualIDRegistry.getType(FactLink2EditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
			.getLineStyle_LineColor(), FigureUtilities
			.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Routing routing = Routing.get(prefStore
			.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
				.getRoutingStyle_Routing(), routing);
	}
	return edge;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:49,代码来源:SmcViewProvider.java

示例12: createPlayerBinding_4004

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createPlayerBinding_4004(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
			.createRelativeBendpoints();
	ArrayList points = new ArrayList(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(SmcVisualIDRegistry
			.getType(PlayerBindingEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
			.getLineStyle_LineColor(), FigureUtilities
			.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Routing routing = Routing.get(prefStore
			.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
				.getRoutingStyle_Routing(), routing);
	}
	return edge;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:51,代码来源:SmcViewProvider.java

示例13: createExternalFactLink_4005

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createExternalFactLink_4005(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
			.createRelativeBendpoints();
	ArrayList points = new ArrayList(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(SmcVisualIDRegistry
			.getType(ExternalFactLinkEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
			.getLineStyle_LineColor(), FigureUtilities
			.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	Routing routing = Routing.get(prefStore
			.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
				.getRoutingStyle_Routing(), routing);
	}
	return edge;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:51,代码来源:SmcViewProvider.java

示例14: createEliminationMatch_2001

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createEliminationMatch_2001(EObject domainElement,
		View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(Wc2014VisualIDRegistry
			.getType(EliminationMatchEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getFillStyle_FillColor(),
			FigureUtilities.RGBToInteger(fillRGB));
	Node label5001 = createLabel(node,
			Wc2014VisualIDRegistry
					.getType(EliminationMatchIdEditPart.VISUAL_ID));
	return node;
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:47,代码来源:Wc2014ViewProvider.java

示例15: createActivity_2007

import org.eclipse.gmf.runtime.notation.FontStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createActivity_2007(EObject domainElement, View containerView,
		int index, boolean persisted, PreferencesHint preferencesHint) {
	Shape node = NotationFactory.eINSTANCE.createShape();
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
			.getType(SimpleBPMN.diagram.edit.parts.ActivityEditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	stampShortcut(containerView, node);
	// initializeFromPreferences 
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
			.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle nodeFontStyle = (FontStyle) node
			.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (nodeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore,
				IPreferenceConstants.PREF_DEFAULT_FONT);
		nodeFontStyle.setFontName(fontData.getName());
		nodeFontStyle.setFontHeight(fontData.getHeight());
		nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
				.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
		nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
				.intValue());
	}
	org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(
			prefStore, IPreferenceConstants.PREF_FILL_COLOR);
	ViewUtil.setStructuralFeatureValue(node,
			NotationPackage.eINSTANCE.getFillStyle_FillColor(),
			FigureUtilities.RGBToInteger(fillRGB));
	Node label5007 = createLabel(
			node,
			SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
					.getType(SimpleBPMN.diagram.edit.parts.ActivityNameEditPart.VISUAL_ID));
	return node;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:47,代码来源:SimpleBPMNViewProvider.java


注:本文中的org.eclipse.gmf.runtime.notation.FontStyle.setFontColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。