OSDN Git Service

eVocaloid対応歌詞の配列で添字上限チェックが抜けていたのを修正
[midichordhelper/MIDIChordHelper.git] / src / camidion / chordhelper / ChordHelperApplet.java
index c33c89b..22f7a85 100644 (file)
@@ -284,7 +284,7 @@ public class ChordHelperApplet extends JApplet {
         */\r
        public static class VersionInfo {\r
                public static final String      NAME = "MIDI Chord Helper";\r
-               public static final String      VERSION = "Ver.20140413.2";\r
+               public static final String      VERSION = "Ver.20150104.1";\r
                public static final String      COPYRIGHT = "Copyright (C) 2004-2014";\r
                public static final String      AUTHER = "@きよし - Akiyoshi Kamide";\r
                public static final String      URL = "http://www.yk.rim.or.jp/~kamide/music/chordhelper/";\r
@@ -398,10 +398,10 @@ public class ChordHelperApplet extends JApplet {
        private JToggleButton anoGakkiToggleButton;\r
 \r
        public void init() {\r
-               String imageIconPath = "images/midichordhelper.png";\r
+               String imageIconPath = "midichordhelper.png";\r
                URL imageIconUrl = getClass().getResource(imageIconPath);\r
                if( imageIconUrl == null ) {\r
-                       System.out.println("icon "+imageIconPath+" not found");\r
+                       System.out.println("Icon image "+imageIconPath+" not found");\r
                        imageIcon = null;\r
                }\r
                else {\r
@@ -474,9 +474,8 @@ public class ChordHelperApplet extends JApplet {
                        addActionListener(new ActionListener() {\r
                                @Override\r
                                public void actionPerformed(ActionEvent event) {\r
-                                       chordMatrix.setSelectedChord(\r
-                                               event.getActionCommand().trim().split("[ \t\r\n]")[0]\r
-                                       );\r
+                                       String symbol = event.getActionCommand().trim().split("[ \t\r\n]")[0];\r
+                                       chordMatrix.setSelectedChord(symbol);\r
                                }\r
                        });\r
                }};\r
@@ -593,11 +592,12 @@ public class ChordHelperApplet extends JApplet {
                                add( Box.createHorizontalStrut(2) );\r
                                add( enterButtonLabel = new ChordButtonLabel("Enter",chordMatrix) {{\r
                                        addMouseListener(new MouseAdapter() {\r
-                                               public void mousePressed(MouseEvent e) {\r
-                                                       if( (e.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0 ) // RightClicked\r
-                                                               chordMatrix.setSelectedChord( (Chord)null );\r
-                                                       else\r
-                                                               chordMatrix.setSelectedChord( lyricDisplay.getText() );\r
+                                               public void mousePressed(MouseEvent event) {\r
+                                                       if( (event.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0 ) // RightClicked\r
+                                                               chordMatrix.setSelectedChord((Chord)null);\r
+                                                       else {\r
+                                                               chordMatrix.setSelectedChord(lyricDisplay.getText());\r
+                                                       }\r
                                                }\r
                                        });\r
                                }});\r
@@ -812,8 +812,7 @@ public class ChordHelperApplet extends JApplet {
                // あの楽器っぽい表示\r
                if( keyboardPanel.keyboardCenterPanel.keyboard.anoGakkiPane != null ) {\r
                        JComponent btn = chordMatrix.getSelectedButton();\r
-                       if( btn != null )\r
-                               anoGakkiPane.start(chordMatrix,btn);\r
+                       if( btn != null ) anoGakkiPane.start(chordMatrix, btn.getBounds());\r
                }\r
                // コードボタンからのコードを、カポつき演奏キーからオリジナルキーへ変換\r
                Key originalKey = chordMatrix.getKeySignatureCapo();\r