Search in sources :

Example 6 with FreeformLayout

use of org.eclipse.draw2d.FreeformLayout in project cubrid-manager by CUBRID.

the class DiagramPart method createFigure.

/**
	 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
	 * @return figure
	 */
protected IFigure createFigure() {
    Figure figure = new FreeformLayer();
    figure.setLayoutManager(new FreeformLayout());
    return figure;
}
Also used : FreeformLayout(org.eclipse.draw2d.FreeformLayout) FreeformLayer(org.eclipse.draw2d.FreeformLayer) IFigure(org.eclipse.draw2d.IFigure) Figure(org.eclipse.draw2d.Figure)

Example 7 with FreeformLayout

use of org.eclipse.draw2d.FreeformLayout in project cubrid-manager by CUBRID.

the class DashboardPart method createFigure.

/**
	 * create a new figure used by DashboardPart
	 * 
	 * @return FreeformLayer with FreeformLayout
	 */
protected IFigure createFigure() {
    Figure figure = new FreeformLayer();
    figure.setLayoutManager(new FreeformLayout());
    return figure;
}
Also used : FreeformLayout(org.eclipse.draw2d.FreeformLayout) FreeformLayer(org.eclipse.draw2d.FreeformLayer) Figure(org.eclipse.draw2d.Figure) IFigure(org.eclipse.draw2d.IFigure)

Example 8 with FreeformLayout

use of org.eclipse.draw2d.FreeformLayout in project tdi-studio-se by Talend.

the class ProcessPart method createFigure.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
@Override
protected IFigure createFigure() {
    Figure figure = new FreeformLayer();
    figure.setLayoutManager(new FreeformLayout());
    fig2 = new FreeformLayer();
    getLayer(TalendScalableFreeformRootEditPart.PROCESS_BACKGROUND_LAYER).add(fig2);
    ajustReadOnly();
    // connLayer.setConnectionRouter(new NullRouter());
    return figure;
}
Also used : FreeformLayout(org.eclipse.draw2d.FreeformLayout) FreeformLayer(org.eclipse.draw2d.FreeformLayer) IFigure(org.eclipse.draw2d.IFigure) SubjobContainerFigure(org.talend.designer.core.ui.editor.subjobcontainer.SubjobContainerFigure) Figure(org.eclipse.draw2d.Figure)

Example 9 with FreeformLayout

use of org.eclipse.draw2d.FreeformLayout in project webtools.sourceediting by eclipse.

the class BaseDragAndDropCommand method getFeedbackFigure.

public IFigure getFeedbackFigure() {
    Figure panel = new Figure();
    panel.setLayoutManager(new FreeformLayout());
    panel.setOpaque(false);
    Polyline feedbackFigure = new Polyline();
    feedbackFigure.setLineWidth(2);
    drawLines(feedbackFigure);
    originalLocation = new Rectangle(feedbackFigure.getBounds());
    panel.add(feedbackFigure);
    polyLine = new Polyline();
    polyLine.setLineStyle(Graphics.LINE_DASHDOT);
    polyLine.setLineWidth(1);
    panel.add(polyLine);
    panel.setBounds(originalLocation);
    addConnectorToParent(panel);
    if (parentEditPart != null && parentEditPart.getFigure() instanceof GenericGroupFigure) {
        GenericGroupFigure fig = (GenericGroupFigure) parentEditPart.getFigure();
        Rectangle iconBounds = getZoomedBounds(fig.getIconFigure().getBounds());
        RoundedRectangle roundedRectangle = new RoundedRectangle();
        roundedRectangle.setFill(false);
        roundedRectangle.setOpaque(true);
        // roundedRectangle.setBounds(new Rectangle(iconBounds.x, iconBounds.y, iconBounds.width - 1, iconBounds.height - 1));
        roundedRectangle.setBounds(iconBounds);
        panel.add(roundedRectangle);
    }
    return panel;
}
Also used : FreeformLayout(org.eclipse.draw2d.FreeformLayout) GenericGroupFigure(org.eclipse.wst.xsd.ui.internal.design.figures.GenericGroupFigure) Polyline(org.eclipse.draw2d.Polyline) Rectangle(org.eclipse.draw2d.geometry.Rectangle) RoundedRectangle(org.eclipse.draw2d.RoundedRectangle) IFigure(org.eclipse.draw2d.IFigure) GenericGroupFigure(org.eclipse.wst.xsd.ui.internal.design.figures.GenericGroupFigure) Figure(org.eclipse.draw2d.Figure) RoundedRectangle(org.eclipse.draw2d.RoundedRectangle)

Example 10 with FreeformLayout

use of org.eclipse.draw2d.FreeformLayout in project archi by archimatetool.

the class AbstractDiagramPart method createFigure.

@Override
protected IFigure createFigure() {
    FreeformLayer figure = new FreeformLayer();
    // Provide an edge when in negative space
    // Causes snap to grid problems when in negative space
    figure.setBorder(new MarginBorder(5));
    figure.setLayoutManager(new FreeformLayout());
    // Have to add this if we want Animation to work on figures!
    AnimationUtil.addFigureForAnimation(figure);
    // Anti-aliasing
    setAntiAlias();
    return figure;
}
Also used : FreeformLayout(org.eclipse.draw2d.FreeformLayout) MarginBorder(org.eclipse.draw2d.MarginBorder) FreeformLayer(org.eclipse.draw2d.FreeformLayer)

Aggregations

FreeformLayout (org.eclipse.draw2d.FreeformLayout)11 FreeformLayer (org.eclipse.draw2d.FreeformLayer)8 IFigure (org.eclipse.draw2d.IFigure)8 Figure (org.eclipse.draw2d.Figure)7 MarginBorder (org.eclipse.draw2d.MarginBorder)2 Point (org.eclipse.draw2d.geometry.Point)2 Rectangle (org.eclipse.draw2d.geometry.Rectangle)2 ZestRootLayer (org.eclipse.zest.core.widgets.internal.ZestRootLayer)2 FreeformViewport (org.eclipse.draw2d.FreeformViewport)1 Graphics (org.eclipse.draw2d.Graphics)1 LineBorder (org.eclipse.draw2d.LineBorder)1 Polyline (org.eclipse.draw2d.Polyline)1 RoundedRectangle (org.eclipse.draw2d.RoundedRectangle)1 ScalableFreeformLayeredPane (org.eclipse.draw2d.ScalableFreeformLayeredPane)1 ScrollPane (org.eclipse.draw2d.ScrollPane)1 Viewport (org.eclipse.draw2d.Viewport)1 GenericGroupFigure (org.eclipse.wst.xsd.ui.internal.design.figures.GenericGroupFigure)1 AspectRatioFreeformLayer (org.eclipse.zest.core.widgets.internal.AspectRatioFreeformLayer)1 ContainerFigure (org.eclipse.zest.core.widgets.internal.ContainerFigure)1 ExpandGraphLabel (org.eclipse.zest.core.widgets.internal.ExpandGraphLabel)1