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


Java HintedDiagramLinkStyle.setHint方法代码示例

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


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

示例1: createModel_2001

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createModel_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());
	{
		HintedDiagramLinkStyle diagramFacet = NotationFactory.eINSTANCE.createHintedDiagramLinkStyle();
		diagramFacet.setHint("Mid"); //$NON-NLS-1$
		node.getStyles().add(diagramFacet);
	}
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(MIDVisualIDRegistry.getType(ModelEditPart.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, MIDVisualIDRegistry.getType(WrappingLabelEditPart.VISUAL_ID));
	Node label5002 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel2EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:MIDViewProvider.java

示例2: createModel_2002

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createModel_2002(
		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());
	{
		HintedDiagramLinkStyle diagramFacet = NotationFactory.eINSTANCE.createHintedDiagramLinkStyle();
		diagramFacet.setHint("Mid"); //$NON-NLS-1$
		node.getStyles().add(diagramFacet);
	}
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(MIDVisualIDRegistry.getType(Model2EditPart.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 label5003 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel3EditPart.VISUAL_ID));
	Node label5004 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel4EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:MIDViewProvider.java

示例3: createModelRel_2003

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createModelRel_2003(
		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());
	{
		HintedDiagramLinkStyle diagramFacet = NotationFactory.eINSTANCE.createHintedDiagramLinkStyle();
		diagramFacet.setHint("Relationship"); //$NON-NLS-1$
		node.getStyles().add(diagramFacet);
	}
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(MIDVisualIDRegistry.getType(ModelRelEditPart.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 label5005 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel5EditPart.VISUAL_ID));
	Node label5006 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel6EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:MIDViewProvider.java

示例4: createModelRel_2004

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createModelRel_2004(
		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());
	{
		HintedDiagramLinkStyle diagramFacet = NotationFactory.eINSTANCE.createHintedDiagramLinkStyle();
		diagramFacet.setHint("Relationship"); //$NON-NLS-1$
		node.getStyles().add(diagramFacet);
	}
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(MIDVisualIDRegistry.getType(ModelRel2EditPart.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 label5007 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel7EditPart.VISUAL_ID));
	Node label5008 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel8EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:MIDViewProvider.java

示例5: createOperator_2005

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createOperator_2005(
		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());
	{
		HintedDiagramLinkStyle diagramFacet = NotationFactory.eINSTANCE.createHintedDiagramLinkStyle();
		diagramFacet.setHint("Mid"); //$NON-NLS-1$
		node.getStyles().add(diagramFacet);
	}
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(MIDVisualIDRegistry.getType(OperatorEditPart.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 label5009 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel9EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:35,代码来源:MIDViewProvider.java

示例6: createBinaryModelRel_4003

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入方法依赖的package包/类
/**
 * Adds missing diagram hint for binary model relationships and customizes label creation.
 */
@SuppressWarnings("unchecked")
@Override
public Edge createBinaryModelRel_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {

	Edge edge = _createBinaryModelRel_4003(domainElement, containerView, index, persisted, preferencesHint);
	HintedDiagramLinkStyle diagramFacet = NotationFactory.eINSTANCE.createHintedDiagramLinkStyle();
	diagramFacet.setHint("Relationship");
	edge.getStyles().add(diagramFacet);

	return edge;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:15,代码来源:MIDDiagramViewProvider.java


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