OSDN Git Service

プロファイルの選択画面をsplitpaneに変更した。
authorseraphy <seraphy@5b6e9025-a2e8-4882-b233-f889982098c5>
Sun, 24 Nov 2013 22:46:20 +0000 (22:46 +0000)
committerseraphy <seraphy@5b6e9025-a2e8-4882-b233-f889982098c5>
Sun, 24 Nov 2013 22:46:20 +0000 (22:46 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/charactermanaj/trunk@84 5b6e9025-a2e8-4882-b233-f889982098c5

resources/languages/profileselectordialog.xml
resources/languages/profileselectordialog_ja.xml
src/charactermanaj/ui/ProfileSelectorDialog.java

index fb04fd4..140e0e2 100644 (file)
@@ -1,5 +1,7 @@
 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">\r
 <properties version="1.0">\r
+       <entry key="windowWidth">500</entry>\r
+       <entry key="windowHeight">500</entry>\r
        <entry key="title">Profile Selector</entry>\r
        <entry key="profile.new">New</entry>\r
        <entry key="profile.copy">Copy Struct.</entry>\r
@@ -13,6 +15,7 @@
        <entry key="description">Description</entry>\r
        <entry key="profiles">Profiles</entry>\r
        <entry key="sample-image">Sample</entry>\r
+       <entry key="dividerLocation">200</entry>\r
        <entry key="btn.select">Open</entry>\r
        <entry key="btn.cancel">Cancel</entry>\r
        <entry key="dropHere">dropHere</entry>\r
index 4208b3d..cb0016d 100644 (file)
@@ -1,5 +1,7 @@
 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">\r
 <properties version="1.0">\r
+       <entry key="windowWidth">500</entry>\r
+       <entry key="windowHeight">500</entry>\r
        <entry key="title">プロファイルの選択</entry>\r
        <entry key="profile.new">新規</entry>\r
        <entry key="profile.copy">構造の複製</entry>\r
@@ -13,6 +15,7 @@
        <entry key="description">プロファイルの説明</entry>\r
        <entry key="profiles">プロファイル一覧</entry>\r
        <entry key="sample-image">サンプルピクチャ</entry>\r
+       <entry key="dividerLocation">200</entry>\r
        <entry key="btn.select">プロファイルを開く</entry>\r
        <entry key="btn.cancel">キャンセル</entry>\r
        <entry key="dropHere">ここにピクチャをドロップします</entry>\r
index ee70237..bcbf8f5 100644 (file)
@@ -58,6 +58,7 @@ import javax.swing.JPopupMenu;
 import javax.swing.JRadioButton;\r
 import javax.swing.JRootPane;\r
 import javax.swing.JScrollPane;\r
+import javax.swing.JSplitPane;\r
 import javax.swing.JTable;\r
 import javax.swing.JTextArea;\r
 import javax.swing.KeyStroke;\r
@@ -188,10 +189,6 @@ public class ProfileSelectorDialog extends JDialog {
 \r
                setTitle(strings.getProperty("title"));\r
 \r
-               JPanel centerPanel = new JPanel();\r
-               GridLayout gridLayout = new GridLayout(2, 1);\r
-               centerPanel.setLayout(gridLayout);\r
-               \r
                JPanel pnlProfiles = new JPanel(new BorderLayout());\r
                \r
                characterListModel = new ProfileSelectorTableModel();\r
@@ -445,13 +442,17 @@ public class ProfileSelectorDialog extends JDialog {
                infoPanel.add(descriptionPanel);\r
                infoPanel.add(sampleImgTitledPanel);\r
                \r
-               centerPanel.add(pnlProfilesGroup);\r
-               centerPanel.add(infoPanel);\r
+               JSplitPane centerPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);\r
+               centerPane.setResizeWeight(1.f); // ウィンドウサイズ変更時に上を可変とする.\r
+               centerPane.setDividerLocation(Integer.parseInt(strings\r
+                               .getProperty("dividerLocation")));\r
 \r
+               centerPane.add(pnlProfilesGroup);\r
+               centerPane.add(infoPanel);\r
                \r
                Container contentPane = getContentPane();\r
                contentPane.setLayout(new BorderLayout());\r
-               contentPane.add(centerPanel, BorderLayout.CENTER);\r
+               contentPane.add(centerPane, BorderLayout.CENTER);\r
                \r
                // OK/CANCEL ボタンパネル\r
 \r
@@ -498,11 +499,11 @@ public class ProfileSelectorDialog extends JDialog {
                im.put(KeyStroke.getKeyStroke(KeyEvent.VK_W, tk.getMenuShortcutKeyMask()), "closeProfileSelectorDialog");\r
                am.put("closeProfileSelectorDialog", actCancel);\r
                \r
-               pack();\r
-\r
-               setSize(500, 500);\r
+               int width = Integer.parseInt(strings.getProperty("windowWidth"));\r
+               int height = Integer.parseInt(strings.getProperty("windowHeight"));\r
+               setSize(width, height);\r
                setLocationRelativeTo(parent);\r
-               \r
+\r
                characterList.requestFocus();\r
                updateUIState();\r
        }\r