private void moveToNext() { if (TuxGuitar.instance().getPlayer().isRunning()) { TuxGuitar.instance().getTransport().gotoNext(); } else { Caret caret = getEditor().getTablature().getCaret(); TGTrackImpl track = caret.getTrack(); TGMeasure measure = getSongManager().getTrackManager().getNextMeasure(caret.getMeasure()); if (track != null && measure != null) { caret.update(track.getNumber(), measure.getStart(), caret.getSelectedString().getNumber()); } } }
protected int execute(TypedEvent e) { // comienza el undoable UndoableMeasureGeneric undoable = UndoableMeasureGeneric.startUndo(); Caret caret = getEditor().getTablature().getCaret(); getSongManager() .getMeasureManager() .changePopping( caret.getMeasure(), caret.getPosition(), caret.getSelectedString().getNumber()); TuxGuitar.instance().getFileHistory().setUnsavedFile(); updateTablature(); // termia el undoable addUndoableEdit(undoable.endUndo()); return 0; }
protected int execute(TypedEvent e) { Caret caret = getEditor().getTablature().getCaret(); if (caret.getSelectedNote() != null) { // comienza el undoable UndoableMeasureGeneric undoable = UndoableMeasureGeneric.startUndo(); getSongManager().getMeasureManager().changeTieNote(caret.getSelectedNote()); // termia el undoable addUndoableEdit(undoable.endUndo()); } else { TGNote note = getSongManager().getFactory().newNote(); note.setValue(0); note.setVelocity(caret.getVelocity()); note.setString(caret.getSelectedString().getNumber()); note.setTiedNote(true); TGDuration duration = getSongManager().getFactory().newDuration(); caret.getDuration().copy(duration); setTiedNoteValue(note, caret); // comienza el undoable UndoableMeasureGeneric undoable = UndoableMeasureGeneric.startUndo(); getSongManager() .getMeasureManager() .addNote(caret.getSelectedBeat(), note, duration, caret.getVoice()); // termia el undoable addUndoableEdit(undoable.endUndo()); } TuxGuitar.instance().getFileHistory().setUnsavedFile(); updateTablature(); return 0; }