/** * Return the specified "before" move index. */ private int getBeforeMoveIndex(int index) { int[][] pairs = getMoveIndexPairs(); return pairs[index][0]; }
/** * Return the specified "before" move index. */ private int getBeforeMoveIndex(int index) { int[][] pairs = getMoveIndexPairs(); return pairs[index][0]; }
/** * Return the specified "before" move index. */ private int getBeforeMoveIndex(int index) { int[][] pairs = getMoveIndexPairs(); return pairs[index][0]; }
/** * Add an moved change set. */ public void addMovedChangeSet(Object changeSet, int oldIndex, int newIndex) { getMoves().add(changeSet); int[] pair = new int[2]; pair[0] = oldIndex; pair[1] = newIndex; setMoveIndexPairs(this.addTo(pair, getMoveIndexPairs())); }
/** * Add an moved change set. */ public void addMovedChangeSet(Object changeSet, int oldIndex, int newIndex) { getMoves().add(changeSet); int[] pair = new int[2]; pair[0] = oldIndex; pair[1] = newIndex; setMoveIndexPairs(this.addTo(pair, getMoveIndexPairs())); }
/** * Add an moved change set. */ public void addMovedChangeSet(Object changeSet, int oldIndex, int newIndex) { this.getMoves().addElement(changeSet); int[] pair = new int[2]; pair[0] = oldIndex; pair[1] = newIndex; this.setMoveIndexPairs(this.addTo(pair, this.getMoveIndexPairs())); }
/** * Attempt to remove the specified change set * from the collection of moved change sets. * Return true if the change set was moved earlier * and was successfully removed. */ private boolean removeMovedChangeSet(Object changeSet) { int changeSetIndex = this.getMovesIndexOf(changeSet); if (changeSetIndex == -1) { return false; } this.getMoves().remove(changeSetIndex); int beforeMoveIndex = this.getBeforeMoveIndex(changeSetIndex); this.setMoveIndexPairs(this.removeFrom(changeSetIndex, this.getMoveIndexPairs())); // now move the change set over to the collection of removes this.addRemovedChangeSet(changeSet, beforeMoveIndex); return true; }
/** * Attempt to remove the specified change set * from the collection of moved change sets. * Return true if the change set was moved earlier * and was successfully removed. */ private boolean removeMovedChangeSet(Object changeSet) { int changeSetIndex = this.getMovesIndexOf(changeSet); if (changeSetIndex == -1) { return false; } this.getMoves().remove(changeSetIndex); int beforeMoveIndex = this.getBeforeMoveIndex(changeSetIndex); this.setMoveIndexPairs(this.removeFrom(changeSetIndex, this.getMoveIndexPairs())); // now move the change set over to the collection of removes this.addRemovedChangeSet(changeSet, beforeMoveIndex); return true; }
/** * Attempt to remove the specified change set * from the collection of moved change sets. * Return true if the change set was moved earlier * and was successfully removed. */ private boolean removeMovedChangeSet(Object changeSet) { int changeSetIndex = this.getMovesIndexOf(changeSet); if (changeSetIndex == -1) { return false; } this.getMoves().remove(changeSetIndex); int beforeMoveIndex = this.getBeforeMoveIndex(changeSetIndex); this.setMoveIndexPairs(this.removeFrom(changeSetIndex, this.getMoveIndexPairs())); // now move the change set over to the collection of removes this.addRemovedChangeSet(changeSet, beforeMoveIndex); return true; }