// ROTATION PANEL
rotationPanel.setBorder(BorderFactory.createTitledBorder(GettextResource.gettext(
config.getI18nResourceBundle(), "Rotation")));
rotationPanel.setPreferredSize(new Dimension(200, 95));
rotationPanel.setMinimumSize(new Dimension(160, 90));
rotationPanelLayout = new SpringLayout();
rotationPanel.setLayout(rotationPanelLayout);
rotationBox = new JComboBox();
rotationBox.addItem("90");
rotationBox.addItem("180");
rotationBox.addItem("270");
rotationPagesBox = new JComboBox();
rotationPagesBox.addItem(new StringItem(ValidationUtility.ALL_STRING, GettextResource.gettext(config
.getI18nResourceBundle(), "All")));
rotationPagesBox.addItem(new StringItem(ValidationUtility.EVEN_STRING, GettextResource.gettext(config
.getI18nResourceBundle(), "Even")));
rotationPagesBox.addItem(new StringItem(ValidationUtility.ODD_STRING, GettextResource.gettext(config
.getI18nResourceBundle(), "Odd")));
rotateComboLabel.setText(GettextResource.gettext(config.getI18nResourceBundle(),
"Clockwise rotation (degrees):"));
rotatePagesComboLabel.setText(GettextResource.gettext(config.getI18nResourceBundle(), "Pages:"));
StringBuffer sb1 = new StringBuffer();
sb1.append("<html><body><b>" + GettextResource.gettext(config.getI18nResourceBundle(), "Rotation") + "</b>");
sb1.append("<p> "
+ GettextResource.gettext(config.getI18nResourceBundle(), "Set the rotation degrees (clockwise).")
+ "</p>");
sb1.append("<p> "
+ GettextResource.gettext(config.getI18nResourceBundle(), "Set the pages that will be rotated.")
+ "</p>");
sb1.append("</body></html>");
rotateHelpLabel = new JHelpLabel(sb1.toString(), true);
rotationPanel.add(rotateHelpLabel);
rotationPanel.add(rotateComboLabel);
rotationPanel.add(rotationBox);
rotationPanel.add(rotatePagesComboLabel);
rotationPanel.add(rotationPagesBox);
rotationPanel.add(rotateHelpLabel);
topConst.fill = GridBagConstraints.HORIZONTAL;
topConst.weightx = 0.0;
topConst.weighty = 0.0;
topConst.gridwidth = 3;
topConst.gridheight = 1;
topConst.gridx = 0;
topConst.gridy = 1;
topPanel.add(rotationPanel, topConst);
// DESTINATION_PANEL
destinationPanelLayout = new SpringLayout();
destinationPanel.setLayout(destinationPanelLayout);
TitledBorder titledBorder = BorderFactory.createTitledBorder(GettextResource.gettext(config
.getI18nResourceBundle(), "Destination folder"));
destinationPanel.setBorder(titledBorder);
destinationPanel.setPreferredSize(new Dimension(200, 160));
destinationPanel.setMinimumSize(new Dimension(160, 150));
// END_DESTINATION_PANEL
destinationPanel.add(destinationTextField);
topConst.fill = GridBagConstraints.HORIZONTAL;
topConst.weightx = 0.0;
topConst.weighty = 0.0;
topConst.gridwidth = 3;
topConst.gridheight = 1;
topConst.gridx = 0;
topConst.gridy = 2;
topPanel.add(destinationPanel, topConst);
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.ipady = 5;
c.weightx = 1.0;
c.weighty = 1.0;
c.gridwidth = 3;
c.gridx = 0;
c.gridy = 0;
add(topPanel, c);
// BROWSE_BUTTON
browseButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = SharedJFileChooser.getInstance(SharedJFileChooserType.NO_FILTER,
JFileChooser.DIRECTORIES_ONLY, destinationTextField.getText());
if (fileChooser.showOpenDialog(browseButton.getParent()) == JFileChooser.APPROVE_OPTION) {
File chosenFile = fileChooser.getSelectedFile();
if (chosenFile != null) {
destinationTextField.setText(chosenFile.getAbsolutePath());
}
}
}
});
destinationPanel.add(browseButton);
// END_BROWSE_BUTTON
overwriteCheckbox.setSelected(true);
destinationPanel.add(overwriteCheckbox);
outputCompressedCheck.addItemListener(new CompressCheckBoxItemListener(versionCombo));
outputCompressedCheck.setSelected(true);
destinationPanel.add(outputCompressedCheck);
destinationPanel.add(versionCombo);
destinationPanel.add(outputVersionLabel);
// HELP_LABEL_DESTINATION
String helpTextDest = "<html><body><b>"
+ GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
"Destination output directory")
+ "</b>"
+ "<p>"
+ GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
"To choose a folder browse or enter the full path to the destination output directory.")
+ "</p>"
+ "<p>"
+ GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
"Check the box if you want to overwrite the output files if they already exist.")
+ "</p>"
+ "<p>"
+ GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
"Check the box if you want compressed output files.")
+ " "
+ GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
"PDF version 1.5 or above.")
+ "</p>"
+ "<p>"
+ GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),
"Set the pdf version of the ouput document.") + "</p>" + "</body></html>";
destinationHelpLabel = new JHelpLabel(helpTextDest, true);
destinationPanel.add(destinationHelpLabel);
// END_HELP_LABEL_DESTINATION
outputOptionsPanel.setBorder(BorderFactory.createTitledBorder(GettextResource.gettext(config
.getI18nResourceBundle(), "Output options")));
outputOptionsPanel.setPreferredSize(new Dimension(200, 55));
outputOptionsPanel.setMinimumSize(new Dimension(160, 50));
outputOptionsPanelLayout = new SpringLayout();
outputOptionsPanel.setLayout(outputOptionsPanelLayout);
outPrefixLabel.setText(GettextResource.gettext(config.getI18nResourceBundle(), "Output file names prefix:"));
outputOptionsPanel.add(outPrefixLabel);