Search in sources :

Example 1 with IMapMode

use of org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode in project tdi-studio-se by Talend.

the class BusinessItemRelationshipNameViewFactory method createView.

/**
     * @generated
     */
public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
    Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
    Location location = (Location) view.getLayoutConstraint();
    IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit());
    location.setX(mapMode.DPtoLP(0));
    location.setY(mapMode.DPtoLP(40));
    return view;
}
Also used : Node(org.eclipse.gmf.runtime.notation.Node) IMapMode(org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode) Location(org.eclipse.gmf.runtime.notation.Location)

Example 2 with IMapMode

use of org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode in project tdi-studio-se by Talend.

the class DirectionalBusinessItemRelationshipNameViewFactory method createView.

/**
     * @generated
     */
public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
    Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
    Location location = (Location) view.getLayoutConstraint();
    IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit());
    location.setX(mapMode.DPtoLP(0));
    location.setY(mapMode.DPtoLP(40));
    return view;
}
Also used : Node(org.eclipse.gmf.runtime.notation.Node) IMapMode(org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode) Location(org.eclipse.gmf.runtime.notation.Location)

Example 3 with IMapMode

use of org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode in project tdi-studio-se by Talend.

the class BidirectionalBusinessItemRelationshipNameViewFactory method createView.

/**
     * @generated
     */
public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
    Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
    Location location = (Location) view.getLayoutConstraint();
    IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit());
    location.setX(mapMode.DPtoLP(0));
    location.setY(mapMode.DPtoLP(40));
    return view;
}
Also used : Node(org.eclipse.gmf.runtime.notation.Node) IMapMode(org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode) Location(org.eclipse.gmf.runtime.notation.Location)

Aggregations

IMapMode (org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode)3 Location (org.eclipse.gmf.runtime.notation.Location)3 Node (org.eclipse.gmf.runtime.notation.Node)3