use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class DataBusinessItemNameEditPart method createDefaultEditPolicies.
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
protected List createSelectionHandles() {
List handles = new ArrayList();
NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
return handles;
}
public Command getCommand(Request request) {
return null;
}
public boolean understandsRequest(Request request) {
return false;
}
});
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class ConnectionResumingEditPart 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 MapperRootEditPart method addChildVisual.
@Override
protected void addChildVisual(EditPart childEditPart, int index) {
IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
if (childEditPart instanceof InputTablePart) {
/* get first figure to put all input tables figures in */
Object model = childEditPart.getModel();
index = getRootModelManager().getInputTables().indexOf(model);
if (index != -1) {
leftFigure.add(child, index);
} else {
leftFigure.add(child);
}
}
if (childEditPart instanceof OutputTablePart) {
/* get third figure to put all output tables figures in */
Object model = childEditPart.getModel();
index = getRootModelManager().getOutputTables().indexOf(model);
if (index != -1) {
rightFigure.add(child, index);
} else {
rightFigure.add(child);
}
}
if (childEditPart instanceof VarTablePart) {
Object model = childEditPart.getModel();
index = getRootModelManager().getVarTables().indexOf(model);
if (index != -1) {
// had added search figure when inited the center figure.
if (centerFigure.getChildren() != null && centerFigure.getChildren().size() != 0) {
centerFigure.add(child, index + centerFigure.getChildren().size());
} else {
centerFigure.add(child, index);
}
} else {
centerFigure.add(child);
}
}
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class DocumentBusinessItemNameEditPart method createDefaultEditPolicies.
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
protected List createSelectionHandles() {
List handles = new ArrayList();
NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
return handles;
}
public Command getCommand(Request request) {
return null;
}
public boolean understandsRequest(Request request) {
return false;
}
});
}
use of org.eclipse.gef.GraphicalEditPart in project tdi-studio-se by Talend.
the class GearBusinessItemNameEditPart method createDefaultEditPolicies.
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {
protected List createSelectionHandles() {
List handles = new ArrayList();
NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
return handles;
}
public Command getCommand(Request request) {
return null;
}
public boolean understandsRequest(Request request) {
return false;
}
});
}
Aggregations