use of org.eclipse.draw2d.Layer in project webtools.sourceediting by eclipse.
the class RootEditPart method createPrintableLayers.
protected LayeredPane createPrintableLayers() {
LayeredPane pane = super.createPrintableLayers();
Layer layer = new ScaledHandleLayer();
layer.setPreferredSize(new Dimension(5, 5));
pane.add(layer, DesignViewerGraphicConstants.SCALED_HANDLE_LAYER);
return pane;
}
use of org.eclipse.draw2d.Layer in project archi by archimatetool.
the class GraphicalRootEditPart method createFigure.
/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
@Override
protected IFigure createFigure() {
innerLayers = new LayeredPane();
printableLayers = new LayeredPane();
Layer layer = new Layer();
layer.setLayoutManager(new StackLayout());
printableLayers.add(layer, PRIMARY_LAYER);
layer = new ConnectionLayer();
layer.setPreferredSize(new Dimension(5, 5));
printableLayers.add(layer, CONNECTION_LAYER);
innerLayers.add(printableLayers, PRINTABLE_LAYERS);
layer = new Layer();
layer.setPreferredSize(new Dimension(5, 5));
innerLayers.add(layer, HANDLE_LAYER);
layer = new FeedbackLayer();
layer.setPreferredSize(new Dimension(5, 5));
innerLayers.add(layer, FEEDBACK_LAYER);
ScrollPane pane = new ScrollPane();
pane.setViewport(new Viewport(true));
pane.setContents(innerLayers);
return pane;
}
use of org.eclipse.draw2d.Layer in project archi by archimatetool.
the class ScalableRootEditPart method createLayers.
/**
* Creates the top-most set of layers on the given layered pane
*
* @param layeredPane
* the parent for the created layers
*/
protected void createLayers(LayeredPane layeredPane) {
layeredPane.add(getScaledLayers(), SCALABLE_LAYERS);
layeredPane.add(new Layer() {
@Override
public Dimension getPreferredSize(int wHint, int hHint) {
return new Dimension();
}
}, HANDLE_LAYER);
layeredPane.add(new FeedbackLayer(), FEEDBACK_LAYER);
layeredPane.add(new GuideLayer(), GUIDE_LAYER);
}
use of org.eclipse.draw2d.Layer in project archi by archimatetool.
the class ScalableRootEditPart method createPrintableLayers.
/**
* Creates a layered pane and the layers that should be printed.
*
* @see org.eclipse.gef.print.PrintGraphicalViewerOperation
* @return a new LayeredPane containing the printable layers
*/
protected LayeredPane createPrintableLayers() {
LayeredPane pane = new LayeredPane();
Layer layer = new Layer();
layer.setLayoutManager(new StackLayout());
pane.add(layer, PRIMARY_LAYER);
layer = new ConnectionLayer();
layer.setPreferredSize(new Dimension(5, 5));
pane.add(layer, CONNECTION_LAYER);
return pane;
}
use of org.eclipse.draw2d.Layer in project liferay-ide by liferay.
the class LayoutTplRootEditPart method createLayers.
protected void createLayers(LayeredPane layeredPane) {
/*
* layeredPane.add(getScaledLayers(), SCALABLE_LAYERS);
* layeredPane.add(getPrintableLayers(), PRINTABLE_LAYERS);
*/
Layer layer = new Layer();
layer.setLayoutManager(new StackLayout());
layeredPane.add(layer, PRIMARY_LAYER);
Layer handleLayer = new Layer() {
public Dimension getPreferredSize(int wHint, int hHint) {
return new Dimension();
}
};
layeredPane.add(handleLayer, HANDLE_LAYER);
layeredPane.add(new FeedbackLayer(), FEEDBACK_LAYER);
}
Aggregations