OSDN Git Service

chore: increment Version to v1.3.6
[delesterandomselector/DelesteRandomSelector.git] / src / com / ranfa / main / DelesteRandomSelector.java
index de8353e..9d4b605 100644 (file)
@@ -5,13 +5,12 @@ import java.awt.EventQueue;
 import java.awt.Font;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Random;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.function.BiConsumer;
 
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.JButton;
@@ -21,22 +20,25 @@ import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.JScrollPane;
 import javax.swing.JSpinner;
-import javax.swing.JTextPane;
+import javax.swing.JTextArea;
 import javax.swing.border.EmptyBorder;
 
 import com.jgoodies.forms.layout.ColumnSpec;
 import com.jgoodies.forms.layout.FormLayout;
 import com.jgoodies.forms.layout.FormSpecs;
 import com.jgoodies.forms.layout.RowSpec;
+import com.ranfa.lib.CheckVersion;
 import com.ranfa.lib.LimitedLog;
 import com.ranfa.lib.Scraping;
 import com.ranfa.lib.SettingJSONProperty;
 import com.ranfa.lib.Settings;
 import com.ranfa.lib.Song;
+import com.ranfa.lib.TwitterIntegration;
 import com.ranfa.lib.Version;
 
-@Version(major = 0, minor = 0, patch = 1)
+@Version(major = 1, minor = 3, patch = 6)
 public class DelesteRandomSelector extends JFrame {
 
        private static ArrayList<Song> selectedSongsList = new ArrayList<Song>();
@@ -56,16 +58,16 @@ public class DelesteRandomSelector extends JFrame {
        private JButton btnImport;
        private JButton btnStart;
        private JButton btnExit;
-       private JTextPane textPane;
        private JComboBox comboDifficultySelect;
        private JLabel labelLvCaution;
        private JComboBox comboAttribute;
-
-       private ArrayList<Song> wholeDataList;
-
-       private ArrayList<Song> fromJsonList;
-
        private SettingJSONProperty property = new SettingJSONProperty();
+       private JButton btnTwitterIntegration;
+       private String[] integratorArray;
+       private boolean integratorBool = false;
+       private JTextArea textArea;
+       private JScrollPane scrollPane;
+       private CompletableFuture<Void> softwareUpdateFuture = null;
 
        /**
         * Launch the application.
@@ -85,18 +87,29 @@ public class DelesteRandomSelector extends JFrame {
 
        /**
         * log file prefix:
-        *  "[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[LEVEL]: " +
+        *  this.getClass() + ":[LEVEL]: " +
         */
 
        /**
         * Create the frame.
         */
        public DelesteRandomSelector() {
+               boolean isFirst = !Scraping.databaseExists();
+               if(isFirst) {
+                       JOptionPane.showMessageDialog(this, "楽曲データベースが見つかりませんでした。自動的に作成されます…\n注意:初回起動ではなく、かつ、Jarファイルと同じ階層に\"database.json\"というファイルが存在するにも関わらず\nこのポップアップが出た場合、開発者までご一報ください。\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues");
+                       if(!Scraping.writeToJson(Scraping.getWholeData())) {
+                               JOptionPane.showMessageDialog(this, "Exception:NullPointerException\\nCannot Keep up! Please re-download this Application!");
+                               throw new NullPointerException("FATAL: cannot continue!");
+                       }
+               }
+               ExecutorService es = Executors.newWorkStealingPool();
+               CompletableFuture<ArrayList<Song>> getFromJsonFuture = CompletableFuture.supplyAsync(() -> Scraping.getFromJson(), es);
+               CompletableFuture<ArrayList<Song>> getWholeDataFuture = CompletableFuture.supplyAsync(() -> Scraping.getWholeData(), es);
                if(!Settings.fileExists() && !Settings.writeDownJSON()) {
                        JOptionPane.showMessageDialog(this, "Exception:NullPointerException\nCannot Keep up! Please re-download this Application!");
                        throw new NullPointerException("FATAL: cannot continue!");
                }
-               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[DEBUG]: " + "Loading Settings...");
+               LimitedLog.println(this.getClass() + ":[DEBUG]: " + "Loading Settings...");
                property.setCheckLibraryUpdates(Settings.needToCheckLibraryUpdates());
                property.setCheckVersion(Settings.needToCheckVersion());
                property.setWindowWidth(Settings.getWindowWidth());
@@ -104,7 +117,7 @@ public class DelesteRandomSelector extends JFrame {
                property.setSongLimit(Settings.getSongsLimit());
                property.setSaveScoreLog(Settings.saveScoreLog());
                property.setOutputDebugSentences(Settings.outputDebugSentences());
-               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[DEBUG]: " + "Loading Settings done."
+               LimitedLog.println(this.getClass() + ":[DEBUG]: " + "Loading Settings done."
                                + "\nVersion Check: " + property.isCheckVersion()
                                + "\nLibrary Update Check: " + property.isCheckLibraryUpdates()
                                + "\nWindow Width: " + property.getWindowWidth()
@@ -112,49 +125,40 @@ public class DelesteRandomSelector extends JFrame {
                                + "\nSong Limit: " + property.getSongLimit()
                                + "\nSaveScoreLog: " + property.isSaveScoreLog()
                                + "\nOutputDebugSentences: " + property.isOutputDebugSentences());
-               if(!Scraping.databaseExists()) {
-                       JOptionPane.showMessageDialog(this, "楽曲データベースが見つかりませんでした。自動的に作成されます…\n注意:初回起動ではなく、かつ、Jarファイルと同じ階層に\"database.json\"というファイルが存在するにも関わらず\nこのポップアップが出た場合、開発者までご一報ください。\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues");
-                       if(!Scraping.writeToJson(Scraping.getWholeData())) {
-                               JOptionPane.showMessageDialog(this, "Exception:NullPointerException\\nCannot Keep up! Please re-download this Application!");
-                               throw new NullPointerException("FATAL: cannot continue!");
-                       }
+               if(property.isCheckVersion()) {
+                       softwareUpdateFuture = CompletableFuture.runAsync(() -> CheckVersion.needToBeUpdated(), es);
                }
-               ExecutorService es = Executors.newWorkStealingPool();
-               CompletableFuture<ArrayList<Song>> getFromJsonFuture = CompletableFuture.supplyAsync(() -> {
-                       try {
-                               return Scraping.getFromJson();
-                       } catch (IOException e1) {
-                               // TODO 自動生成された catch ブロック
-                               e1.printStackTrace();
+               BiConsumer<ArrayList<Song>, ArrayList<Song>> updateConsumer = (list1, list2) -> {
+                       LimitedLog.println(this.getClass() + ":[INFO]: " + "Checking database updates...");
+                       if(list1.size() > list2.size()) {
+                               long time = System.currentTimeMillis();
+                               LimitedLog.println(this.getClass() + ":[INFO]: " + (list1.size() - list2.size()) + " Update detected.");
+                               Scraping.writeToJson(list1);
+                               LimitedLog.println(this.getClass() + ":[INFO]: " + "Update completed in " + (System.currentTimeMillis() - time) + "ms");
+                               LimitedLog.println(this.getClass() + ":[INFO]: " + "Updated database size: " + list1.size());
+                       } else {
+                               LimitedLog.println(this.getClass() + ":[INFO]: " + "database is up-to-date.");
                        }
-                       return null;
-               }, es);
-               CompletableFuture<ArrayList<Song>> getWholeDataFuture = CompletableFuture.supplyAsync(() -> Scraping.getWholeData(), es);
-               getWholeDataFuture.thenAcceptAsync(list -> LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: Scraping data size:" + list.size()), es);
-               getFromJsonFuture.thenAcceptAsync(list -> LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO] Currently database size:" + list.size()), es);
-               getWholeDataFuture.thenAcceptAsync(list -> {
-                       wholeDataList.addAll(list);
-               }, es);
-               getFromJsonFuture.thenAcceptAsync(list -> {
-                       fromJsonList.addAll(list);
+               };
+               Runnable setEnabled = () -> {
                        try {
-                               if(getWholeDataFuture.get().size() != list.size()) {
-                                       fromJsonList.clear();
-                                       fromJsonList.addAll(wholeDataList);
-                               }
+                               Thread.sleep(1000);
                        } catch (InterruptedException e1) {
-                               JOptionPane.showMessageDialog(null, "例外:InterruptedException\n非同期処理待機中に割り込みが発生しました。\n" + e1.getLocalizedMessage());
-                               e1.printStackTrace();
-                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[FATAL]: " + e1.getLocalizedMessage());
-                       } catch (ExecutionException e1) {
-                               JOptionPane.showMessageDialog(null, "例外:ExecutionException\n非同期処理中に例外をキャッチしました。\n" + e1.getLocalizedMessage());
+                               // TODO 自動生成された catch ブロック
                                e1.printStackTrace();
-                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[WARN]: " + e1.getLocalizedMessage());
                        }
-               }, es);
-               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[DEBUG]: " + "Version:" + getVersion());
+                       btnImport.setEnabled(true);
+                       btnImport.setText("<html><body>楽曲<br>絞り込み</body></html>");
+               };
+               getWholeDataFuture.thenAcceptAsync(list -> LimitedLog.println(this.getClass() + ":[INFO]: Scraping data size:" + list.size()), es);
+               getFromJsonFuture.thenAcceptAsync(list -> LimitedLog.println(this.getClass() + ":[INFO]: Currently database size:" + list.size()), es);
+               if(property.isCheckLibraryUpdates()) {
+                       CompletableFuture<Void> updatedFuture = getWholeDataFuture.thenAcceptBothAsync(getFromJsonFuture, updateConsumer, es);
+                       updatedFuture.thenRunAsync(setEnabled, es);
+               }
+               LimitedLog.println(this.getClass() + ":[DEBUG]: " + "Version:" + CheckVersion.getVersion());
                setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-               setBounds(100, 100, 640, 360);
+               setBounds(100, 100, property.getWindowWidth(), property.getWindowHeight());
                contentPane = new JPanel();
                contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
                setContentPane(contentPane);
@@ -173,7 +177,7 @@ public class DelesteRandomSelector extends JFrame {
                labelTitle.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 16));
                panelNorth.add(labelTitle, "1, 1, center, top");
 
-               labelVersion = new JLabel(getVersion());
+               labelVersion = new JLabel(CheckVersion.getVersion());
                labelVersion.setFont(new Font("SansSerif", Font.BOLD, 12));
                panelNorth.add(labelVersion, "3, 1, right, top");
 
@@ -205,12 +209,13 @@ public class DelesteRandomSelector extends JFrame {
                panelWest.add(labelDifficulty, "2, 2, center, default");
 
                comboDifficultySelect = new JComboBox();
-               comboDifficultySelect.setModel(new DefaultComboBoxModel(new String[] {"DEBUT", "REGULAR", "PRO", "MASTER", "MASTER+", "ⓁMASTER+", "LIGHT", "TRICK", "PIANO", "FORTE", "WITCH"}));
+               comboDifficultySelect.setFont(new Font("Dialog", Font.BOLD, 12));
+               comboDifficultySelect.setModel(new DefaultComboBoxModel(new String[] {"指定なし", "DEBUT", "REGULAR", "PRO", "MASTER", "MASTER+", "ⓁMASTER+", "LIGHT", "TRICK", "PIANO", "FORTE", "WITCH"}));
                panelWest.add(comboDifficultySelect, "2, 4, fill, default");
 
                                comboAttribute = new JComboBox();
                                comboAttribute.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));
-                               comboAttribute.setModel(new DefaultComboBoxModel(new String[] {"全タイプ", "キュート", "クール", "パッション"}));
+                               comboAttribute.setModel(new DefaultComboBoxModel(new String[] {"指定なし", "全タイプ", "キュート", "クール", "パッション"}));
                                panelWest.add(comboAttribute, "2, 6, fill, default");
 
                                labelLevel = new JLabel("楽曲Lv");
@@ -239,38 +244,35 @@ public class DelesteRandomSelector extends JFrame {
                        new RowSpec[] {
                                RowSpec.decode("26px"),
                                FormSpecs.RELATED_GAP_ROWSPEC,
-                               RowSpec.decode("max(50dlu;default)"),
+                               RowSpec.decode("max(36dlu;default)"),
                                FormSpecs.RELATED_GAP_ROWSPEC,
                                FormSpecs.DEFAULT_ROWSPEC,
                                FormSpecs.RELATED_GAP_ROWSPEC,
-                               RowSpec.decode("max(50dlu;default)"),
+                               RowSpec.decode("max(30dlu;default)"),
                                FormSpecs.RELATED_GAP_ROWSPEC,
                                RowSpec.decode("max(15dlu;default)"),
                                FormSpecs.RELATED_GAP_ROWSPEC,
-                               RowSpec.decode("max(11dlu;default)"),}));
+                               RowSpec.decode("max(11dlu;default)"),
+                               FormSpecs.RELATED_GAP_ROWSPEC,
+                               FormSpecs.DEFAULT_ROWSPEC,
+                               FormSpecs.RELATED_GAP_ROWSPEC,
+                               FormSpecs.DEFAULT_ROWSPEC,
+                               FormSpecs.RELATED_GAP_ROWSPEC,
+                               FormSpecs.DEFAULT_ROWSPEC,}));
 
-               btnImport = new JButton("<html><body>楽曲<br>絞り込み</body></html>");
+               btnImport = new JButton("<html><body>データベース<br>更新中…</body></html>");
+               btnImport.setEnabled(false);
                btnImport.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
-                               ArrayList<Song> fromJson = new ArrayList<Song>();
-                                       try {
-                                               fromJson.addAll(getFromJsonFuture.get());
-                                       } catch (InterruptedException e1) {
-                                               JOptionPane.showMessageDialog(null, "例外:InterruptedException\n非同期処理待機中に割り込みが発生しました。\n" + e1.getLocalizedMessage());
-                                               e1.printStackTrace();
-                                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[FATAL]: " + e1.getLocalizedMessage());
-                                       } catch (ExecutionException e1) {
-                                               JOptionPane.showMessageDialog(null, "例外:ExecutionException\n非同期処理中に例外をキャッチしました。\n" + e1.getLocalizedMessage());
-                                               e1.printStackTrace();
-                                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[WARN]: " + e1.getLocalizedMessage());
-                                       }
+                               ArrayList<Song> fromJson = Scraping.getFromJson();
                                        ArrayList<Song> specificlevelList = Scraping.getSpecificLevelSongs(fromJson, (Integer)spinnerLevel.getValue(), checkLessLv.isSelected(), checkMoreLv.isSelected());
                                        ArrayList<Song> specificDifficultyList = Scraping.getSpecificDifficultySongs(specificlevelList, comboDifficultySelect.getSelectedItem().toString());
                                        ArrayList<Song> specificAttributeList = Scraping.getSpecificAttributeSongs(specificDifficultyList, comboAttribute.getSelectedItem().toString());
                                        if(!selectedSongsList.isEmpty())
                                        selectedSongsList.clear();
                                selectedSongsList.addAll(specificAttributeList);
-                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " +"Songs are selected.We are Ready to go.");
+                               LimitedLog.println(this.getClass() + ":[INFO]: " +"Songs are selected.We are Ready to go.");
+                               JOptionPane.showMessageDialog(null, "絞り込み完了!「開始」をクリックすることで選曲できます!");
                        }
                });
                btnImport.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));
