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;
import org.apache.commons.lang.StringUtils;
import saccubus.FFmpegSelectedItem;
import saccubus.OptionComboBoxModel;
-import yukihane.inqubus.Config;
+import yukihane.inqubus.config.Config;
/**
*
final JTextField fldFfmpegOptionOut = new JTextField();
final JTextField fldFfmpegOptionAv = new JTextField();
final JCheckBox cbFfmpegOptionResize = new JCheckBox("次のサイズに収まるよう縮小(-s)");
- final JTextField fldFfmpegOptionResizeWidth = new JTextField();
- final JTextField fldFfmpegOptionResizeHeight = new JTextField();
+ final NumberFormattedTextField fldFfmpegOptionResizeWidth = new NumberFormattedTextField();
+ final NumberFormattedTextField fldFfmpegOptionResizeHeight = new NumberFormattedTextField();
final JCheckBox cbFfmpegOptionKeepAspect = new JCheckBox("アスペクト比を維持");
void init(Config p) {
.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())