Search in sources :

Example 1 with DefaultSizeNodeFigure

use of org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure in project statecharts by Yakindu.

the class FixedSizeShapeNodeEditPart method createNodeFigure.

@Override
protected NodeFigure createNodeFigure() {
    final NodeFigure figure = new DefaultSizeNodeFigure(getDefaultSize());
    figure.setLayoutManager(getLayoutManager());
    figure.add(createPrimaryShape());
    return figure;
}
Also used : DefaultSizeNodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure) DefaultSizeNodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure) NodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure)

Example 2 with DefaultSizeNodeFigure

use of org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure in project statecharts by Yakindu.

the class StateEditPart method createNodeFigure.

@Override
protected NodeFigure createNodeFigure() {
    NodeFigure figure = new DefaultSizeNodeFigure(getDefaultSize()) {

        @Override
        public // StateFigure is drawed smaller (Blurshadow size)
        Rectangle getHandleBounds() {
            Insets insets = new Insets(0, 0, StateFigure.BLUR_SHADOW_WIDTH, StateFigure.BLUR_SHADOW_WIDTH);
            return new Rectangle(getBounds().x + insets.left, getBounds().y + insets.top, getBounds().width - (insets.right + insets.left), getBounds().height - (insets.bottom + insets.top));
        }
    };
    figure.setLayoutManager(new StackLayout());
    figure.setMinimumSize(getDefaultSize());
    figure.add(createPrimaryShape());
    return figure;
}
Also used : DefaultSizeNodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure) Insets(org.eclipse.draw2d.geometry.Insets) DefaultSizeNodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure) NodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure) Rectangle(org.eclipse.draw2d.geometry.Rectangle) StackLayout(org.eclipse.draw2d.StackLayout)

Example 3 with DefaultSizeNodeFigure

use of org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure in project statecharts by Yakindu.

the class SynchronizationEditPart method createNodeFigure.

@Override
protected NodeFigure createNodeFigure() {
    final DefaultSizeNodeFigure nodeFigure = new DefaultSizeNodeFigure(getMapMode().DPtoLP(DEFAULT_WIDTH), getMapMode().DPtoLP(DEFAULT_HEIGHT));
    nodeFigure.setLayoutManager(new StackLayout());
    nodeFigure.add(new SynchronizationFigure(getMapMode()));
    nodeFigure.setForegroundColor(ColorConstants.black);
    nodeFigure.setBackgroundColor(ColorConstants.black);
    return nodeFigure;
}
Also used : DefaultSizeNodeFigure(org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure) StackLayout(org.eclipse.draw2d.StackLayout) SynchronizationFigure(org.yakindu.sct.ui.editor.editor.figures.SynchronizationFigure)

Aggregations

DefaultSizeNodeFigure (org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure)3 StackLayout (org.eclipse.draw2d.StackLayout)2 NodeFigure (org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure)2 Insets (org.eclipse.draw2d.geometry.Insets)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 SynchronizationFigure (org.yakindu.sct.ui.editor.editor.figures.SynchronizationFigure)1