@@ -280,73 +282,104 @@ public class DelesteRandomSelector extends JFrame {
                btnStart.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                                Random random = new Random(System.currentTimeMillis());
-                               String[] tmp = new String[property.getSongLimit()];
+                               String paneString = "";
+                               integratorArray = new String[property.getSongLimit()];
                                for(int i = 0; i < property.getSongLimit(); i++) {
                                        int randomInt = random.nextInt(selectedSongsList.size());
-                                       tmp[i] = (i + 1) + "曲目:[" + selectedSongsList.get(randomInt).getDifficulty() + "]「" + selectedSongsList.get(randomInt).getName() + "」!\n\n";
-                               }
-                               String paneString = "";
-                               for (int i = 0; i < tmp.length; i++) {
-                                       paneString = paneString + tmp[i];
+                                       paneString = paneString + (i + 1) + "曲目: " + selectedSongsList.get(randomInt).getAttribute() + " [" + selectedSongsList.get(randomInt).getDifficulty() + "]「" + selectedSongsList.get(randomInt).getName() + "」!(Lv:" + selectedSongsList.get(randomInt).getLevel() + ")\n\n";
+                                       integratorArray[i] = selectedSongsList.get(randomInt).getName() + "(Lv" + selectedSongsList.get(randomInt).getLevel() + ")\n";
                                }
-                               paneString = paneString + "この" + tmp.length + "曲をプレイしましょう!!!";
-                               textPane.setText(paneString);
-                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "show up completed.");
+                               paneString = paneString + "この" + property.getSongLimit() + "曲をプレイしましょう!!!";
+                               textArea.setText(paneString);
+                               integratorBool = true;
+                               LimitedLog.println(this.getClass() + ":[INFO]: " + "show up completed.");
                        }
                });
                btnStart.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));
                panelEast.add(btnStart, "1, 7, fill, fill");
 
