本文整理汇总了Java中org.eclipse.gmf.runtime.notation.Connector类的典型用法代码示例。如果您正苦于以下问题:Java Connector类的具体用法?Java Connector怎么用?Java Connector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Connector类属于org.eclipse.gmf.runtime.notation包,在下文中一共展示了Connector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: colorDiagramElement
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
public static void colorDiagramElement(View diagramView, int color, int fontColor) throws MMINTException {
if (!(diagramView instanceof Shape) && !(diagramView instanceof Connector)) {
throw new MMINTException("Diagram element not supported: " + diagramView.getClass().getName());
}
if (diagramView instanceof Shape) {
Shape node = (Shape) diagramView;
node.setFillColor(color);
node.setLineColor(color);
node.setFontColor(fontColor);
}
else if (diagramView instanceof Connector) {
Connector edge = (Connector) diagramView;
edge.setLineColor(color);
FontStyle labelFont = (FontStyle) edge.getStyles().get(0);
labelFont.setFontColor(fontColor);
}
}
示例2: createDependency_4002
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createDependency_4002(
EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(ClassDiagramVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter
.getColor(prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(
edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例3: createTransition_4001
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createTransition_4001(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(StatemachineVisualIDRegistry
.getType(TransitionEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例4: postProcessDifferences
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
private static Collection<Diff> postProcessDifferences(Collection<Diff> diffs) {
List<Diff> result = Lists.newLinkedList();
LinkedList<ReferenceChange> potentialCorrectReferences = Lists
.newLinkedList(diffs.stream().filter(d -> d instanceof ReferenceChange).map(d -> (ReferenceChange) d)
.filter(d -> Arrays.asList(NotationPackage.eINSTANCE.getEdge_Source(),
NotationPackage.eINSTANCE.getEdge_Target()).contains(d.getReference()))
.collect(Collectors.toSet()));
while (!potentialCorrectReferences.isEmpty()) {
ReferenceChange c1 = potentialCorrectReferences.pop();
Set<ReferenceChange> candidates = potentialCorrectReferences.stream()
.filter(c -> c.getMatch() == c1.getMatch()).collect(Collectors.toSet());
if (candidates.size() != 1) {
continue;
}
ReferenceChange c2 = candidates.iterator().next();
Match parentMatch = c1.getMatch();
Connector matchLeft = (Connector) parentMatch.getLeft();
View matchLeftSource = matchLeft.getSource();
View matchLeftTarget = matchLeft.getTarget();
Connector matchRight = (Connector) parentMatch.getRight();
View matchRightSource = matchRight.getSource();
View matchRightTarget = matchRight.getTarget();
MatchValueSideConverter sideConverter = new MatchValueSideConverter();
sideConverter.add(parentMatch.getComparison().getMatch(c1.getValue()));
sideConverter.add(parentMatch.getComparison().getMatch(c2.getValue()));
if (sideConverter.convert(matchLeftSource) == matchRightTarget
&& sideConverter.convert(matchLeftTarget) == matchRightSource) {
potentialCorrectReferences.remove(c2);
result.add(c1);
result.add(c2);
}
}
return result;
}
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:43,代码来源:TextualToGraphicalClassTest.java
示例5: createContractRoleAID_4001
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createContractRoleAID_4001(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
.createRelativeBendpoints();
ArrayList points = new ArrayList(2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(SmcVisualIDRegistry
.getType(ContractRoleAIDEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
.getLineStyle_LineColor(), FigureUtilities
.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例6: createContractRoleBID_4002
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createContractRoleBID_4002(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
.createRelativeBendpoints();
ArrayList points = new ArrayList(2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(SmcVisualIDRegistry
.getType(ContractRoleBIDEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
.getLineStyle_LineColor(), FigureUtilities
.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例7: createFactLink_4003
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createFactLink_4003(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
.createRelativeBendpoints();
ArrayList points = new ArrayList(2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(SmcVisualIDRegistry.getType(FactLinkEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
.getLineStyle_LineColor(), FigureUtilities
.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例8: createFactLink_4006
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createFactLink_4006(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
.createRelativeBendpoints();
ArrayList points = new ArrayList(2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(SmcVisualIDRegistry.getType(FactLink2EditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
.getLineStyle_LineColor(), FigureUtilities
.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例9: createPlayerBinding_4004
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createPlayerBinding_4004(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
.createRelativeBendpoints();
ArrayList points = new ArrayList(2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(SmcVisualIDRegistry
.getType(PlayerBindingEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
.getLineStyle_LineColor(), FigureUtilities
.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例10: createExternalFactLink_4005
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createExternalFactLink_4005(EObject domainElement,
View containerView, int index, boolean persisted,
PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
.createRelativeBendpoints();
ArrayList points = new ArrayList(2);
points.add(new RelativeBendpoint());
points.add(new RelativeBendpoint());
bendpoints.setPoints(points);
edge.setBendpoints(bendpoints);
ViewUtil.insertChildView(containerView, edge, index, persisted);
edge.setType(SmcVisualIDRegistry
.getType(ExternalFactLinkEditPart.VISUAL_ID));
edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE
.getLineStyle_LineColor(), FigureUtilities
.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例11: createGroupFirstTeam_4001
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createGroupFirstTeam_4001(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(Wc2014VisualIDRegistry
.getType(GroupFirstTeamEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例12: createMatchHome_4002
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createMatchHome_4002(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(Wc2014VisualIDRegistry
.getType(MatchHomeEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例13: createGroupSecondTeam_4003
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createGroupSecondTeam_4003(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(Wc2014VisualIDRegistry
.getType(GroupSecondTeamEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例14: createMatchAway_4004
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createMatchAway_4004(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(Wc2014VisualIDRegistry
.getType(MatchAwayEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}
示例15: createTeamAtGroup_4005
import org.eclipse.gmf.runtime.notation.Connector; //导入依赖的package包/类
/**
* @generated
*/
public Edge createTeamAtGroup_4005(View containerView, int index,
boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
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(Wc2014VisualIDRegistry
.getType(TeamAtGroupEditPart.VISUAL_ID));
edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
prefStore, IPreferenceConstants.PREF_LINE_COLOR);
ViewUtil.setStructuralFeatureValue(edge,
NotationPackage.eINSTANCE.getLineStyle_LineColor(),
FigureUtilities.RGBToInteger(lineRGB));
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);
}
return edge;
}