@Override @SuppressWarnings({ "rawtypes", "unchecked" }) protected void createResizeHandle(List handles, final int direction) { handles.add(new ResizeHandle(getHost(), direction) { @Override protected DragTracker createDragTracker() { return new ResizeTracker(getHost(), direction) { @Override public void mouseDrag(MouseEvent event, EditPartViewer viewer) { event.stateMask |= SWT.SHIFT; super.mouseDrag(event, viewer); } }; }; }); }
protected DragTracker createDragTracker( ) { CrosstabHandleAdapter adapter = ((CrosstabTableEditPart)getOwner( ).getParent( )).getCrosstabHandleAdapter( ); if (cursorDirection == PositionConstants.EAST && (adapter.getColumnOprationCell( start )!=null||adapter.getColumnOprationCell( end )!=null)) { return new CrosstabColumnDragTracker(getOwner( ), start, end); } if (cursorDirection == PositionConstants.SOUTH && adapter.getRowOprationCell( start ) != null) { return new CrosstabRowDragTracker(getOwner( ), start, end); } //return null; return new ResizeTracker( getOwner( ), cursorDirection ) { protected void showTargetFeedback() { } protected void eraseTargetFeedback() { } protected void showSourceFeedback( ) { } protected void eraseSourceFeedback( ) { } protected Command getCommand( ) { return UnexecutableCommand.INSTANCE; } }; }
protected DragTracker createDragTracker( ) { if (cursorDirection == PositionConstants.EAST ) { return new ColumnDragTracker(getOwner( ).getParent( ), start, end); } if (cursorDirection == PositionConstants.SOUTH) { return new RowDragTracker(getOwner( ).getParent( ), start, end); } //return null; return new ResizeTracker( getOwner( ), cursorDirection ) { protected void showTargetFeedback() { } protected void eraseTargetFeedback() { } protected void showSourceFeedback( ) { } protected void eraseSourceFeedback( ) { } protected Command getCommand( ) { return UnexecutableCommand.INSTANCE; } }; }
/** * Returns a resize tracker for the given direction to be used by a resize handle. * * @param direction * the resize direction for the {@link JSSCompoundResizeTracker}. * @return a new {@link JSSCompoundResizeTracker} * @since 3.7 */ protected ResizeTracker getResizeTracker(int direction) { return new JSSCompoundResizeTracker((GraphicalEditPart) getHost(), direction); }
/** * Returns <code>null</code> for the DragTracker. * * @return returns <code>null</code> */ protected DragTracker createDragTracker() { return new ResizeTracker(getOwner(), cursorDirection); }
/** * Returns a resize tracker for the given direction to be used by a resize * handle. * * @param direction * the resize direction for the {@link ResizeTracker}. * @return a new {@link ResizeTracker} * @since 3.7 */ protected ResizeTracker getResizeTracker(int direction) { return new ResizeTracker((GraphicalEditPart) getHost(), direction); }