-               btnExit = new JButton("終了");
-               btnExit.addActionListener(new ActionListener() {
-                       public void actionPerformed(ActionEvent e) {
-                               LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " +"Requested Exit by Button");
-                               if(getWholeDataFuture.isDone()) {
-                                       System.exit(0);
-                               } else {
-                                       JOptionPane.showMessageDialog(null, "非同期処理が完了していません。少し時間が経ってからやり直してください。");
-                               }
-                       }
-               });
-               btnExit.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));
-               panelEast.add(btnExit, "1, 11");
+                               btnTwitterIntegration = new JButton("Twitter連携");
+                               btnTwitterIntegration.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 11));
+                               btnTwitterIntegration.addActionListener(new ActionListener() {
+                                       public void actionPerformed(ActionEvent e) {
+                                               LimitedLog.println(this.getClass() + ":[INFO]: " + "Twitter Integration requested.Verify permission status.");
+                                               boolean authorizationStatus = TwitterIntegration.authorization();
+                                               LimitedLog.println(this.getClass() + ":[INFO]: " + "Permission Verifying completed.\nStatus: " + authorizationStatus);
+                                               LimitedLog.print(this.getClass() + ":[INFO]: " + "Construction status message...");
+                                               String updatedStatus = "デレステ課題曲セレクターで\n";
+                                               int lengthLimit = updatedStatus.length();
+                                               boolean isBroken = false;
+                                               if(!integratorBool) {
+                                                       JOptionPane.showMessageDialog(null, "ちひろ「まだプレイを始めていないみたいですね」");
+                                                       LimitedLog.println();
+                                                       return;
+                                               }
+                                               for(int i = 0; i < integratorArray.length; i++) {
+                                                       updatedStatus = updatedStatus + integratorArray[i];
+                                                       lengthLimit += integratorArray[i].length();
+                                                       if(lengthLimit > 69) {
+                                                               isBroken = true;
+                                                               break;
+                                                       }
+                                               }
+                                               if(isBroken) {
+                                                       updatedStatus = updatedStatus + "…その他数曲\nをプレイしました!\n#DelesteRandomSelector #デレステ ";
+                                               } else {
+                                                       updatedStatus = updatedStatus + "をプレイしました!\n#DelesteRandomSelector #デレステ ";
+                                               }
+                                               LimitedLog.println("completed.\n" + updatedStatus);
+                                               lengthLimit = updatedStatus.length();
+                                               if(authorizationStatus) {
+                                                       int option = JOptionPane.showConfirmDialog(null, "Twitterへ以下の内容を投稿します。よろしいですか?\n\n" + updatedStatus + "\n\n文字数:" + lengthLimit);
+                                                       LimitedLog.println(this.getClass() + ":[INFO]: " + "User selected " + option);
+                                                       switch(option) {
+                                                               case JOptionPane.OK_OPTION:
+                                                                       TwitterIntegration.PostTwitter(updatedStatus);
+                                                                       LimitedLog.println(this.getClass() + ":[INFO]: " + "Success to update the status.");
+                                                                       JOptionPane.showMessageDialog(null, "投稿が完了しました。");
+                                                                       break;
+                                                               case JOptionPane.NO_OPTION:
+                                                                       LimitedLog.println(this.getClass() + ":[INFO]: " + "There is no will to post.");
+                                                                       break;
+                                                               case JOptionPane.CANCEL_OPTION:
+                                                                       LimitedLog.println(this.getClass() + ":[INFO]: " + "The Operation was canceled by user.");
+                                                                       break;
+                                                               default:
+                                                                       break;
+                                                       }
+                                               } else {
+                                                       LimitedLog.println(this.getClass() + ":[WARN]: " + "seems to reject the permission.it should need try again.");
+                                               }
+                                       }
+                               });
+                               panelEast.add(btnTwitterIntegration, "1, 11");
+
+                                                               btnExit = new JButton("終了");
+                                                               btnExit.addActionListener(new ActionListener() {
+                                                                       public void actionPerformed(ActionEvent e) {
+                                                                               if(softwareUpdateFuture.isDone()) {
+                                                                                       LimitedLog.println(this.getClass() + ":[INFO]: " +"Requested Exit by Button");
+                                                                                       System.exit(0);
+                                                                               } else {
+                                                                                       JOptionPane.showMessageDialog(null, "内部更新処理が完了していません。少し待ってからやり直してください。");
+                                                                               }
+                                                                       }
+                                                               });
+                                                               btnExit.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));
+                                                               panelEast.add(btnExit, "1, 13");
 
                panelCentre = new JPanel();
                contentPane.add(panelCentre, BorderLayout.CENTER);
                panelCentre.setLayout(new BorderLayout(0, 0));
 
