OSDN Git Service

dae729195af3d036dea7530c7e52fe6d323d2139
[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         videoNoSaveButton.setName("videoNoSaveButton"); // NOI18N
54
55         videoSavingGroup.add(videoSaveButton);
56         videoSaveButton.setText("\93®\89æ\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é");
57         videoSaveButton.setName("videoSaveButton"); // NOI18N
58
59         delVideoCheckBox.setText("\95Ï\8a·\8cã\82É\93®\89æ\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é");
60         delVideoCheckBox.setName("delVideoCheckBox"); // NOI18N
61
62         videoNamingGroup.add(saveFolderRadioButton);
63         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é");
64         saveFolderRadioButton.setName("saveFolderRadioButton"); // NOI18N
65
66         videoSavedFolderField.setName("videoSavedFolderField"); // NOI18N
67
68         showSavingVideoFolderDialogButton.setText("\8eQ\8fÆ...");
69         showSavingVideoFolderDialogButton.setName("showSavingVideoFolderDialogButton"); // NOI18N
70
71         videoNamingGroup.add(saveFileRadioButton);
72         saveFileRadioButton.setText("\95Û\91\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
73         saveFileRadioButton.setName("saveFileRadioButton"); // NOI18N
74
75         videoSavedFileField.setName("videoSavedFileField"); // NOI18N
76
77         showSavingVideoFileDialogButton.setText("\8eQ\8fÆ...");
78         showSavingVideoFileDialogButton.setName("showSavingVideoFileDialogButton"); // NOI18N
79
80         javax.swing.GroupLayout basicSettingLayout = new javax.swing.GroupLayout(basicSetting);
81         basicSetting.setLayout(basicSettingLayout);
82         basicSettingLayout.setHorizontalGroup(
83             basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
84             .addGroup(basicSettingLayout.createSequentialGroup()
85                 .addGroup(basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
86                     .addComponent(delVideoCheckBox)
87                     .addComponent(saveFolderRadioButton)
88                     .addComponent(saveFileRadioButton)
89                     .addGroup(basicSettingLayout.createSequentialGroup()
90                         .addGap(21, 21, 21)
91                         .addComponent(videoSavedFileField, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
92                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
93                         .addComponent(showSavingVideoFileDialogButton))
94                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, basicSettingLayout.createSequentialGroup()
95                         .addGap(21, 21, 21)
96                         .addComponent(videoSavedFolderField, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
97                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
98                         .addComponent(showSavingVideoFolderDialogButton)))
99                 .addContainerGap())
100         );
101         basicSettingLayout.setVerticalGroup(
102             basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
103             .addGroup(basicSettingLayout.createSequentialGroup()
104                 .addComponent(delVideoCheckBox)
105                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
106                 .addComponent(saveFolderRadioButton)
107                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
108                 .addGroup(basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
109                     .addComponent(videoSavedFolderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
110                     .addComponent(showSavingVideoFolderDialogButton))
111                 .addGap(8, 8, 8)
112                 .addComponent(saveFileRadioButton)
113                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
114                 .addGroup(basicSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
115                     .addComponent(videoSavedFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
116                     .addComponent(showSavingVideoFileDialogButton))
117                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
118         );
119
120         videoSavingGroup.add(videoUseNiBrButton);
121         videoUseNiBrButton.setText("NicoBrowser\83_\83E\83\93\83\8d\81[\83h\83t\83@\83C\83\8b\82ð\97p\82¢\82é");
122         videoUseNiBrButton.setName("videoUseNiBrButton"); // NOI18N
123
124         nibrFileField.setName("nibrFileField"); // NOI18N
125
126         nibrFileChooserButton.setText("\8eQ\8fÆ...");
127
128         javax.swing.GroupLayout nibrExtendSettingLayout = new javax.swing.GroupLayout(nibrExtendSetting);
129         nibrExtendSetting.setLayout(nibrExtendSettingLayout);
130         nibrExtendSettingLayout.setHorizontalGroup(
131             nibrExtendSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
132             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, nibrExtendSettingLayout.createSequentialGroup()
133                 .addComponent(nibrFileField, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
134                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
135                 .addComponent(nibrFileChooserButton)
136                 .addContainerGap())
137         );
138         nibrExtendSettingLayout.setVerticalGroup(
139             nibrExtendSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
140             .addGroup(nibrExtendSettingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
141                 .addComponent(nibrFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
142                 .addComponent(nibrFileChooserButton))
143         );
144
145         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
146         this.setLayout(layout);
147         layout.setHorizontalGroup(
148             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
149             .addGroup(layout.createSequentialGroup()
150                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
151                     .addComponent(videoNoSaveButton)
152                     .addComponent(videoSaveButton))
153                 .addContainerGap())
154             .addGroup(layout.createSequentialGroup()
155                 .addComponent(videoUseNiBrButton)
156                 .addContainerGap())
157             .addGroup(layout.createSequentialGroup()
158                 .addGap(21, 21, 21)
159                 .addComponent(basicSetting, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
160             .addGroup(layout.createSequentialGroup()
161                 .addGap(21, 21, 21)
162                 .addComponent(nibrExtendSetting, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
163         );
164         layout.setVerticalGroup(
165             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
166             .addGroup(layout.createSequentialGroup()
167                 .addComponent(videoNoSaveButton)
168                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
169                 .addComponent(videoSaveButton)
170                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
171                 .addComponent(basicSetting, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
172                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
173                 .addComponent(videoUseNiBrButton)
174                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
175                 .addComponent(nibrExtendSetting, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
176         );
177     }// </editor-fold>//GEN-END:initComponents
178     // Variables declaration - do not modify//GEN-BEGIN:variables
179     private javax.swing.JPanel basicSetting;
180     private javax.swing.JCheckBox delVideoCheckBox;
181     private javax.swing.JPanel nibrExtendSetting;
182     private javax.swing.JButton nibrFileChooserButton;
183     private javax.swing.JTextField nibrFileField;
184     private javax.swing.JRadioButton saveFileRadioButton;
185     private javax.swing.JRadioButton saveFolderRadioButton;
186     private javax.swing.JButton showSavingVideoFileDialogButton;
187     private javax.swing.JButton showSavingVideoFolderDialogButton;
188     private javax.swing.ButtonGroup videoNamingGroup;
189     private javax.swing.JRadioButton videoNoSaveButton;
190     private javax.swing.JRadioButton videoSaveButton;
191     private javax.swing.JTextField videoSavedFileField;
192     private javax.swing.JTextField videoSavedFolderField;
193     private javax.swing.ButtonGroup videoSavingGroup;
194     private javax.swing.JRadioButton videoUseNiBrButton;
195     // End of variables declaration//GEN-END:variables
196
197     /** @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. */
198     JRadioButton getVideoNoSaveButton() {
199         return videoNoSaveButton;
200     }
201
202     /** @return \81u\93®\89æ\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
203     JRadioButton getVideoSaveButton() {
204         return videoSaveButton;
205     }
206
207     /** @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. */
208     JRadioButton getVideoUseNiBrButton() {
209         return videoUseNiBrButton;
210     }
211
212     /** @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. */
213     JCheckBox getDelVideoCheckBox() {
214         return delVideoCheckBox;
215     }
216
217     /** @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. */
218     JRadioButton getSaveFolderRadioButton() {
219         return saveFolderRadioButton;
220     }
221
222     /** @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. */
223     JRadioButton getSaveFileRadioButton() {
224         return saveFileRadioButton;
225     }
226
227     /** @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. */
228     JTextField getVideoSavedFolderField() {
229         return videoSavedFolderField;
230     }
231
232     /** @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. */
233     JButton getShowSavingVideoFolderDialogButton() {
234         return showSavingVideoFolderDialogButton;
235     }
236
237     /** @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. */
238     JTextField getVideoSavedFileField() {
239         return videoSavedFileField;
240     }
241
242     /** @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. */
243     JButton getShowSavingVideoFileDialogButton() {
244         return showSavingVideoFileDialogButton;
245     }
246
247     /** @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. */
248     JTextField getNibrFileField() {
249         return nibrFileField;
250     }
251
252     /** @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. */
253     JButton getNibrFileChooserButton() {
254         return nibrFileChooserButton;
255     }
256
257     public static void main(String[] args) {
258         setLookAndFeel();
259         SwingUtilities.invokeLater(new Runnable() {
260
261             public void run() {
262                 JFrame frame = new JFrame();
263                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
264                 frame.setContentPane(new VideoSaveInfoPanel());
265                 frame.pack();
266                 frame.setVisible(true);
267             }
268         });
269     }
270
271     private static void setLookAndFeel() {
272         String lafClassName = UIManager.getSystemLookAndFeelClassName();
273         try {
274             UIManager.setLookAndFeel(lafClassName);
275         } catch (Exception e) {
276             throw new RuntimeException(e);
277         }
278     }
279 }