use of org.eclipse.gef.DragTracker 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;
}
Aggregations