/**************************************************************************
OmegaT - Computer Assisted Translation (CAT) tool
with fuzzy matching, translation memory, keyword search,
glossaries, and translation leveraging into updated projects.
Copyright (C) 2016 Aaron Madlon-Kay
Home page: http://www.omegat.org/
Support center: http://groups.yahoo.com/group/OmegaT/
This file is part of OmegaT.
OmegaT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OmegaT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/
package org.omegat.gui.align;
import javax.swing.DefaultComboBoxModel;
import org.omegat.gui.align.Aligner.AlgorithmClass;
import org.omegat.gui.align.Aligner.CalculatorType;
import org.omegat.gui.align.Aligner.ComparisonMode;
import org.omegat.gui.align.Aligner.CounterType;
import org.omegat.util.OStrings;
/**
* UI component for displaying and editing the results of algorithmic alignment.
* <p>
* THIS MUST BE EDITED IN NETBEANS GUI BUILDER.
*
* @author Aaron Madlon-Kay
*/
@SuppressWarnings("serial")
public class AlignPanel extends javax.swing.JPanel {
/**
* Creates new form AlignPanel
*/
public AlignPanel() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jPanel9 = new javax.swing.JPanel();
scrollPane = new javax.swing.JScrollPane();
table = new javax.swing.JTable();
jPanel13 = new javax.swing.JPanel();
progressBar = new javax.swing.JProgressBar();
instructionsLabel = new javax.swing.JLabel();
controlsPanel = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
jPanel8 = new javax.swing.JPanel();
moveUpButton = new javax.swing.JButton();
moveDownButton = new javax.swing.JButton();
filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(32767, 20));
splitButton = new javax.swing.JButton();
mergeButton = new javax.swing.JButton();
editButton = new javax.swing.JButton();
filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
jPanel4 = new javax.swing.JPanel();
advancedPanel = new javax.swing.JPanel();
jPanel7 = new javax.swing.JPanel();
jLabel4 = new javax.swing.JLabel();
comparisonComboBox = new javax.swing.JComboBox<>();
filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 32767));
averageDistanceLabel = new javax.swing.JLabel();
filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
jPanel6 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
algorithmComboBox = new javax.swing.JComboBox<>();
filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 32767));
jLabel3 = new javax.swing.JLabel();
calculatorComboBox = new javax.swing.JComboBox<>();
filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 32767));
jLabel5 = new javax.swing.JLabel();
counterComboBox = new javax.swing.JComboBox<>();
jPanel5 = new javax.swing.JPanel();
segmentationControlsPanel = new javax.swing.JPanel();
segmentingCheckBox = new javax.swing.JCheckBox();
segmentingRulesButton = new javax.swing.JButton();
filteringControlsPanel = new javax.swing.JPanel();
removeTagsCheckBox = new javax.swing.JCheckBox();
fileFilterSettingsButton = new javax.swing.JButton();
jPanel11 = new javax.swing.JPanel();
highlightCheckBox = new javax.swing.JCheckBox();
highlightPatternButton = new javax.swing.JButton();
jPanel10 = new javax.swing.JPanel();
jPanel12 = new javax.swing.JPanel();
continueButton = new javax.swing.JButton();
saveButton = new javax.swing.JButton();
resetButton = new javax.swing.JButton();
setLayout(new java.awt.BorderLayout());
jPanel9.setLayout(new java.awt.BorderLayout());
table.setCellSelectionEnabled(true);
table.setDragEnabled(true);
table.setDropMode(javax.swing.DropMode.ON);
table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);
scrollPane.setViewportView(table);
jPanel9.add(scrollPane, java.awt.BorderLayout.CENTER);
jPanel13.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 0, 10));
jPanel13.setLayout(new java.awt.BorderLayout());
progressBar.setIndeterminate(true);
jPanel13.add(progressBar, java.awt.BorderLayout.CENTER);
instructionsLabel.setFont(instructionsLabel.getFont().deriveFont(instructionsLabel.getFont().getStyle() | java.awt.Font.BOLD));
jPanel13.add(instructionsLabel, java.awt.BorderLayout.SOUTH);
jPanel9.add(jPanel13, java.awt.BorderLayout.SOUTH);
add(jPanel9, java.awt.BorderLayout.CENTER);
controlsPanel.setLayout(new java.awt.BorderLayout());
jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.PAGE_AXIS));
jPanel2.add(filler1);
jPanel8.setLayout(new java.awt.GridBagLayout());
org.openide.awt.Mnemonics.setLocalizedText(moveUpButton, OStrings.getString("ALIGNER_PANEL_BUTTON_MOVEUP")); // NOI18N
moveUpButton.setEnabled(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
jPanel8.add(moveUpButton, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(moveDownButton, OStrings.getString("ALIGNER_PANEL_BUTTON_MOVEDOWN")); // NOI18N
moveDownButton.setEnabled(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
jPanel8.add(moveDownButton, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 2;
jPanel8.add(filler7, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(splitButton, OStrings.getString("ALIGNER_PANEL_BUTTON_SPLIT")); // NOI18N
splitButton.setEnabled(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
jPanel8.add(splitButton, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(mergeButton, OStrings.getString("ALIGNER_PANEL_BUTTON_MERGE")); // NOI18N
mergeButton.setEnabled(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 4;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
jPanel8.add(mergeButton, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(editButton, OStrings.getString("ALIGNER_PANEL_BUTTON_EDIT")); // NOI18N
editButton.setEnabled(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 5;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
jPanel8.add(editButton, gridBagConstraints);
jPanel2.add(jPanel8);
jPanel2.add(filler2);
controlsPanel.add(jPanel2, java.awt.BorderLayout.CENTER);
add(controlsPanel, java.awt.BorderLayout.EAST);
jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
jPanel4.setLayout(new java.awt.BorderLayout());
advancedPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 10));
advancedPanel.setLayout(new javax.swing.BoxLayout(advancedPanel, javax.swing.BoxLayout.PAGE_AXIS));
jPanel7.setLayout(new javax.swing.BoxLayout(jPanel7, javax.swing.BoxLayout.LINE_AXIS));
jLabel4.setText(OStrings.getString("ALIGNER_PANEL_LABEL_COMPARISON")); // NOI18N
jPanel7.add(jLabel4);
jPanel7.add(comparisonComboBox);
jPanel7.add(filler5);
averageDistanceLabel.setText(OStrings.getString("ALIGNER_PANEL_LABEL_AVGSCORE")); // NOI18N
jPanel7.add(averageDistanceLabel);
jPanel7.add(filler6);
advancedPanel.add(jPanel7);
jPanel6.setLayout(new javax.swing.BoxLayout(jPanel6, javax.swing.BoxLayout.LINE_AXIS));
jLabel2.setText(OStrings.getString("ALIGNER_PANEL_LABEL_ALGORITHM")); // NOI18N
jPanel6.add(jLabel2);
algorithmComboBox.setModel(new DefaultComboBoxModel<>(AlgorithmClass.values())
);
jPanel6.add(algorithmComboBox);
jPanel6.add(filler4);
jLabel3.setText(OStrings.getString("ALIGNER_PANEL_LABEL_CALCULATOR")); // NOI18N
jPanel6.add(jLabel3);
calculatorComboBox.setModel(new DefaultComboBoxModel<>(CalculatorType.values())
);
jPanel6.add(calculatorComboBox);
jPanel6.add(filler3);
jLabel5.setText(OStrings.getString("ALIGNER_PANEL_LABEL_COUNTER")); // NOI18N
jPanel6.add(jLabel5);
counterComboBox.setModel(new DefaultComboBoxModel<>(CounterType.values())
);
jPanel6.add(counterComboBox);
advancedPanel.add(jPanel6);
jPanel4.add(advancedPanel, java.awt.BorderLayout.WEST);
jPanel5.setLayout(new javax.swing.BoxLayout(jPanel5, javax.swing.BoxLayout.LINE_AXIS));
segmentationControlsPanel.setLayout(new java.awt.GridLayout(0, 1));
org.openide.awt.Mnemonics.setLocalizedText(segmentingCheckBox, OStrings.getString("ALIGNER_PANEL_BUTTON_SEGMENT")); // NOI18N
segmentationControlsPanel.add(segmentingCheckBox);
org.openide.awt.Mnemonics.setLocalizedText(segmentingRulesButton, OStrings.getString("ALIGNER_PANEL_BUTTON_SEGMENTATIONRULES")); // NOI18N
segmentingRulesButton.setEnabled(false);
segmentationControlsPanel.add(segmentingRulesButton);
jPanel5.add(segmentationControlsPanel);
filteringControlsPanel.setLayout(new java.awt.GridLayout(0, 1));
org.openide.awt.Mnemonics.setLocalizedText(removeTagsCheckBox, OStrings.getString("ALIGNER_PANEL_BUTTON_REMOVETAGS")); // NOI18N
filteringControlsPanel.add(removeTagsCheckBox);
org.openide.awt.Mnemonics.setLocalizedText(fileFilterSettingsButton, OStrings.getString("ALIGNER_PANEL_BUTTON_FILTERSETTINGS")); // NOI18N
filteringControlsPanel.add(fileFilterSettingsButton);
jPanel5.add(filteringControlsPanel);
jPanel11.setLayout(new java.awt.GridLayout(0, 1));
org.openide.awt.Mnemonics.setLocalizedText(highlightCheckBox, OStrings.getString("ALIGNER_PANEL_BUTTON_HIGHLIGHT")); // NOI18N
jPanel11.add(highlightCheckBox);
org.openide.awt.Mnemonics.setLocalizedText(highlightPatternButton, OStrings.getString("ALIGNER_PANEL_BUTTON_HIGHLIGHTPATTERN")); // NOI18N
highlightPatternButton.setEnabled(false);
jPanel11.add(highlightPatternButton);
jPanel5.add(jPanel11);
jPanel10.setLayout(new java.awt.GridLayout(0, 1));
jPanel12.setLayout(new javax.swing.BoxLayout(jPanel12, javax.swing.BoxLayout.LINE_AXIS));
continueButton.setText(OStrings.getString("ALIGNER_PANEL_BUTTON_CONTINUE")); // NOI18N
jPanel12.add(continueButton);
org.openide.awt.Mnemonics.setLocalizedText(saveButton, OStrings.getString("ALIGNER_PANEL_BUTTON_SAVE")); // NOI18N
jPanel12.add(saveButton);
jPanel10.add(jPanel12);
org.openide.awt.Mnemonics.setLocalizedText(resetButton, OStrings.getString("ALIGNER_PANEL_BUTTON_RESET")); // NOI18N
jPanel10.add(resetButton);
jPanel5.add(jPanel10);
jPanel4.add(jPanel5, java.awt.BorderLayout.EAST);
add(jPanel4, java.awt.BorderLayout.SOUTH);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
public javax.swing.JPanel advancedPanel;
public javax.swing.JComboBox<AlgorithmClass> algorithmComboBox;
public javax.swing.JLabel averageDistanceLabel;
public javax.swing.JComboBox<CalculatorType> calculatorComboBox;
public javax.swing.JComboBox<ComparisonMode> comparisonComboBox;
public javax.swing.JButton continueButton;
public javax.swing.JPanel controlsPanel;
public javax.swing.JComboBox<CounterType> counterComboBox;
public javax.swing.JButton editButton;
public javax.swing.JButton fileFilterSettingsButton;
private javax.swing.Box.Filler filler1;
private javax.swing.Box.Filler filler2;
private javax.swing.Box.Filler filler3;
private javax.swing.Box.Filler filler4;
private javax.swing.Box.Filler filler5;
private javax.swing.Box.Filler filler6;
private javax.swing.Box.Filler filler7;
public javax.swing.JPanel filteringControlsPanel;
public javax.swing.JCheckBox highlightCheckBox;
public javax.swing.JButton highlightPatternButton;
public javax.swing.JLabel instructionsLabel;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JPanel jPanel10;
private javax.swing.JPanel jPanel11;
private javax.swing.JPanel jPanel12;
private javax.swing.JPanel jPanel13;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
public javax.swing.JButton mergeButton;
public javax.swing.JButton moveDownButton;
public javax.swing.JButton moveUpButton;
public javax.swing.JProgressBar progressBar;
public javax.swing.JCheckBox removeTagsCheckBox;
public javax.swing.JButton resetButton;
public javax.swing.JButton saveButton;
public javax.swing.JScrollPane scrollPane;
public javax.swing.JPanel segmentationControlsPanel;
public javax.swing.JCheckBox segmentingCheckBox;
public javax.swing.JButton segmentingRulesButton;
public javax.swing.JButton splitButton;
public javax.swing.JTable table;
// End of variables declaration//GEN-END:variables
}