Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
umjammer committed May 29, 2024
1 parent 328aef8 commit aa406b5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/main/java/vavi/apps/mfiPlayer/MfiPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.util.prefs.Preferences;

import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Sequence;
import javax.sound.midi.Sequencer;
import javax.swing.AbstractAction;
Expand Down Expand Up @@ -50,7 +49,7 @@ public class MfiPlayer {
private static final Preferences prefs = Preferences.userNodeForPackage(MfiPlayer.class);

/** */
private Sequencer sequencer;
private final Sequencer sequencer;

/** Creates new DefaultPlayer */
private MfiPlayer(String[] args) throws Exception {
Expand Down Expand Up @@ -156,27 +155,29 @@ private void close() {
}

/** */
private Action playAction = new AbstractAction(
private final Action playAction = new AbstractAction(
"Play",
(ImageIcon) UIManager.get("mfiPlayer.playIcon")) {
@Override
public void actionPerformed(ActionEvent ev) {
try {
play();
} catch (Exception e) {
e.printStackTrace();
Debug.printStackTrace(e);
}
}
};

/** */
private Action stopAction = new AbstractAction(
private final Action stopAction = new AbstractAction(
"Stop",
(ImageIcon) UIManager.get("mfiPlayer.stopIcon")) {
@Override
public void actionPerformed(ActionEvent ev) {
try {
stop();
} catch (Exception e) {
e.printStackTrace();
Debug.printStackTrace(e);
}
}
};
Expand All @@ -186,7 +187,7 @@ public void actionPerformed(ActionEvent ev) {
new RegexFileFilter(".+\\.((mld)|(mid)|(mmf)|(MID))", "MIDI,MFi,SMAF File");

/** */
private Action openAction = new AbstractAction(
private final Action openAction = new AbstractAction(
"Open",
(ImageIcon) UIManager.get("mfiPlayer.openIcon")) {
final JFileChooser fc;
Expand All @@ -206,13 +207,13 @@ public void actionPerformed(ActionEvent ev) {
play();
}
} catch (Exception e) {
e.printStackTrace();
Debug.printStackTrace(e);
}
}
};

/** */
private Action exitAction = new AbstractAction(
private final Action exitAction = new AbstractAction(
"Exit",
(ImageIcon) UIManager.get("mfiPlayer.exitIcon")) {
@Override public void actionPerformed(ActionEvent ev) {
Expand Down Expand Up @@ -253,5 +254,3 @@ public static void main(String[] args) throws Exception {
new MfiPlayer(args);
}
}

/* */

0 comments on commit aa406b5

Please sign in to comment.