}
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void createResizeHandle(List handles, int direction) {
if ((getResizeDirections() & direction) == direction) {
ResizeHandle handle = new ResizeHandle((GraphicalEditPart) getHost(), direction) {
@Override
protected Color getBorderColor() {
return (isPrimary()) ? ColorConstants.white : getOutlineColor();
}
@Override
protected Color getFillColor() {
return (isPrimary()) ? getOutlineColor() : ColorConstants.white;
}
};
handle.setDragTracker(getResizeTracker(direction));
handle.setCursor( Cursors.getDirectionalCursor(direction, getHostFigure().isMirrored()));
handles.add(handle);
} else {
// display 'resize' handle to allow dragging or indicate selection only
createDragHandle(handles, direction);
}