topPanel.add(selectionPanel, topConst);
// CHECK_BOX
mixOptionsPanel.setBorder(BorderFactory.createTitledBorder(GettextResource.gettext(config
.getI18nResourceBundle(), "Mix options")));
mixOptionsPanelLayout = new SpringLayout();
mixOptionsPanel.setLayout(mixOptionsPanelLayout);
mixOptionsPanel.setPreferredSize(new Dimension(200, 110));
mixOptionsPanel.setMinimumSize(new Dimension(160, 105));
optionsChecksPanel.setLayout(new BoxLayout(optionsChecksPanel, BoxLayout.LINE_AXIS));
optionsChecksPanel.add(Box.createRigidArea(new Dimension(5, 0)));
reverseFirstCheckbox.setText(GettextResource.gettext(config.getI18nResourceBundle(), "Reverse first document"));
reverseFirstCheckbox.setSelected(false);
optionsChecksPanel.add(reverseFirstCheckbox);
optionsChecksPanel.add(Box.createRigidArea(new Dimension(10, 0)));
reverseSecondCheckbox.setText(GettextResource
.gettext(config.getI18nResourceBundle(), "Reverse second document"));
reverseSecondCheckbox.setSelected(true);
optionsChecksPanel.add(reverseSecondCheckbox);
mixOptionsPanel.add(optionsChecksPanel);
stepTextField.setText(Integer.toString(MixParsedCommand.DEFAULT_STEP));
secondStepTextField.setText(Integer.toString(MixParsedCommand.DEFAULT_STEP));
GroupLayout optionFieldsLayout = new GroupLayout(optionsFieldsPanel);
optionsFieldsPanel.setLayout(optionFieldsLayout);
optionFieldsLayout.setAutoCreateGaps(true);
optionFieldsLayout
.setHorizontalGroup(optionFieldsLayout.createSequentialGroup().addGroup(
optionFieldsLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(stepLabel)
.addComponent(secondStepLabel)).addGroup(
optionFieldsLayout.createParallelGroup().addComponent(stepTextField).addComponent(
secondStepTextField)));
optionFieldsLayout.setVerticalGroup(optionFieldsLayout.createSequentialGroup().addGroup(
optionFieldsLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(stepLabel)
.addComponent(stepTextField)).addGroup(
optionFieldsLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(secondStepLabel)
.addComponent(secondStepTextField)));
mixOptionsPanel.add(optionsFieldsPanel);
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(mixOptionsPanel, topConst);
// END_CHECK_BOX
stepLabel.setText(GettextResource.gettext(config.getI18nResourceBundle(),
"Number of pages to switch from the first document to the other"));
secondStepLabel.setText(GettextResource.gettext(config.getI18nResourceBundle(),
"Number of pages to switch from the second document to the other"));
StringBuilder sb = new StringBuilder("<html><body><b>");
sb.append(GettextResource.gettext(config.getI18nResourceBundle(), "Mix options"));
sb.append("</b><p>");
sb.append(GettextResource.gettext(config.getI18nResourceBundle(),
"Tick the boxes if you want to reverse the first or the second document (or both)."));
sb.append("</p><p>");
sb.append(GettextResource.gettext(config.getI18nResourceBundle(),
"Set the number of pages to switch from the first document to the other one (default is 1)."));
sb.append("</p><p>");
sb.append(GettextResource.gettext(config.getI18nResourceBundle(),
"Set the number of pages to switch from the second document to the other one (default is 1)."));
sb.append("</p></body></html>");
optionsHelpLabel = new JHelpLabel(sb.toString(), true);
mixOptionsPanel.add(optionsHelpLabel);
stepTextField.setPreferredSize(new Dimension(45, 20));
secondStepTextField.setPreferredSize(new Dimension(45, 20));
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;
c.insets = new Insets(0, 0, 10, 0);
add(topPanel, c);
selectionPanel.addPopupMenuAction(new SetOutputPathSelectionTableAction(selectionPanel, destinationTextField,
DEFAULT_OUPUT_NAME));
// DESTINATION_PANEL
destinationPanelLayout = new SpringLayout();
destinationPanel.setLayout(destinationPanelLayout);
destinationPanel.setBorder(BorderFactory.createTitledBorder(GettextResource.gettext(config
.getI18nResourceBundle(), "Destination output file")));
destinationPanel.setPreferredSize(new Dimension(200, 160));
destinationPanel.setMinimumSize(new Dimension(160, 150));