Search in sources :

Example 26 with FreeformLayer

use of org.eclipse.draw2d.FreeformLayer in project statecharts by Yakindu.

the class SCTRenderedDiagramRootEditPart method createLayers.

@Override
protected void createLayers(LayeredPane layeredPane) {
    super.createLayers(layeredPane);
    layeredPane.add(new FreeformLayer(), WATERMARK_LAYER);
}
Also used : FreeformLayer(org.eclipse.draw2d.FreeformLayer)

Example 27 with FreeformLayer

use of org.eclipse.draw2d.FreeformLayer in project gemoc-studio by eclipse.

the class BranchEditPart method createFigure.

@Override
protected IFigure createFigure() {
    final LineLayout layout = new LineLayout();
    layout.setHorizontal(true);
    layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorAlignment(FlowLayout.ALIGN_BOTTOMRIGHT);
    layout.setMinorSpacing(SPACING);
    layout.setMargin(MARGIN);
    FreeformLayer res = new FreeformLayer();
    final Label toolTip = new Label();
    toolTip.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
    toolTip.setBackgroundColor(ColorConstants.tooltipBackground);
    toolTip.setForegroundColor(ColorConstants.tooltipForeground);
    toolTip.setText(getModel().getTimelineWindow().getProvider().getTextAt(getModel().getBranch()));
    res.setToolTip(toolTip);
    res.setLayoutManager(layout);
    return res;
}
Also used : Label(org.eclipse.draw2d.Label) LineLayout(org.eclipse.gemoc.timeline.layout.LineLayout) FreeformLayer(org.eclipse.draw2d.FreeformLayer)

Example 28 with FreeformLayer

use of org.eclipse.draw2d.FreeformLayer in project gemoc-studio by eclipse.

the class ChoiceEditPart method createFigure.

@Override
protected IFigure createFigure() {
    final LineLayout layout = new LineLayout();
    layout.setHorizontal(false);
    layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorSpacing(SPACING);
    FreeformLayer res = new FreeformLayer();
    res.setLayoutManager(layout);
    label = new Label();
    res.add(label);
    return res;
}
Also used : Label(org.eclipse.draw2d.Label) LineLayout(org.eclipse.gemoc.timeline.layout.LineLayout) FreeformLayer(org.eclipse.draw2d.FreeformLayer)

Aggregations

FreeformLayer (org.eclipse.draw2d.FreeformLayer)28 Figure (org.eclipse.draw2d.Figure)9 IFigure (org.eclipse.draw2d.IFigure)9 FreeformLayout (org.eclipse.draw2d.FreeformLayout)8 ScalableFreeformLayeredPane (org.eclipse.draw2d.ScalableFreeformLayeredPane)4 ConnectionLayer (org.eclipse.draw2d.ConnectionLayer)3 FreeformLayeredPane (org.eclipse.draw2d.FreeformLayeredPane)3 Rectangle (org.eclipse.draw2d.geometry.Rectangle)3 LineLayout (org.eclipse.gemoc.timeline.layout.LineLayout)3 Rectangle (org.eclipse.swt.graphics.Rectangle)3 Test (org.junit.Test)3 Label (org.eclipse.draw2d.Label)2 MarginBorder (org.eclipse.draw2d.MarginBorder)2 Image (org.eclipse.swt.graphics.Image)2 Shell (org.eclipse.swt.widgets.Shell)2 DelegatingLayout (org.eclipse.draw2d.DelegatingLayout)1 Graphics (org.eclipse.draw2d.Graphics)1 GridLayout (org.eclipse.draw2d.GridLayout)1 LayeredPane (org.eclipse.draw2d.LayeredPane)1 LineBorder (org.eclipse.draw2d.LineBorder)1