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


Java HintedDiagramLinkStyle类代码示例

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


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

示例1: getOpenCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * Gets the command to open a model editor.
 * 
 * @param req
 *            The request.
 * @return The executable command.
 */
@Override
protected Command getOpenCommand(Request request) {

	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE
			.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new ModelOpenEditorCommand(
			(HintedDiagramLinkStyle) link));
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:ModelOpenEditorEditPolicy.java

示例2: getOpenCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * Gets the command to open an operator editor.
 * 
 * @param req
 *            The request.
 * @return The executable command.
 */
@Override
protected Command getOpenCommand(Request request) {

	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE
			.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new OperatorOpenEditorCommand(
			(HintedDiagramLinkStyle) link));
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:OperatorOpenEditorEditPolicy.java

示例3: getOpenCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
protected Command getOpenCommand(Request request) {
	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE
			.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new OpenDiagramCommand(
			(HintedDiagramLinkStyle) link));
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:18,代码来源:OpenDiagramEditPolicy.java

示例4: OpenDiagramCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
	// editing domain is taken for original diagram, 
	// if we open diagram from another file, we should use another editing domain
	super(TransactionUtil.getEditingDomain(linkStyle),
			SimpleBPMN.diagram.part.Messages.CommandName_OpenDiagram,
			null);
	diagramFacet = linkStyle;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:12,代码来源:OpenDiagramEditPolicy.java

示例5: getOpenCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
* @generated
*/
protected Command getOpenCommand(Request request) {
	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new OpenDiagramCommand((HintedDiagramLinkStyle) link));
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:16,代码来源:OpenDiagramEditPolicy.java

示例6: OpenDiagramCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
* @generated
*/
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
	// editing domain is taken for original diagram, 
	// if we open diagram from another file, we should use another editing domain
	super(TransactionUtil.getEditingDomain(linkStyle),
			edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.CommandName_OpenDiagram,
			null);
	diagramFacet = linkStyle;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:12,代码来源:OpenDiagramEditPolicy.java

示例7: OpenDiagramCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
	// editing domain is taken for original diagram, 
	// if we open diagram from another file, we should use another editing domain
	super(
			TransactionUtil.getEditingDomain(linkStyle),
			edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.Messages.CommandName_OpenDiagram,
			null);
	diagramFacet = linkStyle;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:13,代码来源:OpenDiagramEditPolicy.java

示例8: OpenDiagramCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
	// editing domain is taken for original diagram, 
	// if we open diagram from another file, we should use another editing domain
	super(
			TransactionUtil.getEditingDomain(linkStyle),
			edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.Messages.CommandName_OpenDiagram,
			null);
	diagramFacet = linkStyle;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:13,代码来源:OpenDiagramEditPolicy.java

示例9: getOpenCommandGen

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
protected Command getOpenCommandGen(Request request) {
	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new OpenDiagramCommand((HintedDiagramLinkStyle) link));
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:16,代码来源:ModelRelOpenDiagramEditPolicy.java

示例10: getOpenCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated NOT
 */
protected Command getOpenCommand(Request request) {
	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new ModelRelOpenEditorCommand((HintedDiagramLinkStyle) link));
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:16,代码来源:ModelRelOpenDiagramEditPolicy.java

示例11: OpenDiagramCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
	// editing domain is taken for original diagram, 
	// if we open diagram from another file, we should use another editing domain
	super(TransactionUtil.getEditingDomain(linkStyle), Messages.CommandName_OpenDiagram, null);
	diagramFacet = linkStyle;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:10,代码来源:ModelRelOpenDiagramEditPolicy.java

示例12: OpenDiagramCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
* @generated
*/
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
	// editing domain is taken for original diagram, 
	// if we open diagram from another file, we should use another editing domain
	super(TransactionUtil.getEditingDomain(linkStyle), Messages.CommandName_OpenDiagram, null);
	diagramFacet = linkStyle;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:10,代码来源:OperatorOpenDiagramEditPolicy.java

示例13: getOpenCommand

import org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle; //导入依赖的package包/类
/**
 * @generated
 */
protected Command getOpenCommand(Request request) {
	EditPart targetEditPart = getTargetEditPart(request);
	if (false == targetEditPart.getModel() instanceof View) {
		return null;
	}
	View view = (View) targetEditPart.getModel();
	Style link = view.getStyle(NotationPackage.eINSTANCE.getHintedDiagramLinkStyle());
	if (false == link instanceof HintedDiagramLinkStyle) {
		return null;
	}
	return new ICommandProxy(new OpenDiagramCommand((HintedDiagramLinkStyle) link));
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:16,代码来源:ModelOpenDiagramEditPolicy.java

示例14: 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

示例15: 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


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