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


Java Node.setLayoutConstraint方法代码示例

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


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

示例1: setCompositeStateLayoutConstraint

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
 * Iterates through all {@link StateEditPart}s of the current selection and
 * computes layout constraints for the composite node.
 * 
 * @param compositeStateNode
 *            node of the composite state
 */
protected void setCompositeStateLayoutConstraint(Node compositeStateNode) {

	Rectangle newbounds = null;
	
	for (GraphicalEditPart editPart : getContextObjects()) {
		Rectangle childBounds = editPart.getFigure().getBounds();
		if (newbounds == null)
			newbounds = childBounds.getCopy();
		
		newbounds.union(childBounds);
	}
	newbounds.expand(new Insets(PADDING, PADDING, PADDING, PADDING));

	Bounds bounds = NotationFactory.eINSTANCE.createBounds();
	bounds.setX(newbounds.x);
	bounds.setY(newbounds.y);
	bounds.setWidth(newbounds.width);
	bounds.setHeight(newbounds.height);
	compositeStateNode.setLayoutConstraint(bounds);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:28,代码来源:GroupStatesIntoCompositeRefactoring.java

示例2: createState_2001

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的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

示例3: setTextCompartmentLayoutConstraint

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
private static void setTextCompartmentLayoutConstraint(Node textCompartment) {
	Bounds bounds = NotationFactory.eINSTANCE.createBounds();
	bounds.setX(INITIAL_TEXT_COMPARTMENT_X);
	bounds.setY(INITIAL_TEXT_COMPARTMENT_Y);
	bounds.setHeight(INITIAL_TEXT_COMPARTMENT_HEIGHT);
	bounds.setWidth(INITIAL_TEXT_COMPARTMENT_WIDTH);
	textCompartment.setLayoutConstraint(bounds);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:9,代码来源:FactoryUtils.java

示例4: setRegionViewLayoutConstraint

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
private static void setRegionViewLayoutConstraint(Node regionView) {
	Bounds bounds = NotationFactory.eINSTANCE.createBounds();
	bounds.setX(INITIAL_TEXT_COMPARTMENT_WIDTH + INITIAL_TEXT_COMPARTMENT_X + SPACING);
	bounds.setY(INITIAL_TEXT_COMPARTMENT_Y);
	bounds.setHeight(INITIAL_REGION_HEIGHT);
	bounds.setWidth(INITIAL_REGION_WIDTH);
	regionView.setLayoutConstraint(bounds);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:9,代码来源:FactoryUtils.java

示例5: addLayoutConstraintForAllChildren

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
private void addLayoutConstraintForAllChildren(View state) {
	Iterator<?> it = state.getChildren().iterator();
	while (it.hasNext()) {
		Object next = it.next();
		if (next instanceof Node) {
			Node currentNode = (Node) next;
			if (currentNode.getLayoutConstraint() == null) {
				currentNode.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
			}
		}
	}
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:13,代码来源:FixStateContentSizesCommand.java

示例6: createInitialState_2002

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
 * @generated
 */
public Node createInitialState_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());
	node.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(StateMachineVisualIDRegistry
			.getType(InitialStateEditPart.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());
	}
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:43,代码来源:StateMachineViewProvider.java

示例7: createModel_2002

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的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

示例8: createFinalState_2003

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
* @generated
*/
public Node createFinalState_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());
	node.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(
			edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry.getType(
					edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.FinalStateEditPart.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());
	}
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:37,代码来源:StateMachine_MAVOViewProvider.java

示例9: createCustomRequirement_4006

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
 * @generated
 */
public Edge createCustomRequirement_4006(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(TransformationDependencyVisualIDRegistry.getType(CustomRequirementEditPart.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);
	}
	Node label6006 = createLabel(edge,
			TransformationDependencyVisualIDRegistry.getType(CustomRequirementLabelEditPart.VISUAL_ID));
	label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6006 = (Location) label6006.getLayoutConstraint();
	location6006.setX(0);
	location6006.setY(40);
	return edge;
}
 
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:43,代码来源:TransformationDependencyViewProvider.java

示例10: createInitialState_2002

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
* @generated
*/
public Node createInitialState_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());
	node.getStyles().add(NotationFactory.eINSTANCE.createLineStyle());
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(
			edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry.getType(
					edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.InitialStateEditPart.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());
	}
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:37,代码来源:StateMachine_MAVOViewProvider.java

示例11: createMappingReference_2003

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
* @generated
*/
public Node createMappingReference_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());
	node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
	node.setType(MIDVisualIDRegistry.getType(MappingReference2EditPart.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(WrappingLabel5EditPart.VISUAL_ID));
	Node label5008 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel6EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:31,代码来源:MIDViewProvider.java

示例12: createModelEndpointReference_2001

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
* @generated
*/
public Node createModelEndpointReference_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(MIDVisualIDRegistry.getType(ModelEndpointReferenceEditPart.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(WrappingLabelEditPart.VISUAL_ID));
	Node label5004 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel2EditPart.VISUAL_ID));
	createCompartment(node,
			MIDVisualIDRegistry.getType(ModelEndpointReferenceModelEndpointReferenceCompartmentEditPart.VISUAL_ID),
			false, false, true, true);
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:34,代码来源:MIDViewProvider.java

示例13: createModelElementReference_3003

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
/**
* @generated
*/
public Node createModelElementReference_3003(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(MIDVisualIDRegistry.getType(ModelElementReference3EditPart.VISUAL_ID));
	ViewUtil.insertChildView(containerView, node, index, persisted);
	node.setElement(domainElement);
	// 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 label5011 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel13EditPart.VISUAL_ID));
	Node label5012 = createLabel(node, MIDVisualIDRegistry.getType(WrappingLabel14EditPart.VISUAL_ID));
	return node;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:30,代码来源:MIDViewProvider.java

示例14: setStateViewLayoutConstraint

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
private static void setStateViewLayoutConstraint(Node stateNode) {
	Bounds bounds = NotationFactory.eINSTANCE.createBounds();
	bounds.setX(40);
	bounds.setY(80);
	stateNode.setLayoutConstraint(bounds);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:7,代码来源:FactoryUtils.java

示例15: setInitialStateViewLayoutConstraint

import org.eclipse.gmf.runtime.notation.Node; //导入方法依赖的package包/类
private static void setInitialStateViewLayoutConstraint(Node initialStateView) {
	Bounds bounds = NotationFactory.eINSTANCE.createBounds();
	bounds.setX(70);
	bounds.setY(20);
	initialStateView.setLayoutConstraint(bounds);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:7,代码来源:FactoryUtils.java


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