Permalink
Browse files

Layout fixes for issue #106.

  • Loading branch information...
1 parent 00e30ee commit 8c1dd4d02691e8413c1de52604c4cdcde7ad8c59 @Raptor399 Raptor399 committed Mar 30, 2013
@@ -351,7 +351,7 @@ public void itemStateChanged(ItemEvent e) {
}
});
- builder.add(button, FormLayoutUtil.flip(cc.xyw(1, 11, 2), colSpec, orientation));
+ builder.add(button, FormLayoutUtil.flip(cc.xyw(1, 11, 4), colSpec, orientation));
forcefps = new JCheckBox(Messages.getString("MEncoderVideo.4"));
forcefps.setContentAreaFilled(false);
@@ -569,37 +569,43 @@ public void actionPerformed(ActionEvent e) {
builder.add(fontselect, FormLayoutUtil.flip(cc.xyw(11, 33, 2), colSpec, orientation));
- builder.addLabel(Messages.getString("MEncoderVideo.12"), FormLayoutUtil.flip(cc.xy(1, 39, CellConstraints.RIGHT, CellConstraints.CENTER), colSpec, orientation));
-
- mencoder_ass_scale = new JTextField(configuration.getMencoderAssScale());
- mencoder_ass_scale.addKeyListener(new KeyAdapter() {
- @Override
- public void keyReleased(KeyEvent e) {
- configuration.setMencoderAssScale(mencoder_ass_scale.getText());
+ ass = new JCheckBox(Messages.getString("MEncoderVideo.20"));
+ ass.setContentAreaFilled(false);
+ ass.addItemListener(new ItemListener() {
+ public void itemStateChanged(ItemEvent e) {
+ if (e != null) {
+ configuration.setMencoderAss(e.getStateChange() == ItemEvent.SELECTED);
+ }
}
});
- builder.addLabel(Messages.getString("MEncoderVideo.13"), FormLayoutUtil.flip(cc.xy(5, 39), colSpec, orientation));
+ builder.add(ass, FormLayoutUtil.flip(cc.xy(1, 37), colSpec, orientation));
+ ass.setSelected(configuration.isMencoderAss());
+ ass.getItemListeners()[0].itemStateChanged(null);
- mencoder_ass_outline = new JTextField(configuration.getMencoderAssOutline());
- mencoder_ass_outline.addKeyListener(new KeyAdapter() {
- @Override
- public void keyReleased(KeyEvent e) {
- configuration.setMencoderAssOutline(mencoder_ass_outline.getText());
+ fc = new JCheckBox(Messages.getString("MEncoderVideo.21"));
+ fc.setContentAreaFilled(false);
+ fc.addItemListener(new ItemListener() {
+ public void itemStateChanged(ItemEvent e) {
+ configuration.setMencoderFontConfig(e.getStateChange() == ItemEvent.SELECTED);
}
});
- builder.addLabel(Messages.getString("MEncoderVideo.14"), FormLayoutUtil.flip(cc.xy(9, 39), colSpec, orientation));
+ builder.add(fc, FormLayoutUtil.flip(cc.xyw(3, 37, 5), colSpec, orientation));
+ fc.setSelected(configuration.isMencoderFontConfig());
- mencoder_ass_shadow = new JTextField(configuration.getMencoderAssShadow());
- mencoder_ass_shadow.addKeyListener(new KeyAdapter() {
- @Override
- public void keyReleased(KeyEvent e) {
- configuration.setMencoderAssShadow(mencoder_ass_shadow.getText());
+ assdefaultstyle = new JCheckBox(Messages.getString("MEncoderVideo.36"));
+ assdefaultstyle.setContentAreaFilled(false);
+ assdefaultstyle.addItemListener(new ItemListener() {
+ public void itemStateChanged(ItemEvent e) {
+ configuration.setMencoderAssDefaultStyle(e.getStateChange() == ItemEvent.SELECTED);
}
});
- builder.addLabel(Messages.getString("MEncoderVideo.15"), FormLayoutUtil.flip(cc.xy(13, 39), colSpec, orientation));
+ builder.add(assdefaultstyle, FormLayoutUtil.flip(cc.xyw(8, 37, 4), colSpec, orientation));
+ assdefaultstyle.setSelected(configuration.isMencoderAssDefaultStyle());
+
+ builder.addLabel(Messages.getString("MEncoderVideo.15"), FormLayoutUtil.flip(cc.xy(1, 39, CellConstraints.RIGHT, CellConstraints.CENTER), colSpec, orientation));
mencoder_ass_margin = new JTextField(configuration.getMencoderAssMargin());
mencoder_ass_margin.addKeyListener(new KeyAdapter() {
@@ -609,90 +615,106 @@ public void keyReleased(KeyEvent e) {
}
});
- builder.add(mencoder_ass_scale, FormLayoutUtil.flip(cc.xy(3, 39), colSpec, orientation));
- builder.add(mencoder_ass_outline, FormLayoutUtil.flip(cc.xy(7, 39), colSpec, orientation));
- builder.add(mencoder_ass_shadow, FormLayoutUtil.flip(cc.xy(11, 39), colSpec, orientation));
- builder.add(mencoder_ass_margin, FormLayoutUtil.flip(cc.xy(15, 39), colSpec, orientation));
- builder.addLabel(Messages.getString("MEncoderVideo.16"), FormLayoutUtil.flip(cc.xy(1, 41, CellConstraints.RIGHT, CellConstraints.CENTER), colSpec, orientation));
+ builder.add(mencoder_ass_margin, FormLayoutUtil.flip(cc.xy(3, 39), colSpec, orientation));
+ builder.addLabel(Messages.getString("MEncoderVideo.19"), FormLayoutUtil.flip(cc.xy(5, 39), colSpec, orientation));
- mencoder_noass_scale = new JTextField(configuration.getMencoderNoAssScale());
- mencoder_noass_scale.addKeyListener(new KeyAdapter() {
+ mencoder_noass_subpos = new JTextField(configuration.getMencoderNoAssSubPos());
+ mencoder_noass_subpos.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
- configuration.setMencoderNoAssScale(mencoder_noass_scale.getText());
+ configuration.setMencoderNoAssSubPos(mencoder_noass_subpos.getText());
}
});
- builder.addLabel(Messages.getString("MEncoderVideo.17"), FormLayoutUtil.flip(cc.xy(5, 41), colSpec, orientation));
+ builder.add(mencoder_noass_subpos, FormLayoutUtil.flip(cc.xy(7, 39), colSpec, orientation));
- mencoder_noass_outline = new JTextField(configuration.getMencoderNoAssOutline());
- mencoder_noass_outline.addKeyListener(new KeyAdapter() {
+ subColor = new JButton();
+ subColor.setText(Messages.getString("MEncoderVideo.31"));
+ subColor.setBackground(new Color(configuration.getSubsColor()));
+ subColor.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ Color newColor = JColorChooser.showDialog(
+ SwingUtilities.getWindowAncestor((Component) PMS.get().getFrame()),
+ Messages.getString("MEncoderVideo.125"),
+ subColor.getBackground()
+ );
+
+ if (newColor != null) {
+ subColor.setBackground(newColor);
+ configuration.setSubsColor(newColor.getRGB());
+ }
+ }
+ });
+
+ builder.add(subColor, FormLayoutUtil.flip(cc.xyw(9, 39, 4), colSpec, orientation));
+
+ builder.addLabel(Messages.getString("MEncoderVideo.12"), FormLayoutUtil.flip(cc.xy(1, 41, CellConstraints.RIGHT, CellConstraints.CENTER), colSpec, orientation));
+
+ mencoder_ass_scale = new JTextField(configuration.getMencoderAssScale());
+ mencoder_ass_scale.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
- configuration.setMencoderNoAssOutline(mencoder_noass_outline.getText());
+ configuration.setMencoderAssScale(mencoder_ass_scale.getText());
}
});
- builder.addLabel(Messages.getString("MEncoderVideo.18"), FormLayoutUtil.flip(cc.xy(9, 41), colSpec, orientation));
+ builder.add(mencoder_ass_scale, FormLayoutUtil.flip(cc.xy(3, 41), colSpec, orientation));
+ builder.addLabel(Messages.getString("MEncoderVideo.13"), FormLayoutUtil.flip(cc.xy(5, 41), colSpec, orientation));
- mencoder_noass_blur = new JTextField(configuration.getMencoderNoAssBlur());
- mencoder_noass_blur.addKeyListener(new KeyAdapter() {
+ mencoder_ass_outline = new JTextField(configuration.getMencoderAssOutline());
+ mencoder_ass_outline.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
- configuration.setMencoderNoAssBlur(mencoder_noass_blur.getText());
+ configuration.setMencoderAssOutline(mencoder_ass_outline.getText());
}
});
- builder.addLabel(Messages.getString("MEncoderVideo.19"), FormLayoutUtil.flip(cc.xy(13, 41), colSpec, orientation));
+ builder.add(mencoder_ass_outline, FormLayoutUtil.flip(cc.xy(7, 41), colSpec, orientation));
+ builder.addLabel(Messages.getString("MEncoderVideo.14"), FormLayoutUtil.flip(cc.xy(9, 41), colSpec, orientation));
- mencoder_noass_subpos = new JTextField(configuration.getMencoderNoAssSubPos());
- mencoder_noass_subpos.addKeyListener(new KeyAdapter() {
+ mencoder_ass_shadow = new JTextField(configuration.getMencoderAssShadow());
+ mencoder_ass_shadow.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
- configuration.setMencoderNoAssSubPos(mencoder_noass_subpos.getText());
+ configuration.setMencoderAssShadow(mencoder_ass_shadow.getText());
}
});
- builder.add(mencoder_noass_scale, FormLayoutUtil.flip(cc.xy(3, 41), colSpec, orientation));
- builder.add(mencoder_noass_outline, FormLayoutUtil.flip(cc.xy(7, 41), colSpec, orientation));
- builder.add(mencoder_noass_blur, FormLayoutUtil.flip(cc.xy(11, 41), colSpec, orientation));
- builder.add(mencoder_noass_subpos, FormLayoutUtil.flip(cc.xy(15, 41), colSpec, orientation));
+ builder.add(mencoder_ass_shadow, FormLayoutUtil.flip(cc.xy(11, 41), colSpec, orientation));
+ builder.addLabel(Messages.getString("MEncoderVideo.16"), FormLayoutUtil.flip(cc.xy(1, 43, CellConstraints.RIGHT, CellConstraints.CENTER), colSpec, orientation));
- ass = new JCheckBox(Messages.getString("MEncoderVideo.20"));
- ass.setContentAreaFilled(false);
- ass.addItemListener(new ItemListener() {
- public void itemStateChanged(ItemEvent e) {
- if (e != null) {
- configuration.setMencoderAss(e.getStateChange() == ItemEvent.SELECTED);
- }
+ mencoder_noass_scale = new JTextField(configuration.getMencoderNoAssScale());
+ mencoder_noass_scale.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ configuration.setMencoderNoAssScale(mencoder_noass_scale.getText());
}
});
- builder.add(ass, FormLayoutUtil.flip(cc.xy(1, 37), colSpec, orientation));
- ass.setSelected(configuration.isMencoderAss());
- ass.getItemListeners()[0].itemStateChanged(null);
+ builder.add(mencoder_noass_scale, FormLayoutUtil.flip(cc.xy(3, 43), colSpec, orientation));
+ builder.addLabel(Messages.getString("MEncoderVideo.17"), FormLayoutUtil.flip(cc.xy(5, 43), colSpec, orientation));
- fc = new JCheckBox(Messages.getString("MEncoderVideo.21"));
- fc.setContentAreaFilled(false);
- fc.addItemListener(new ItemListener() {
- public void itemStateChanged(ItemEvent e) {
- configuration.setMencoderFontConfig(e.getStateChange() == ItemEvent.SELECTED);
+ mencoder_noass_outline = new JTextField(configuration.getMencoderNoAssOutline());
+ mencoder_noass_outline.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ configuration.setMencoderNoAssOutline(mencoder_noass_outline.getText());
}
});
- builder.add(fc, FormLayoutUtil.flip(cc.xyw(3, 37, 5), colSpec, orientation));
- fc.setSelected(configuration.isMencoderFontConfig());
+ builder.add(mencoder_noass_outline, FormLayoutUtil.flip(cc.xy(7, 43), colSpec, orientation));
+ builder.addLabel(Messages.getString("MEncoderVideo.18"), FormLayoutUtil.flip(cc.xy(9, 43), colSpec, orientation));
- assdefaultstyle = new JCheckBox(Messages.getString("MEncoderVideo.36"));
- assdefaultstyle.setContentAreaFilled(false);
- assdefaultstyle.addItemListener(new ItemListener() {
- public void itemStateChanged(ItemEvent e) {
- configuration.setMencoderAssDefaultStyle(e.getStateChange() == ItemEvent.SELECTED);
+ mencoder_noass_blur = new JTextField(configuration.getMencoderNoAssBlur());
+ mencoder_noass_blur.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ configuration.setMencoderNoAssBlur(mencoder_noass_blur.getText());
}
});
- builder.add(assdefaultstyle, FormLayoutUtil.flip(cc.xyw(8, 37, 4), colSpec, orientation));
- assdefaultstyle.setSelected(configuration.isMencoderAssDefaultStyle());
+ builder.add(mencoder_noass_blur, FormLayoutUtil.flip(cc.xy(11, 43), colSpec, orientation));
builder.addLabel(Messages.getString("MEncoderVideo.92"), FormLayoutUtil.flip(cc.xy(1, 45), colSpec, orientation));
@@ -729,27 +751,6 @@ public void keyReleased(KeyEvent e) {
builder.add(och, FormLayoutUtil.flip(cc.xyw(7, 49, 1), colSpec, orientation));
- subColor = new JButton();
- subColor.setText(Messages.getString("MEncoderVideo.31"));
- subColor.setBackground(new Color(configuration.getSubsColor()));
- subColor.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- Color newColor = JColorChooser.showDialog(
- SwingUtilities.getWindowAncestor((Component) PMS.get().getFrame()),
- Messages.getString("MEncoderVideo.125"),
- subColor.getBackground()
- );
-
- if (newColor != null) {
- subColor.setBackground(newColor);
- configuration.setSubsColor(newColor.getRGB());
- }
- }
- });
-
- builder.add(subColor, FormLayoutUtil.flip(cc.xyw(12, 37, 4), colSpec, orientation));
-
configuration.addConfigurationListener(new ConfigurationListener() {
@Override
public void configurationChanged(ConfigurationEvent event) {
@@ -102,11 +102,11 @@ public JComponent build() {
lMplayerLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
lMplayerLink.addMouseListener(mplayerLink);
- final LinkMouseListener mplayerSubJunkBuildsLink = new LinkMouseListener("SubJunk's MPlayer builds",
- "http://www.spirton.com/mplayer-mencoder-subjunk-build/");
- JLabel lMplayerSubJunkBuildsLink = builder.addLabel(mplayerSubJunkBuildsLink.getLabel(), cc.xy(2, 13, "center, fill"));
- lMplayerSubJunkBuildsLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
- lMplayerSubJunkBuildsLink.addMouseListener(mplayerSubJunkBuildsLink);
+ final LinkMouseListener vlcLink = new LinkMouseListener("VLC media player",
+ "http://www.videolan.org/vlc/");
+ JLabel lVlcLink = builder.addLabel(vlcLink.getLabel(), cc.xy(2, 13, "center, fill"));
+ lVlcLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
+ lVlcLink.addMouseListener(vlcLink);
final LinkMouseListener mediaInfoLink = new LinkMouseListener("MediaInfo",
"http://mediainfo.sourceforge.net/en");
@@ -63,7 +63,7 @@
public static final String ALL_DRIVES = Messages.getString("FoldTab.0");
private static final String PANEL_COL_SPEC = "left:pref, 50dlu, pref, 150dlu, pref, 25dlu, pref, 25dlu, pref, default:grow";
- private static final String PANEL_ROW_SPEC = "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 10dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 10dlu, fill:default:grow";
+ private static final String PANEL_ROW_SPEC = "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 8dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 8dlu, fill:default:grow";
private static final String SHARED_FOLDER_COL_SPEC = "left:pref, left:pref, pref, pref, pref, 0:grow";
private static final String SHARED_FOLDER_ROW_SPEC = "p, 3dlu, p, 3dlu, fill:default:grow";
@@ -165,20 +165,20 @@ public JComponent build() {
cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
builder.add(archive, FormLayoutUtil.flip(cc.xyw(1, 15, 3), colSpec, orientation));
- builder.add(hidevideosettings, FormLayoutUtil.flip(cc.xyw(4, 15, 3), colSpec, orientation));
- builder.add(hidetranscode, FormLayoutUtil.flip(cc.xyw(8, 15, 3), colSpec, orientation));
+ builder.add(hidevideosettings, FormLayoutUtil.flip(cc.xyw(4, 15, 2), colSpec, orientation));
+ builder.add(hidetranscode, FormLayoutUtil.flip(cc.xyw(7, 15, 4), colSpec, orientation));
builder.add(hideextensions, FormLayoutUtil.flip(cc.xyw(1, 17, 3), colSpec, orientation));
- builder.add(hideengines, FormLayoutUtil.flip(cc.xyw(4, 17, 3), colSpec, orientation));
- builder.add(hideemptyfolders, FormLayoutUtil.flip(cc.xyw(8, 17, 3), colSpec, orientation));
+ builder.add(hideengines, FormLayoutUtil.flip(cc.xyw(4, 17, 2), colSpec, orientation));
+ builder.add(hideemptyfolders, FormLayoutUtil.flip(cc.xyw(7, 17, 4), colSpec, orientation));
builder.add(itunes, FormLayoutUtil.flip(cc.xyw(1, 19, 3), colSpec, orientation));
- builder.add(iphoto, FormLayoutUtil.flip(cc.xyw(4, 19, 3), colSpec, orientation));
- builder.add(aperture, FormLayoutUtil.flip(cc.xyw(8, 19, 3), colSpec, orientation));
+ builder.add(iphoto, FormLayoutUtil.flip(cc.xyw(4, 19, 2), colSpec, orientation));
+ builder.add(aperture, FormLayoutUtil.flip(cc.xyw(7, 19, 4), colSpec, orientation));
builder.add(cacheenable, FormLayoutUtil.flip(cc.xy(1, 21), colSpec, orientation));
- builder.add(cachereset, FormLayoutUtil.flip(cc.xyw(4, 21, 3), colSpec, orientation));
- builder.add(hidemedialibraryfolder, FormLayoutUtil.flip(cc.xyw(8, 21, 3), colSpec, orientation));
+ builder.add(cachereset, FormLayoutUtil.flip(cc.xyw(4, 21, 2), colSpec, orientation));
+ builder.add(hidemedialibraryfolder, FormLayoutUtil.flip(cc.xyw(7, 21, 4), colSpec, orientation));
builder.addLabel(Messages.getString("FoldTab.18"), FormLayoutUtil.flip(cc.xyw(1, 23, 3), colSpec, orientation));
builder.add(sortmethod, FormLayoutUtil.flip(cc.xyw(4, 23, 3), colSpec, orientation));
@@ -479,7 +479,7 @@ public void itemStateChanged(ItemEvent e) {
private JComponent buildVideoSetupPanel() {
String colSpec = FormLayoutUtil.getColSpec("left:pref, 2dlu, pref:grow", orientation);
- FormLayout layout = new FormLayout(colSpec, "$lgap, 2*(pref, 2dlu), 10dlu, 10dlu, 3*(pref, 2dlu), pref");
+ FormLayout layout = new FormLayout(colSpec, "$lgap, 2*(pref, 2dlu), 10dlu, 10dlu, 3*(pref, 5dlu), pref");
PanelBuilder builder = new PanelBuilder(layout);
builder.setBorder(Borders.DLU4_BORDER);
CellConstraints cc = new CellConstraints();
@@ -510,8 +510,8 @@ public void itemStateChanged(ItemEvent e) {
builder.add(new JLabel(Messages.getString("TrTab2.32")), FormLayoutUtil.flip(cc.xy(1, 10), colSpec, orientation));
Object data[] = new Object[] {
configuration.getMencoderMainSettings(), /* default */
- String.format("keyint=5:vqscale=1:vqmin=2 /* %s */", Messages.getString("TrTab2.60")), /* great */
String.format("keyint=5:vqscale=1:vqmin=1 /* %s */", Messages.getString("TrTab2.61")), /* lossless */
+ String.format("keyint=5:vqscale=1:vqmin=2 /* %s */", Messages.getString("TrTab2.60")), /* great */
String.format("keyint=5:vqscale=2:vqmin=3 /* %s */", Messages.getString("TrTab2.62")), /* good (wired) */
String.format("keyint=25:vqmax=5:vqmin=2 /* %s */", Messages.getString("TrTab2.63")), /* good (wireless) */
String.format("keyint=25:vqmax=7:vqmin=2 /* %s */", Messages.getString("TrTab2.64")), /* medium (wireless) */
Oops, something went wrong.

0 comments on commit 8c1dd4d

Please sign in to comment.