-               textPane = new JTextPane();
-               textPane.setText("楽曲選択の手順\r\n1.難易度、属性、レベルを選択する\r\n2.「楽曲取り込み」ボタンを押す!\r\n3.「開始」ボタンを押す!\r\n4.選択された楽曲がここに表示されます!\r\n現在設定されている楽曲選択の最大数:" + property.getSongLimit());
-               textPane.setEditable(false);
-               panelCentre.add(textPane);
-       }
-
-
-       /**
-        * アノテーションで記載されているバージョンを取得します
-        * @since v1.0.0
-        * @return アノテーションで定義されているバージョン
-        */
-       public static String getVersion() {
-               String value = "v"
-                               + getMajorVersion() + "."
-                               + getMinorVersion() + "."
-                               + getPatchVersion();
-               return value;
-       }
+               textArea = new JTextArea();
+               textArea.setText("楽曲選択の手順\r\n1.難易度、属性、レベルを選択する\r\n2.「楽曲取り込み」ボタンを押す!\r\n3.「開始」ボタンを押す!\r\n4.選択された楽曲がここに表示されます!\r\n現在設定されている楽曲選択の最大数:" + property.getSongLimit());
+               textArea.setEditable(false);
 
-       public static int getMajorVersion() {
-               Version version = (Version) DelesteRandomSelector.class.getAnnotation(Version.class);
-               return version.major();
+               scrollPane = new JScrollPane(textArea);
+               panelCentre.add(scrollPane, BorderLayout.CENTER);
+               if(isFirst || !property.isCheckLibraryUpdates())
+                       setEnabled.run();
        }
 
-       public static int getMinorVersion() {
-               Version version = (Version) DelesteRandomSelector.class.getAnnotation(Version.class);
-               return version.minor();
-       }
-
-       public static int getPatchVersion() {
-               Version version = (Version) DelesteRandomSelector.class.getAnnotation(Version.class);
-               return version.patch();
-       }
 }