From 2619d618c9dc4191d85d88535489088b4a8bfde8 Mon Sep 17 00:00:00 2001 From: hizumiaoba <56146205+hizumiaoba@users.noreply.github.com> Date: Tue, 24 Aug 2021 00:03:16 +0900 Subject: [PATCH] fix: add scroll bar if textarea is full --- database.json | 38 ++++++++++++++++++++++++++- settings.json | 2 +- src/com/ranfa/main/DelesteRandomSelector.java | 19 +++++++++----- 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/database.json b/database.json index 9c4eab5..73722cf 100644 --- a/database.json +++ b/database.json @@ -11372,7 +11372,7 @@ }, { "attribute" : "クール", "name" : "Just Us Justice", - "difficulty" : "MASTER+", + "difficulty" : "ⓁMASTER+", "level" : 29, "notes" : 999 }, { @@ -11939,5 +11939,41 @@ "difficulty" : "MASTER", "level" : 25, "notes" : 596 + }, { + "attribute" : "全タイプ", + "name" : "リトルリドル", + "difficulty" : "LIGHT", + "level" : 7, + "notes" : 165 + }, { + "attribute" : "全タイプ", + "name" : "リトルリドル", + "difficulty" : "TRICK", + "level" : 17, + "notes" : 410 + }, { + "attribute" : "全タイプ", + "name" : "Wonder goes on!!", + "difficulty" : "LIGHT", + "level" : 8, + "notes" : 171 + }, { + "attribute" : "全タイプ", + "name" : "Wonder goes on!!", + "difficulty" : "TRICK", + "level" : 17, + "notes" : 426 + }, { + "attribute" : "クール", + "name" : "Just Us Justice", + "difficulty" : "MASTER+", + "level" : 29, + "notes" : 999 + }, { + "attribute" : "クール", + "name" : "初夢をあなたと", + "difficulty" : "MASTER+", + "level" : 28, + "notes" : 803 } ] } \ No newline at end of file diff --git a/settings.json b/settings.json index 35a6046..055eade 100644 --- a/settings.json +++ b/settings.json @@ -3,7 +3,7 @@ "checkLibraryUpdates" : true, "windowWidth" : 640, "windowHeight" : 360, - "songLimit" : 3, + "songLimit" : 15, "saveScoreLog" : false, "outputDebugSentences" : true } \ No newline at end of file diff --git a/src/com/ranfa/main/DelesteRandomSelector.java b/src/com/ranfa/main/DelesteRandomSelector.java index 4bcabb2..1e4ac6d 100644 --- a/src/com/ranfa/main/DelesteRandomSelector.java +++ b/src/com/ranfa/main/DelesteRandomSelector.java @@ -23,8 +23,9 @@ 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; @@ -59,7 +60,6 @@ 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; @@ -67,6 +67,9 @@ public class DelesteRandomSelector extends JFrame { private JButton btnTwitterIntegration; private String[] integratorArray; private boolean integratorBool = false; + private JTextArea textArea; + + private JScrollPane scrollPane; /** * Launch the application. @@ -273,7 +276,7 @@ public class DelesteRandomSelector extends JFrame { paneString = paneString + tmp[i]; } paneString = paneString + "この" + tmp.length + "曲をプレイしましょう!!!"; - textPane.setText(paneString); + textArea.setText(paneString); integratorBool = true; LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "show up completed."); } @@ -355,10 +358,12 @@ public class DelesteRandomSelector extends JFrame { 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); + textArea = new JTextArea(); + textArea.setText("楽曲選択の手順\r\n1.難易度、属性、レベルを選択する\r\n2.「楽曲取り込み」ボタンを押す!\r\n3.「開始」ボタンを押す!\r\n4.選択された楽曲がここに表示されます!\r\n現在設定されている楽曲選択の最大数:" + property.getSongLimit()); + textArea.setEditable(false); + + scrollPane = new JScrollPane(textArea); + panelCentre.add(scrollPane, BorderLayout.CENTER); } -- 2.11.0