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