<!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
<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
<!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
<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
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
\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
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
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