use of org.eclipse.gef.handles.MoveHandle in project tdi-studio-se by Talend.
the class BusinessTextNonResizableEditPolicy method createSelectionHandles.
/**
* @generated
*/
protected List createSelectionHandles() {
MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
moveHandle.setBorder(null);
moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
return Collections.singletonList(moveHandle);
}
use of org.eclipse.gef.handles.MoveHandle in project whole by wholeplatform.
the class WholeNonResizableEditPolicy method createSelectionHandles.
@Override
protected List<?> createSelectionHandles() {
final GraphicalEditPart host = (GraphicalEditPart) getHost();
final DragTracker tracker = new SelectEditPartTracker(host);
final Cursor cursor = SharedCursors.ARROW;
final MoveHandle moveHandle = new MoveHandle(host) {
@Override
protected void initialize() {
setOpaque(false);
setBorder(new LineBorder(ColorConstants.gray, 1));
setCursor(cursor);
setDragTracker(tracker);
}
};
final List<Handle> handles = new ArrayList<Handle>(5);
handles.add(moveHandle);
if (isDragAllowed()) {
handles.add(createHandle(host, PositionConstants.SOUTH_EAST, tracker, cursor));
handles.add(createHandle(host, PositionConstants.SOUTH_WEST, tracker, cursor));
handles.add(createHandle(host, PositionConstants.NORTH_WEST, tracker, cursor));
handles.add(createHandle(host, PositionConstants.NORTH_EAST, tracker, cursor));
}
return handles;
}
use of org.eclipse.gef.handles.MoveHandle in project tdi-studio-se by Talend.
the class NodeResizableEditPolicy method moveHandle.
private Handle moveHandle(GraphicalEditPart owner, DragTracker tracker, Cursor cursor) {
MoveHandle moveHandle = new MoveHandle(owner);
moveHandle.setForegroundColor(ColorConstants.gray);
moveHandle.setDragTracker(tracker);
moveHandle.setCursor(cursor);
return moveHandle;
}
use of org.eclipse.gef.handles.MoveHandle in project whole by wholeplatform.
the class WholeResizableEditPolicy method createSelectionHandles.
protected List<?> createSelectionHandles() {
final GraphicalEditPart host = (GraphicalEditPart) getHost();
final int directions = getResizeDirections() != -1 ? getResizeDirections() : PositionConstants.EAST + PositionConstants.SOUTH + PositionConstants.WEST + PositionConstants.NORTH;
final MoveHandle moveHandle = new MoveHandle(host) {
@Override
protected void initialize() {
setOpaque(false);
setBorder(new LineBorder(ColorConstants.gray, 1));
setCursor(Cursors.SIZEALL);
}
};
final List<Handle> handles = new ArrayList<Handle>(9);
handles.add(moveHandle);
handles.add(createHandle(host, PositionConstants.EAST, (directions & PositionConstants.EAST) != 0));
handles.add(createHandle(host, PositionConstants.SOUTH_EAST, (directions & PositionConstants.SOUTH_EAST) != 0));
handles.add(createHandle(host, PositionConstants.SOUTH, (directions & PositionConstants.SOUTH) != 0));
handles.add(createHandle(host, PositionConstants.SOUTH_WEST, (directions & PositionConstants.SOUTH_WEST) != 0));
handles.add(createHandle(host, PositionConstants.WEST, (directions & PositionConstants.WEST) != 0));
handles.add(createHandle(host, PositionConstants.NORTH_WEST, (directions & PositionConstants.NORTH_WEST) != 0));
handles.add(createHandle(host, PositionConstants.NORTH, (directions & PositionConstants.NORTH) != 0));
handles.add(createHandle(host, PositionConstants.NORTH_EAST, (directions & PositionConstants.NORTH_EAST) != 0));
return handles;
}
Aggregations