use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class NodeProgressBarPart method refreshVisuals.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
*/
@Override
protected void refreshVisuals() {
Node node = ((NodeContainer) ((NodeContainerPart) getParent()).getModel()).getNode();
NodeLabel nodeLabel = node.getNodeLabel();
NodeProgressBarFigure progressFig = (NodeProgressBarFigure) this.getFigure();
Point loc = node.getLocation().getCopy();
NodeError nodeError = node.getNodeError();
Dimension size = progressFig.getSize();
loc.x = loc.x + (node.getSize().width - size.width) / 2 + size.width / 7;
loc.y = loc.y + node.getSize().height + nodeLabel.getLabelSize().height + nodeError.getErrorSize().height;
Rectangle rectangle = new Rectangle(loc, size);
((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), rectangle);
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class ConnectionPart method addChildVisual.
@Override
protected void addChildVisual(EditPart childEditPart, int index) {
IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
getContentPane().add(child, index);
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class SubjobContainerPart method refreshVisuals.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
*/
@Override
public void refreshVisuals() {
Boolean isDisplaySubjobs = ((SubjobContainer) this.getModel()).isDisplayed();
if (getParent() == null || !isDisplaySubjobs) {
return;
}
Rectangle rectangle = ((SubjobContainer) this.getModel()).getSubjobContainerRectangle();
if (rectangle == null) {
return;
}
((SubjobContainerFigure) getFigure()).initializeSubjobContainer(rectangle);
// added for bug 4005
if (getFigure().getParent() != null) {
((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), rectangle);
}
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class ConnectionTraceEditPart method addChildVisual.
protected void addChildVisual(EditPart childEditPart, int index) {
IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
getContentPane().add(child, index);
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class RowSelectionEditPolicy method createSelectionHandles.
@Override
protected List createSelectionHandles() {
List list = new ArrayList();
list.add(new RowMoveHandler((GraphicalEditPart) getHost()));
return list;
}
Aggregations