本文整理汇总了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));
}
示例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));
}
示例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));
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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));
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}