Search in sources :

Example 1 with SyntaxColoringLabel

use of org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel in project statecharts by Yakindu.

the class RegionFigure method createContents.

private void createContents() {
    nameLabel = new SyntaxColoringLabel();
    GridData data = GridDataFactory.fillDefaults().grab(true, false).getData();
    data.horizontalIndent = 5;
    nameLabel.setTextPlacement(PositionConstants.WEST);
    this.add(nameLabel, data);
    /**
     * Compartment container *
     */
    compartmentPane = new RectangleFigure();
    compartmentPane.setOutline(false);
    compartmentPane.setLayoutManager(new StackLayout());
    compartmentPane.setFill(false);
    this.add(compartmentPane, GridDataFactory.fillDefaults().grab(true, true).getData());
}
Also used : RectangleFigure(org.eclipse.draw2d.RectangleFigure) GridData(org.eclipse.draw2d.GridData) StackLayout(org.eclipse.draw2d.StackLayout) SyntaxColoringLabel(org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel)

Example 2 with SyntaxColoringLabel

use of org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel in project statecharts by Yakindu.

the class ExternalXtextLabelEditPart method createFigure.

@Override
protected IFigure createFigure() {
    final WrappingLabel label = new SyntaxColoringLabel();
    label.setTextWrap(true);
    label.setAlignment(PositionConstants.LEFT | PositionConstants.TOP);
    return label;
}
Also used : SyntaxColoringLabel(org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel) WrappingLabel(org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel)

Example 3 with SyntaxColoringLabel

use of org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel in project statecharts by Yakindu.

the class StateFigure method createContents.

protected void createContents() {
    // Name Label
    nameFigure = new SyntaxColoringLabel();
    nameFigure.setAlignment(PositionConstants.CENTER);
    this.add(nameFigure, GridDataFactory.fillDefaults().grab(true, false).getData());
    // Text compartment
    textCompartmentPane = new Figure();
    textCompartmentPane.setLayoutManager(new StackLayout());
    this.add(textCompartmentPane, GridDataFactory.fillDefaults().grab(true, true).getData());
    figureCompartmentPane = new Figure();
    figureCompartmentPane.setLayoutManager(new StackLayout());
    this.add(figureCompartmentPane, GridDataFactory.fillDefaults().grab(true, true).getData());
}
Also used : StackLayout(org.eclipse.draw2d.StackLayout) SyntaxColoringLabel(org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel) Figure(org.eclipse.draw2d.Figure)

Example 4 with SyntaxColoringLabel

use of org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel in project statecharts by Yakindu.

the class StatechartTextFigure method createContents.

private void createContents() {
    name = new SyntaxColoringLabel();
    name.setLayoutManager(new StackLayout());
    GridData data = GridDataFactory.fillDefaults().align(GridData.CENTER, GridData.CENTER).grab(true, false).getData();
    this.add(name, data);
    // Text compartment
    compartment = new Figure();
    this.add(compartment, GridDataFactory.fillDefaults().grab(true, true).getData());
}
Also used : StackLayout(org.eclipse.draw2d.StackLayout) GridData(org.eclipse.draw2d.GridData) SyntaxColoringLabel(org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel) Figure(org.eclipse.draw2d.Figure) RectangleFigure(org.eclipse.draw2d.RectangleFigure)

Example 5 with SyntaxColoringLabel

use of org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel in project statecharts by Yakindu.

the class XtextLabelEditPart method createFigure.

@Override
protected IFigure createFigure() {
    final SyntaxColoringLabel label = new SyntaxColoringLabel();
    label.setTextWrap(true);
    label.setAlignment(PositionConstants.LEFT | PositionConstants.TOP);
    return label;
}
Also used : SyntaxColoringLabel(org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel)

Aggregations

SyntaxColoringLabel (org.yakindu.base.xtext.utils.gmf.figures.SyntaxColoringLabel)5 StackLayout (org.eclipse.draw2d.StackLayout)3 Figure (org.eclipse.draw2d.Figure)2 GridData (org.eclipse.draw2d.GridData)2 RectangleFigure (org.eclipse.draw2d.RectangleFigure)2 WrappingLabel (org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel)1