src/net/java/sip/communicator/impl/neomedia/EncodingConfigurationTableModel.java
/**
     * Move the row.
     *
     * @param rowIndex index of the row
     * @param up true to move up, false to move down
     * @return the next row index
     */
Move the row.
@param rowIndex index of the row
@param up true to move up, false to move down
@return the next row index
Move the row . @param rowIndex index of the row @param up true to move up false to move down @return the next row index
@Override
    public int move(int rowIndex, boolean up)
    {
        if (up)
        {
            if (rowIndex <= 0)
                throw new IllegalArgumentException("rowIndex");
            return move(rowIndex - 1, false) - 1;
        }
        if (rowIndex >= (getRowCount() - 1))
            throw new IllegalArgumentException("rowIndex");
        int[] priorities = getPriorities();
        final int nextRowIndex = rowIndex + 1;
        if (priorities[rowIndex] > 0)
            priorities[rowIndex] = priorities.length - nextRowIndex;
        if (priorities[nextRowIndex] > 0)
            priorities[nextRowIndex] = priorities.length - rowIndex;
        setPriorities(priorities);
        MediaFormat swap = encodings[rowIndex];
        encodings[rowIndex] = encodings[nextRowIndex];
        encodings[nextRowIndex] = swap;
        fireTableRowsUpdated(rowIndex, nextRowIndex);
        return nextRowIndex;
    }
@ Override public int move ( int rowIndex , boolean up ) { if ( up ) { if ( rowIndex <= 0 ) throw new IllegalArgumentException ( "rowIndex" ) ; return move ( rowIndex - 1 , false ) - 1 ; } if ( rowIndex >= ( getRowCount ( ) - 1 ) ) throw new IllegalArgumentException ( "rowIndex" ) ; int [ ] priorities = getPriorities ( ) ; final int nextRowIndex = rowIndex + 1 ; if ( priorities [ rowIndex ] > 0 ) priorities [ rowIndex ] = priorities . length - nextRowIndex ; if ( priorities [ nextRowIndex ] > 0 ) priorities [ nextRowIndex ] = priorities . length - rowIndex ; setPriorities ( priorities ) ; MediaFormat swap = encodings [ rowIndex ] ; encodings [ rowIndex ] = encodings [ nextRowIndex ] ; encodings [ nextRowIndex ] = swap ; fireTableRowsUpdated ( rowIndex , nextRowIndex ) ; return nextRowIndex ; }
Move the row.
Move the row .