OSDN Git Service

ボタンの変数名誤り修正.
[coroid/inqubus.git] / frontend / src / saccubus / VideoSaveInfoPanel.java
1 /* $Id$ */
2 package saccubus;
3
4 import javax.swing.JButton;
5 import javax.swing.JCheckBox;
6 import javax.swing.JFrame;
7 import javax.swing.JRadioButton;
8 import javax.swing.JTextField;
9 import javax.swing.SwingUtilities;
10 import javax.swing.UIManager;
11
12 /**
13  *
14  * @author yuki
15  */
16 class VideoSaveInfoPanel extends javax.swing.JPanel {
17
18     /** Creates new form VideoSaveInfoPanel */
19     VideoSaveInfoPanel() {
20         initComponents();
21     }
22
23     /** This method is called from within the constructor to
24      * initialize the form.
25      * WARNING: Do NOT modify this code. The content of this method is
26      * always regenerated by the Form Editor.
27      */
28     @SuppressWarnings("unchecked")
29     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
30     private void initComponents() {
31
32         videoSavingGroup = new javax.swing.ButtonGroup();
33         videoNamingGroup = new javax.swing.ButtonGroup();
34         videoNoSaveButton = new javax.swing.JRadioButton();
35         videoSaveButton = new javax.swing.JRadioButton();
36         basicSetting = new javax.swing.JPanel();
37         delVideoCheckBox = new javax.swing.JCheckBox();
38         saveFolderRadioButton = new javax.swing.JRadioButton();
39         videoSavedFolderField = new javax.swing.JTextField();
40         showSavingVideoFolderDialogButton = new javax.swing.JButton();
41         saveFileRadioButton = new javax.swing.JRadioButton();
42         videoSavedFileField = new javax.swing.JTextField();
43         showSavingVideoFileDialogButton = new javax.swing.JButton();
44         videoUseNiBrButton = new javax.swing.JRadioButton();
45         nibrExtendSetting = new javax.swing.JPanel();
46         nibrFileField = new javax.swing.JTextField();
47         nibrFileChooserButton = new javax.swing.JButton();
48
49         setBorder(javax.swing.BorderFactory.createTitledBorder("\93®\89æ\95Û\91\90Ý\92è"));
50
51         videoSavingGroup.add(videoNoSaveButton);
52         videoNoSaveButton.setText("\93®\89æ\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82È\82¢");
53
54         videoSavingGroup.add(videoSaveButton);
55         videoSaveButton.setText("\93®\89æ\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é");
56
57         delVideoCheckBox.setText("\95Ï\8a·\8cã\82É\93®\89æ\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é");
58
59         videoNamingGroup.add(saveFolderRadioButton);
60         saveFolderRadioButton.setText("\95Û\91\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
61
62         showSavingVideoFolderDialogButton.setText("\8eQ\8fÆ...");
63
64         videoNamingGroup.add(saveFileRadioButton);
65         saveFileRadioButton.setText("\95Û\91\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
66
67         showSavingVideoFileDialogButton.setText("\8eQ\8fÆ...");
68
69         javax.swing.GroupLayout basicSettingLayout = new javax.swing.GroupLayout(basicSetting);
70         basicSetting.setLayout(basicSettingLayout);
71         basicSettingLayout.setHorizontalGroup(
72             basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
73             .addGroup(basicSettingLayout.createSequentialGroup()
74                 .addGroup(basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75                     .addComponent(delVideoCheckBox)
76                     .addComponent(saveFolderRadioButton)
77                     .addComponent(saveFileRadioButton)
78                     .addGroup(basicSettingLayout.createSequentialGroup()
79                         .addGap(21, 21, 21)
80                         .addComponent(videoSavedFileField, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
81                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
82                         .addComponent(showSavingVideoFileDialogButton))
83                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, basicSettingLayout.createSequentialGroup()
84                         .addGap(21, 21, 21)
85                         .addComponent(videoSavedFolderField, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
86                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
87                         .addComponent(showSavingVideoFolderDialogButton)))
88                 .addContainerGap())
89         );
90         basicSettingLayout.setVerticalGroup(
91             basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
92             .addGroup(basicSettingLayout.createSequentialGroup()
93                 .addComponent(delVideoCheckBox)
94                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
95                 .addComponent(saveFolderRadioButton)
96                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
97                 .addGroup(basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
98                     .addComponent(videoSavedFolderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
99                     .addComponent(showSavingVideoFolderDialogButton))
100                 .addGap(8, 8, 8)
101                 .addComponent(saveFileRadioButton)
102                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
103                 .addGroup(basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
104                     .addComponent(videoSavedFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
105                     .addComponent(showSavingVideoFileDialogButton))
106                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
107         );
108
109         videoSavingGroup.add(videoUseNiBrButton);
110         videoUseNiBrButton.setText("NicoBrowser\83_\83E\83\93\83\8d\81[\83h\83t\83@\83C\83\8b\82ð\97p\82¢\82é");
111
112         nibrFileChooserButton.setText("\8eQ\8fÆ...");
113
114         javax.swing.GroupLayout nibrExtendSettingLayout = new javax.swing.GroupLayout(nibrExtendSetting);
115         nibrExtendSetting.setLayout(nibrExtendSettingLayout);
116         nibrExtendSettingLayout.setHorizontalGroup(
117             nibrExtendSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
118             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, nibrExtendSettingLayout.createSequentialGroup()
119                 .addComponent(nibrFileField, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
120                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
121                 .addComponent(nibrFileChooserButton)
122                 .addContainerGap())
123         );
124         nibrExtendSettingLayout.setVerticalGroup(
125             nibrExtendSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
126             .addGroup(nibrExtendSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
127                 .addComponent(nibrFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
128                 .addComponent(nibrFileChooserButton))
129         );
130
131         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
132         this.setLayout(layout);
133         layout.setHorizontalGroup(
134             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
135             .addGroup(layout.createSequentialGroup()
136                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
137                     .addComponent(videoNoSaveButton)
138                     .addComponent(videoSaveButton))
139                 .addContainerGap())
140             .addGroup(layout.createSequentialGroup()
141                 .addComponent(videoUseNiBrButton)
142                 .addContainerGap())
143             .addGroup(layout.createSequentialGroup()
144                 .addGap(21, 21, 21)
145                 .addComponent(basicSetting, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
146             .addGroup(layout.createSequentialGroup()
147                 .addGap(21, 21, 21)
148                 .addComponent(nibrExtendSetting, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
149         );
150         layout.setVerticalGroup(
151             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
152             .addGroup(layout.createSequentialGroup()
153                 .addComponent(videoNoSaveButton)
154                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
155                 .addComponent(videoSaveButton)
156                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
157                 .addComponent(basicSetting, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
158                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
159                 .addComponent(videoUseNiBrButton)
160                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
161                 .addComponent(nibrExtendSetting, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
162         );
163     }// </editor-fold>//GEN-END:initComponents
164     // Variables declaration - do not modify//GEN-BEGIN:variables
165     private javax.swing.JPanel basicSetting;
166     private javax.swing.JCheckBox delVideoCheckBox;
167     private javax.swing.JPanel nibrExtendSetting;
168     private javax.swing.JButton nibrFileChooserButton;
169     private javax.swing.JTextField nibrFileField;
170     private javax.swing.JRadioButton saveFileRadioButton;
171     private javax.swing.JRadioButton saveFolderRadioButton;
172     private javax.swing.JButton showSavingVideoFileDialogButton;
173     private javax.swing.JButton showSavingVideoFolderDialogButton;
174     private javax.swing.ButtonGroup videoNamingGroup;
175     private javax.swing.JRadioButton videoNoSaveButton;
176     private javax.swing.JRadioButton videoSaveButton;
177     private javax.swing.JTextField videoSavedFileField;
178     private javax.swing.JTextField videoSavedFolderField;
179     private javax.swing.ButtonGroup videoSavingGroup;
180     private javax.swing.JRadioButton videoUseNiBrButton;
181     // End of variables declaration//GEN-END:variables
182
183     /** @return \81u\93®\89æ\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82È\82¢\81v\83\89\83W\83I\83{\83^\83\93. */
184     JRadioButton getVideoNoSaveButton() {
185         return videoNoSaveButton;
186     }
187
188     /** @return \81u\93®\89æ\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
189     JRadioButton getVideoSaveButton() {
190         return videoSaveButton;
191     }
192
193     /** @return \81uNicoBrowser\83_\83E\83\93\83\8d\81[\83h\83t\83@\83C\83\8b\82ð\97p\82¢\82é\81v\83\89\83W\83I\83{\83^\83\93. */
194     JRadioButton getVideoUseNiBrButton() {
195         return videoUseNiBrButton;
196     }
197
198     /** @return \81u\95Ï\8a·\8cã\82É\93®\89æ\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
199     JCheckBox getDelVideoCheckBox() {
200         return delVideoCheckBox;
201     }
202
203     /** @return \81u\95Û\91\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
204     JRadioButton getSaveFolderRadioButton() {
205         return saveFolderRadioButton;
206     }
207
208     /** @return \81u\95Û\91\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
209     JRadioButton getSaveFileRadioButton() {
210         return saveFileRadioButton;
211     }
212
213     /** @return \81u\95Û\91\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
214     JTextField getVideoSavedFolderField() {
215         return videoSavedFolderField;
216     }
217
218     /** @return \81u\95Û\91\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\8bN\93®\83{\83^\83\93. */
219     JButton getShowSavingVideoFolderDialogButton() {
220         return showSavingVideoFolderDialogButton;
221     }
222
223     /** @return \81u\95Û\91\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
224     JTextField getVideoSavedFileField() {
225         return videoSavedFileField;
226     }
227
228     /** @return \81u\95Û\91\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\8bN\93®\83{\83^\83\93. */
229     JButton getShowSavingVideoFileDialogButton() {
230         return showSavingVideoFileDialogButton;
231     }
232
233     /** @return \81uNicoBrowser\83_\83E\83\93\83\8d\81[\83h\83t\83@\83C\83\8b\82ð\97p\82¢\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
234     JTextField getNibrFileField() {
235         return nibrFileField;
236     }
237
238     /** @return \81uNicoBrowser\83_\83E\83\93\83\8d\81[\83h\83t\83@\83C\83\8b\82ð\97p\82¢\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\8bN\93®\83{\83^\83\93. */
239     JButton getNibrFileChooserButton() {
240         return nibrFileChooserButton;
241     }
242
243     public static void main(String[] args) {
244         setLookAndFeel();
245         SwingUtilities.invokeLater(new Runnable() {
246
247             public void run() {
248                 JFrame frame = new JFrame();
249                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
250                 frame.setContentPane(new VideoSaveInfoPanel());
251                 frame.pack();
252                 frame.setVisible(true);
253             }
254         });
255     }
256
257     private static void setLookAndFeel() {
258         String lafClassName = UIManager.getSystemLookAndFeelClassName();
259         try {
260             UIManager.setLookAndFeel(lafClassName);
261         } catch (Exception e) {
262             throw new RuntimeException(e);
263         }
264     }
265 }