package yukihane.inqubus.gui;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.BorderFactory;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
+import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
.addComponent(cbFfmpegOptionKeepAspect)
);
+ final JButton btnReload = new JButton("更新");
+ btnReload.addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ mdlFfmpegOption.reload();
+ }
+ });
final GroupLayout glFfmpegParam = new GroupLayout(this);
.addGroup(glFfmpegParam.createSequentialGroup()
.addContainerGap()
.addGroup(glFfmpegParam.createParallelGroup(Alignment.LEADING)
+ .addGroup(glFfmpegParam.createSequentialGroup()
+ .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(ComponentPlacement.UNRELATED)
+ .addComponent(btnReload)
+ )
.addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
+ )
.addContainerGap())
);
glFfmpegParam.setVerticalGroup(
glFfmpegParam.createParallelGroup(Alignment.LEADING)
.addGroup(glFfmpegParam.createSequentialGroup()
.addContainerGap()
- .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+ .addGroup(glFfmpegParam.createParallelGroup(Alignment.BASELINE)
+ .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+ .addComponent(btnReload)
+ )
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(pnlFfmpegParamOption)
.addContainerGap())