use of org.eclipse.draw2d.LayeredPane in project tdi-studio-se by Talend.
the class BusinessDiagramEditor method configureGraphicalViewer.
/**
* @generated
*/
@Override
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
IDiagramGraphicalViewer viewer = getDiagramGraphicalViewer();
// customize popup menu
ContextMenuProvider provider = new BusinessDiagramActionProvider(this, viewer);
viewer.setContextMenu(provider);
getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, viewer);
DiagramRootEditPart root = (DiagramRootEditPart) getDiagramGraphicalViewer().getRootEditPart();
LayeredPane printableLayers = (LayeredPane) root.getLayer(LayerConstants.PRINTABLE_LAYERS);
FreeformLayer extLabelsLayer = new FreeformLayer();
extLabelsLayer.setLayoutManager(new DelegatingLayout());
printableLayers.addLayerAfter(extLabelsLayer, BusinessEditPartFactory.EXTERNAL_NODE_LABELS_LAYER, LayerConstants.PRIMARY_LAYER);
LayeredPane scalableLayers = (LayeredPane) root.getLayer(LayerConstants.SCALABLE_LAYERS);
FreeformLayer scaledFeedbackLayer = new FreeformLayer();
scaledFeedbackLayer.setEnabled(false);
scalableLayers.addLayerAfter(scaledFeedbackLayer, LayerConstants.SCALED_FEEDBACK_LAYER, DiagramRootEditPart.DECORATION_UNPRINTABLE_LAYER);
}
use of org.eclipse.draw2d.LayeredPane in project cubrid-manager by CUBRID.
the class ERScalableFreeformRootEditPart method getLayer.
public IFigure getLayer(Object key) {
IFigure innerLayer = innerLayers == null ? null : innerLayers.getLayer(key);
if (innerLayer != null) {
return innerLayer;
}
LayeredPane scaledLayers = getScaledLayers();
IFigure layer = scaledLayers == null ? null : scaledLayers.getLayer(key);
if (layer != null) {
return layer;
}
if (getPrintableLayers() == null) {
return null;
}
return getPrintableLayers().getLayer(key);
}
Aggregations