use of org.eclipse.draw2d.FreeformLayer in project tdi-studio-se by Talend.
the class ErDiagramPart 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(ErDiagramRootEditPart.PROCESS_BACKGROUND_LAYER).add(fig2);
return figure;
}
use of org.eclipse.draw2d.FreeformLayer in project tdi-studio-se by Talend.
the class ErDiagramRootEditPart method createScaledLayers.
protected ScalableFreeformLayeredPane createScaledLayers() {
ScalableFreeformLayeredPane layers = new ScalableFreeformLayeredPane();
layers.add(new FreeformLayer(), PROCESS_BACKGROUND_LAYER);
// layers.add(createGridLayer(), GRID_LAYER);
layers.add(getPrintableLayers(), PRINTABLE_LAYERS);
layers.add(new FeedbackLayer(), SCALED_FEEDBACK_LAYER);
return layers;
}
use of org.eclipse.draw2d.FreeformLayer in project tdi-studio-se by Talend.
the class SubjobContainerPart method createFigure.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
@Override
protected IFigure createFigure() {
SubjobContainer container = (SubjobContainer) this.getModel();
Boolean isDisplaySubjobs = (container).isDisplayed();
if (!isDisplaySubjobs) {
Figure figure = new FreeformLayer();
figure.setLayoutManager(new FreeformLayout());
return figure;
}
IProcess2 process = container.getProcess();
//$NON-NLS-1$
Object obj = process.getAdditionalProperties().get("FRAMEWORK");
SubjobContainerFigure subjobContainer = null;
if ("Spark Streaming".equals(obj) && !(process.getProperty().getItem() instanceof JobletProcessItem)) {
//$NON-NLS-1$
subjobContainer = new SparkStreamingSubjobContainerFigure(container);
} else {
subjobContainer = new SubjobContainerFigure(container);
}
return subjobContainer;
}
use of org.eclipse.draw2d.FreeformLayer in project tdi-studio-se by Talend.
the class TalendScalableFreeformRootEditPart method createScaledLayers.
@Override
protected ScalableFreeformLayeredPane createScaledLayers() {
ScalableFreeformLayeredPane layers = new ScalableFreeformLayeredPane();
layers.add(new FreeformLayer(), SUBJOB_BACKGROUND_LAYER);
layers.add(new FreeformLayer(), PROCESS_BACKGROUND_LAYER);
layers.add(createGridLayer(), GRID_LAYER);
layers.add(getPrintableLayers(), PRINTABLE_LAYERS);
layers.add(new FreeformLayer(), MAP_REDUCE_LAYER);
layers.add(new FreeformLayer(), SelectionFeedbackEditPolicy.TALEND_FEEDBACK_LAYER);
layers.add(new FeedbackLayer(), SCALED_FEEDBACK_LAYER);
feedbackLayer = new FeedbackLayer();
return layers;
}
use of org.eclipse.draw2d.FreeformLayer 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);
}
Aggregations