use of org.eclipse.draw2d.IFigure in project tdi-studio-se by Talend.
the class XmlMapDataEditPart method performRequest.
@Override
public void performRequest(Request req) {
if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
DirectEditRequest drequest = (DirectEditRequest) req;
Point figureLocation = drequest.getLocation();
IFigure findFigureAt = getFigure().findFigureAt(figureLocation.x, figureLocation.y);
if (findFigureAt != null && findFigureAt instanceof Label) {
directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator((Figure) findFigureAt));
directEditManager.show();
}
if (directEditManager != null) {
if (findFigureAt != null && findFigureAt instanceof Label) {
if (figure.containsPoint(figureLocation)) {
directEditManager.show();
((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
}
}
}
use of org.eclipse.draw2d.IFigure in project tdi-studio-se by Talend.
the class OutputXmlTreeEditPart method performRequest.
@Override
public void performRequest(Request req) {
if (RequestConstants.REQ_DIRECT_EDIT.equals(req.getType())) {
DirectEditRequest drequest = (DirectEditRequest) req;
Point figureLocation = drequest.getLocation();
IFigure findFigureAt = getFigure().findFigureAt(figureLocation.x, figureLocation.y);
if (findFigureAt != null && findFigureAt instanceof IWidgetCell) {
directEditManager = new XmlMapNodeDirectEditManager(this, new XmlMapNodeCellEditorLocator((Figure) findFigureAt));
directEditManager.show();
}
if (directEditManager != null) {
if (findFigureAt != null && findFigureAt instanceof FilterTextArea) {
if (figure.containsPoint(figureLocation)) {
directEditManager.show();
((XmlMapGraphicViewer) getViewer()).getMapperManager().setCurrentDirectEditManager(directEditManager);
}
}
}
}
}
use of org.eclipse.draw2d.IFigure in project tdi-studio-se by Talend.
the class TreeNodeEditPart method getSourceConnectionAnchor.
@Override
public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection) {
IFigure figure = null;
boolean forceDarshDot = false;
if (getRootAnchor() != null) {
figure = getRootAnchor();
forceDarshDot = true;
} else {
figure = getFigure();
}
if (connection instanceof XmlMapLookupConnectionPart) {
return new LookupColumnAnchor(figure, connection, entityManger);
}
if (connection instanceof XmlMapFilterConnectionPart) {
return new FilterColumnAnchor(figure, connection, entityManger);
}
return new ConnectionColumnAnchor(figure, connection, entityManger, forceDarshDot);
}
use of org.eclipse.draw2d.IFigure in project tdi-studio-se by Talend.
the class TreeNodeEditPart method getTargetConnectionAnchor.
@Override
public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection) {
IFigure figure = null;
boolean forceDarshDot = false;
if (getRootAnchor() != null) {
figure = getRootAnchor();
forceDarshDot = true;
} else {
figure = getFigure();
}
if (connection instanceof XmlMapLookupConnectionPart) {
return new LookupColumnAnchor(figure, connection, entityManger);
}
return new ConnectionColumnAnchor(figure, connection, entityManger, forceDarshDot);
}
use of org.eclipse.draw2d.IFigure 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);
}
Aggregations