プロファイルの選択画面をsplitpaneに変更した。
@@ -58,6 +58,7 @@ | ||
58 | 58 | import javax.swing.JRadioButton; |
59 | 59 | import javax.swing.JRootPane; |
60 | 60 | import javax.swing.JScrollPane; |
61 | +import javax.swing.JSplitPane; | |
61 | 62 | import javax.swing.JTable; |
62 | 63 | import javax.swing.JTextArea; |
63 | 64 | import javax.swing.KeyStroke; |
@@ -188,10 +189,6 @@ | ||
188 | 189 | |
189 | 190 | setTitle(strings.getProperty("title")); |
190 | 191 | |
191 | - JPanel centerPanel = new JPanel(); | |
192 | - GridLayout gridLayout = new GridLayout(2, 1); | |
193 | - centerPanel.setLayout(gridLayout); | |
194 | - | |
195 | 192 | JPanel pnlProfiles = new JPanel(new BorderLayout()); |
196 | 193 | |
197 | 194 | characterListModel = new ProfileSelectorTableModel(); |
@@ -445,13 +442,17 @@ | ||
445 | 442 | infoPanel.add(descriptionPanel); |
446 | 443 | infoPanel.add(sampleImgTitledPanel); |
447 | 444 | |
448 | - centerPanel.add(pnlProfilesGroup); | |
449 | - centerPanel.add(infoPanel); | |
445 | + JSplitPane centerPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true); | |
446 | + centerPane.setResizeWeight(1.f); // ウィンドウサイズ変更時に上を可変とする. | |
447 | + centerPane.setDividerLocation(Integer.parseInt(strings | |
448 | + .getProperty("dividerLocation"))); | |
450 | 449 | |
450 | + centerPane.add(pnlProfilesGroup); | |
451 | + centerPane.add(infoPanel); | |
451 | 452 | |
452 | 453 | Container contentPane = getContentPane(); |
453 | 454 | contentPane.setLayout(new BorderLayout()); |
454 | - contentPane.add(centerPanel, BorderLayout.CENTER); | |
455 | + contentPane.add(centerPane, BorderLayout.CENTER); | |
455 | 456 | |
456 | 457 | // OK/CANCEL ボタンパネル |
457 | 458 |
@@ -498,11 +499,11 @@ | ||
498 | 499 | im.put(KeyStroke.getKeyStroke(KeyEvent.VK_W, tk.getMenuShortcutKeyMask()), "closeProfileSelectorDialog"); |
499 | 500 | am.put("closeProfileSelectorDialog", actCancel); |
500 | 501 | |
501 | - pack(); | |
502 | + int width = Integer.parseInt(strings.getProperty("windowWidth")); | |
503 | + int height = Integer.parseInt(strings.getProperty("windowHeight")); | |
504 | + setSize(width, height); | |
505 | + setLocationRelativeTo(parent); | |
502 | 506 | |
503 | - setSize(500, 500); | |
504 | - setLocationRelativeTo(parent); | |
505 | - | |
506 | 507 | characterList.requestFocus(); |
507 | 508 | updateUIState(); |
508 | 509 | } |
@@ -1,5 +1,7 @@ | ||
1 | 1 | <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> |
2 | 2 | <properties version="1.0"> |
3 | + <entry key="windowWidth">500</entry> | |
4 | + <entry key="windowHeight">500</entry> | |
3 | 5 | <entry key="title">Profile Selector</entry> |
4 | 6 | <entry key="profile.new">New</entry> |
5 | 7 | <entry key="profile.copy">Copy Struct.</entry> |
@@ -13,6 +15,7 @@ | ||
13 | 15 | <entry key="description">Description</entry> |
14 | 16 | <entry key="profiles">Profiles</entry> |
15 | 17 | <entry key="sample-image">Sample</entry> |
18 | + <entry key="dividerLocation">200</entry> | |
16 | 19 | <entry key="btn.select">Open</entry> |
17 | 20 | <entry key="btn.cancel">Cancel</entry> |
18 | 21 | <entry key="dropHere">dropHere</entry> |
@@ -1,5 +1,7 @@ | ||
1 | 1 | <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> |
2 | 2 | <properties version="1.0"> |
3 | + <entry key="windowWidth">500</entry> | |
4 | + <entry key="windowHeight">500</entry> | |
3 | 5 | <entry key="title">プロファイルの選択</entry> |
4 | 6 | <entry key="profile.new">新規</entry> |
5 | 7 | <entry key="profile.copy">構造の複製</entry> |
@@ -13,6 +15,7 @@ | ||
13 | 15 | <entry key="description">プロファイルの説明</entry> |
14 | 16 | <entry key="profiles">プロファイル一覧</entry> |
15 | 17 | <entry key="sample-image">サンプルピクチャ</entry> |
18 | + <entry key="dividerLocation">200</entry> | |
16 | 19 | <entry key="btn.select">プロファイルを開く</entry> |
17 | 20 | <entry key="btn.cancel">キャンセル</entry> |
18 | 21 | <entry key="dropHere">ここにピクチャをドロップします</entry> |