package cz.fidentis.analyst.registration;

import cz.fidentis.analyst.canvas.Direction;
import cz.fidentis.analyst.core.ControlPanel;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;

/**
 * Panel used to interactively visualize two face and adjust their registration.
 * 
 * @author Richard Pajersky
 * @author Radek Oslejsek
 */
public class RegistrationPanel extends ControlPanel {
    
    /*
     * Mandatory design elements
     */
    public static final String ICON = "registration28x28.png";
    public static final String NAME = "Registration";
    
    /*
     * External actions
     */
    public static final String ACTION_COMMAND_APPLY_ICP = "apply ICP";
    
    public static final String ACTION_COMMAND_SHIFT_X = "shift x";
    public static final String ACTION_COMMAND_SHIFT_Y = "shift y";
    public static final String ACTION_COMMAND_SHIFT_Z = "shift z";
    public static final String ACTION_COMMAND_ROTATE_X = "rotate x";
    public static final String ACTION_COMMAND_ROTATE_Y = "rotate y";
    public static final String ACTION_COMMAND_ROTATE_Z = "rotate z";
    public static final String ACTION_COMMAND_SCALE = "scale";
    public static final String ACTION_COMMAND_RESET_ROTATION = "reset translation";
    public static final String ACTION_COMMAND_RESET_TRANSLATION = "reset rotation";
    public static final String ACTION_COMMAND_RESET_SCALE = "reset scale";
    public static final String ACTION_COMMAND_APPLY_TRANSFORMATIONS = "apply transformations";
    
    public static final String ACTION_COMMAND_FRONT_VIEW = "front view";
    public static final String ACTION_COMMAND_SIDE_VIEW = "side view";
    public static final String ACTION_COMMAND_TRANSPARENCY = "transparency";
    
    public static final String ACTION_COMMAND_FP_CLOSENESS_THRESHOLD = "fp closeness treshold";
    
    public static final String ACTION_COMMAND_ICP_SCALE = "ICP scale";
    public static final String ACTION_COMMAND_ICP_MAX_ITERATIONS = "ICP iterations";
    public static final String ACTION_COMMAND_ICP_ERROR = "ICP error";
    public static final String ACTION_COMMAND_ICP_UNDERSAMPLING = "ICP undersampling";
    
    public static final String ACTION_COMMAND_HD_HEATMAP = "show-hide heatmap";
    public static final String ACTION_COMMAND_HD_STRATEGY = "set strategy";
    public static final String ACTION_COMMAND_HD_RELATIVE_DIST = "switch abosulte-relative distance";
    
    /*
     * Configuration of panel-specific GUI elements
     */
    public static final String  STRATEGY_POINT_TO_POINT= "Point to point";
    public static final String  STRATEGY_POINT_TO_TRIANGLE= "Point to triangle";
    
    public static final double TRANSFORMATION_FINESS = 1.0;
    
    /**
     * Range of transparency 
     */
    public static final int TRANSPARENCY_RANGE = 10;
    
    /**
     * Transformation shift is higher 
     */
    public static final double HIGH_SHIFT_QUOTIENT = 1.0;
    
    /**
     * Transformation shift is lower 
     */
    public static final double LOW_SHIFT_QUOTIENT = 0.1;
    

    /**
     * Listener which translates executed actions 
     * into {@link cz.fidentis.analyst.scene.DrawableMesh}
     */
    private final ActionListener listener;
    
    /**
     * Animator which animates transformations
     */
    private final ModelRotationAnimator animator = new ModelRotationAnimator();
    
    private double moveModifier = LOW_SHIFT_QUOTIENT;
    
    /**
     * Feature points statistics
     */
    private double fpMaxDist = Double.NEGATIVE_INFINITY;
    private double fpMinDist = Double.POSITIVE_INFINITY;
    private double fpAvgDist = 0.0;
    
    /**
     * Constructor.
     * @param action Action listener
     */
    public RegistrationPanel(ActionListener action) {
        this.setName(NAME);
        this.listener = action;
        initComponents();
        setDefaults();
        
        // connect GUI element with RegistrationAction listener:
        jButton1.addActionListener(createListener(action, ACTION_COMMAND_APPLY_ICP));
        translationXFTF.addActionListener(createListener(action, ACTION_COMMAND_SHIFT_X));
        translationYFTF.addActionListener(createListener(action, ACTION_COMMAND_SHIFT_Y));
        translationZFTF.addActionListener(createListener(action, ACTION_COMMAND_SHIFT_Z));
        rotationXFTF.addActionListener(createListener(action, ACTION_COMMAND_ROTATE_X));
        rotationYFTF.addActionListener(createListener(action, ACTION_COMMAND_ROTATE_Y));
        rotationZFTF.addActionListener(createListener(action, ACTION_COMMAND_ROTATE_Z));
        scaleFTF.addActionListener(createListener(action, ACTION_COMMAND_SCALE));
        frontButton.addActionListener(createListener(action, ACTION_COMMAND_FRONT_VIEW));
        profileButton.addActionListener(createListener(action, ACTION_COMMAND_SIDE_VIEW));
        translationButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_TRANSLATION));
        rotationButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_ROTATION));
        scaleButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_SCALE));
        
        resetAllButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_TRANSLATION));
        resetAllButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_SCALE));
        resetAllButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_ROTATION));
        
        applyButton.addActionListener(createListener(action, ACTION_COMMAND_APPLY_TRANSFORMATIONS));
        thersholdFTF.addActionListener(createListener(action, ACTION_COMMAND_FP_CLOSENESS_THRESHOLD));
        jCheckBox1.addActionListener(createListener(action, ACTION_COMMAND_ICP_SCALE));
        jFormattedTextField1.addActionListener(createListener(action, ACTION_COMMAND_ICP_ERROR));
        jFormattedTextField2.addActionListener(createListener(action, ACTION_COMMAND_ICP_MAX_ITERATIONS));
        jComboBox1.addActionListener(createListener(action, ACTION_COMMAND_ICP_UNDERSAMPLING));
        
        jCheckBox2.addActionListener(createListener(action, ACTION_COMMAND_HD_RELATIVE_DIST));
        jComboBox2.addActionListener(createListener(action, ACTION_COMMAND_HD_STRATEGY));
        jToggleButton1.addActionListener(createListener(action, ACTION_COMMAND_HD_HEATMAP));
        
        // Hide then re-compute HD when manipulating with the secondary face:
        ActionListener heatmapOff = new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (jToggleButton1.isSelected()) {
                    jToggleButton1.doClick();
                }
                initHDStats();
            }  
        };        
        translationXFTF.addActionListener(heatmapOff);
        translationYFTF.addActionListener(heatmapOff);
        translationZFTF.addActionListener(heatmapOff);
        rotationXFTF.addActionListener(heatmapOff);
        rotationYFTF.addActionListener(heatmapOff);
        rotationZFTF.addActionListener(heatmapOff);
        scaleFTF.addActionListener(heatmapOff);
    }
    
    /**
     * Sets given values as basic values that we aim to improve.
     * 
     * @param avg Average distance
     * @param max Maximal distance
     * @param min Minimal distance
     */
    public void initFPStats(double avg, double max, double min) {
        fpMaxDist = max;
        fpMinDist = min;
        fpAvgDist = avg;        
    }
    
    /**
     * Updates statistics related to the distance of feature points
     * @param avg Average distance
     * @param max Maximal distance
     * @param min Minimal distance
     */
    public void updateFPStats(double avg, double max, double min) {
        if (fpMaxDist == Double.NEGATIVE_INFINITY) { // first calculation
            initFPStats(avg, max, min);
        }
        
        setStats(min, fpMinDist, jLabel15);
        setStats(max, fpMaxDist, jLabel14);
        setStats(avg, fpAvgDist, jLabel13);
    }
    
    /**
     * Updates statistics related to the Hausdorff distance.
     * @param avg Average distance
     * @param max Maximal distance
     * @param min Minimal distance
     */
    public void updateHDStats(double avg, double max, double min) {
        NumberFormat formatter = new DecimalFormat("#0.00"); 
        jLabel19.setText(formatter.format(min));
        jLabel21.setText(formatter.format(max));
        jLabel17.setText(formatter.format(avg));
    }
    
    private void initHDStats() {
        updateHDStats(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
    }
    
    private void setStats(double newVal, double oldVal, JLabel label) {
        if (newVal < oldVal) {
            label.setForeground(Color.GREEN);
        } else if (newVal > oldVal) {
            label.setForeground(Color.RED);
        } else {
            label.setForeground(Color.BLACK);
        }
        
        NumberFormat formatter = new DecimalFormat("#0.00"); 
        label.setText(formatter.format(newVal));
    }
    
    /**
     * Alters transformation based on move amount specified in listener
     * by updating specific formatted field
     * 
     * @param dir Transformation direction
     * @throws UnsupportedOperationException if {@code dir} is invalid
     */
    public void transform(Direction dir) {
        switch (dir) {
            case TRANSLATE_LEFT:
                decreaseInputField(translationXFTF);
                break;
            case TRANSLATE_RIGHT:
                increaseInputField(translationXFTF);
                break;
            case TRANSLATE_UP:
                decreaseInputField(translationYFTF);
                break;
            case TRANSLATE_DOWN:
                increaseInputField(translationYFTF);
                break;
            case TRANSLATE_IN:
                decreaseInputField(translationZFTF);
                break;
            case TRANSLATE_OUT:
                increaseInputField(translationZFTF);
                break;
            case ROTATE_LEFT:
                decreaseInputField(rotationXFTF);
                break;
            case ROTATE_RIGHT:
                increaseInputField(rotationXFTF);
                break;
            case ROTATE_UP:
                increaseInputField(rotationYFTF);
                break;
            case ROTATE_DOWN:
                decreaseInputField(rotationYFTF);
                break;
            case ROTATE_IN:
                increaseInputField(rotationZFTF);
                break;
            case ROTATE_OUT:
                decreaseInputField(rotationZFTF);
                break;
            case ZOOM_OUT:
                decreaseInputField(scaleFTF);
                break;
            case ZOOM_IN:
                increaseInputField(scaleFTF);
                break;
            default:
                throw new UnsupportedOperationException();
        }
    }
    
    @Override
    public ImageIcon getIcon() {
        return getStaticIcon();
    }
    
    /**
     * Static implementation of the {@link #getIcon()} method.
     * 
     * @return Control panel icon
     */
    public static ImageIcon getStaticIcon() {
        return new ImageIcon(RegistrationPanel.class.getClassLoader().getResource("/" + ICON));
    }

    /**
     * Additional initialization of panel
     */
    private void setDefaults() {
        lowShiftRB.setSelected(true);
        thersholdFTF.setValue(5.0);
        //resetAllButtonActionPerformed(null);
        
        rotationXFTF.setValue(0.0);
        rotationYFTF.setValue(0.0);
        rotationZFTF.setValue(0.0);
        translationXFTF.setValue(0.0);
        translationYFTF.setValue(0.0);
        translationZFTF.setValue(0.0);
        scaleFTF.setValue(0.0);
        
        initHDStats();
    }
    
    private void increaseInputField(JFormattedTextField textField) {
        double newValue = ((Number)textField.getValue()).doubleValue() + moveModifier;
        newValue *= TRANSFORMATION_FINESS;
        textField.setValue(newValue);
        textField.postActionEvent();
    }
    
    private void decreaseInputField(JFormattedTextField textField) {
        double newValue = ((Number)textField.getValue()).doubleValue() - moveModifier;
        newValue *= TRANSFORMATION_FINESS;
        textField.setValue(newValue);
        textField.postActionEvent();
    }
    
    /**
     * 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.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        primaryRenderModeGroup = new javax.swing.ButtonGroup();
        secondaryRenerModeGroup = new javax.swing.ButtonGroup();
        precisionGroup = new javax.swing.ButtonGroup();
        jSeparator11 = new javax.swing.JSeparator();
        transformationPanel = new javax.swing.JPanel();
        translationPanel = new javax.swing.JPanel();
        translationButton = new javax.swing.JButton();
        rightTranslationXButton = new javax.swing.JButton();
        translationXFTF = new javax.swing.JFormattedTextField();
        leftTranslationYButton = new javax.swing.JButton();
        translationYFTF = new javax.swing.JFormattedTextField();
        rightTranslationYButton = new javax.swing.JButton();
        translXLabel = new javax.swing.JLabel();
        translationZFTF = new javax.swing.JFormattedTextField();
        translZLabel = new javax.swing.JLabel();
        translYLabel = new javax.swing.JLabel();
        rightTranslationZButton = new javax.swing.JButton();
        leftTranslationXButton = new javax.swing.JButton();
        leftTranslationZButton = new javax.swing.JButton();
        rotationPanel = new javax.swing.JPanel();
        leftRotationYButton = new javax.swing.JButton();
        leftRotationXButton = new javax.swing.JButton();
        rotatZLabel = new javax.swing.JLabel();
        rotatYLabel = new javax.swing.JLabel();
        rotatXLabel = new javax.swing.JLabel();
        rotationButton = new javax.swing.JButton();
        rotationZFTF = new javax.swing.JFormattedTextField();
        rotationYFTF = new javax.swing.JFormattedTextField();
        rightRotationZButton = new javax.swing.JButton();
        rightRotationYButton = new javax.swing.JButton();
        leftRotationZButton = new javax.swing.JButton();
        rightRotationXButton = new javax.swing.JButton();
        rotationXFTF = new javax.swing.JFormattedTextField();
        scalePanel = new javax.swing.JPanel();
        scalePlusButton = new javax.swing.JButton();
        scaleFTF = new javax.swing.JFormattedTextField();
        scaleButton = new javax.swing.JButton();
        scaleMinusButton = new javax.swing.JButton();
        resetAllButton = new javax.swing.JButton();
        shiftPanel = new javax.swing.JPanel();
        jSeparator10 = new javax.swing.JSeparator();
        applyButton = new javax.swing.JButton();
        jSeparator5 = new javax.swing.JSeparator();
        shiftLabel = new javax.swing.JLabel();
        lowShiftRB = new javax.swing.JRadioButton();
        highShiftRB = new javax.swing.JRadioButton();
        jLabel2 = new javax.swing.JLabel();
        jSeparator4 = new javax.swing.JSeparator();
        jSeparator2 = new javax.swing.JSeparator();
        jPanel1 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jLabel5 = new javax.swing.JLabel();
        jFormattedTextField1 = new javax.swing.JFormattedTextField();
        jLabel6 = new javax.swing.JLabel();
        jFormattedTextField2 = new javax.swing.JFormattedTextField();
        jLabel8 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox<>();
        jButton1 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel22 = new javax.swing.JLabel();
        jCheckBox2 = new javax.swing.JCheckBox();
        jLabel23 = new javax.swing.JLabel();
        jComboBox2 = new javax.swing.JComboBox<>();
        jToggleButton1 = new javax.swing.JToggleButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        visualizationLabel = new javax.swing.JLabel();
        transparencySlider = new javax.swing.JSlider();
        transparencyButton = new javax.swing.JButton();
        frontButton = new javax.swing.JButton();
        profileButton = new javax.swing.JButton();
        featurePointsLabel = new javax.swing.JLabel();
        thersholdFTF = new javax.swing.JFormattedTextField();
        thersholdUpButton = new javax.swing.JButton();
        thresholdDownButton = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JSeparator();
        jPanel6 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jSeparator6 = new javax.swing.JSeparator();

        setMinimumSize(new java.awt.Dimension(600, 600));
        setPreferredSize(new java.awt.Dimension(600, 600));

        transformationPanel.setPreferredSize(new java.awt.Dimension(400, 400));

        translationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translationPanel.border.title"))); // NOI18N

        translationButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/restart-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(translationButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translationButton.text")); // NOI18N
        translationButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translationButton.toolTipText")); // NOI18N
        translationButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        translationButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        translationButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        translationButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                translationButtonMousePressed(evt);
            }
        });

        rightTranslationXButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-right-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rightTranslationXButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rightTranslationXButton.text")); // NOI18N
        rightTranslationXButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rightTranslationXButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightTranslationXButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rightTranslationXButton.setMaximumSize(new java.awt.Dimension(24, 24));
        rightTranslationXButton.setMinimumSize(new java.awt.Dimension(24, 24));
        rightTranslationXButton.setPreferredSize(new java.awt.Dimension(24, 24));
        rightTranslationXButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rightTranslationXButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                rightTranslationXButtonMouseReleased(evt);
            }
        });

        translationXFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));
        translationXFTF.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translationXFTF.toolTipText")); // NOI18N
        translationXFTF.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));

        leftTranslationYButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-left-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(leftTranslationYButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.leftTranslationYButton.text")); // NOI18N
        leftTranslationYButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        leftTranslationYButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        leftTranslationYButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        leftTranslationYButton.setPreferredSize(new java.awt.Dimension(24, 24));
        leftTranslationYButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                leftTranslationYButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                leftTranslationYButtonMouseReleased(evt);
            }
        });

        translationYFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        rightTranslationYButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-right-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rightTranslationYButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rightTranslationYButton.text")); // NOI18N
        rightTranslationYButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rightTranslationYButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightTranslationYButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rightTranslationYButton.setPreferredSize(new java.awt.Dimension(24, 24));
        rightTranslationYButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rightTranslationYButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                rightTranslationYButtonMouseReleased(evt);
            }
        });

        translXLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(translXLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translXLabel.text")); // NOI18N

        translationZFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        translZLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(translZLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translZLabel.text")); // NOI18N

        translYLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(translYLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.translYLabel.text")); // NOI18N

        rightTranslationZButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-right-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rightTranslationZButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rightTranslationZButton.text")); // NOI18N
        rightTranslationZButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rightTranslationZButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightTranslationZButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rightTranslationZButton.setPreferredSize(new java.awt.Dimension(24, 24));
        rightTranslationZButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rightTranslationZButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                rightTranslationZButtonMouseReleased(evt);
            }
        });

        leftTranslationXButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-left-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(leftTranslationXButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.leftTranslationXButton.text")); // NOI18N
        leftTranslationXButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        leftTranslationXButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        leftTranslationXButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        leftTranslationXButton.setMaximumSize(new java.awt.Dimension(24, 24));
        leftTranslationXButton.setMinimumSize(new java.awt.Dimension(24, 24));
        leftTranslationXButton.setPreferredSize(new java.awt.Dimension(24, 24));
        leftTranslationXButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                leftTranslationXButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                leftTranslationXButtonMouseReleased(evt);
            }
        });

        leftTranslationZButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-left-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(leftTranslationZButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.leftTranslationZButton.text")); // NOI18N
        leftTranslationZButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        leftTranslationZButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        leftTranslationZButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        leftTranslationZButton.setPreferredSize(new java.awt.Dimension(24, 24));
        leftTranslationZButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                leftTranslationZButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                leftTranslationZButtonMouseReleased(evt);
            }
        });

        javax.swing.GroupLayout translationPanelLayout = new javax.swing.GroupLayout(translationPanel);
        translationPanel.setLayout(translationPanelLayout);
        translationPanelLayout.setHorizontalGroup(
            translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(translationPanelLayout.createSequentialGroup()
                .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addComponent(translXLabel))
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(translationButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(translationXFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(translationPanelLayout.createSequentialGroup()
                                .addComponent(leftTranslationXButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rightTranslationXButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(translationPanelLayout.createSequentialGroup()
                                .addComponent(leftTranslationYButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rightTranslationYButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(translationYFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addComponent(translYLabel)))
                .addGap(5, 5, 5)
                .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(translationPanelLayout.createSequentialGroup()
                                .addComponent(leftTranslationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rightTranslationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(translationZFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(2, 2, 2))
                    .addComponent(translZLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        translationPanelLayout.setVerticalGroup(
            translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(translationPanelLayout.createSequentialGroup()
                .addGap(7, 7, 7)
                .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(translXLabel)
                    .addComponent(translYLabel)
                    .addComponent(translZLabel))
                .addGap(9, 9, 9)
                .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(rightTranslationXButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(leftTranslationXButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(translationXFTF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, translationPanelLayout.createSequentialGroup()
                                .addComponent(translationButton)
                                .addGap(6, 6, 6))))
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(rightTranslationYButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(leftTranslationYButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(translationYFTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(translationPanelLayout.createSequentialGroup()
                        .addGroup(translationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(translationPanelLayout.createSequentialGroup()
                                .addComponent(rightTranslationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(6, 6, 6))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, translationPanelLayout.createSequentialGroup()
                                .addComponent(leftTranslationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addComponent(translationZFTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(10, 10, 10))
        );

        rotationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotationPanel.border.title"))); // NOI18N

        leftRotationYButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-left-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(leftRotationYButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.leftRotationYButton.text")); // NOI18N
        leftRotationYButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        leftRotationYButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        leftRotationYButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        leftRotationYButton.setMaximumSize(new java.awt.Dimension(24, 24));
        leftRotationYButton.setMinimumSize(new java.awt.Dimension(24, 24));
        leftRotationYButton.setPreferredSize(new java.awt.Dimension(24, 24));
        leftRotationYButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                leftRotationYButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                leftRotationYButtonMouseReleased(evt);
            }
        });

        leftRotationXButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-left-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(leftRotationXButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.leftRotationXButton.text")); // NOI18N
        leftRotationXButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        leftRotationXButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        leftRotationXButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        leftRotationXButton.setPreferredSize(new java.awt.Dimension(24, 24));
        leftRotationXButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                leftRotationXButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                leftRotationXButtonMouseReleased(evt);
            }
        });

        rotatZLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rotatZLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotatZLabel.text")); // NOI18N

        rotatYLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rotatYLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotatYLabel.text")); // NOI18N

        rotatXLabel.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rotatXLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotatXLabel.text")); // NOI18N

        rotationButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/restart-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rotationButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotationButton.text")); // NOI18N
        rotationButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotationButton.toolTipText")); // NOI18N
        rotationButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rotationButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rotationButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rotationButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rotationButtonMousePressed(evt);
            }
        });

        rotationZFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        rotationYFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        rightRotationZButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-right-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rightRotationZButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rightRotationZButton.text")); // NOI18N
        rightRotationZButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rightRotationZButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightRotationZButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rightRotationZButton.setMaximumSize(new java.awt.Dimension(24, 24));
        rightRotationZButton.setMinimumSize(new java.awt.Dimension(24, 24));
        rightRotationZButton.setPreferredSize(new java.awt.Dimension(24, 24));
        rightRotationZButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rightRotationZButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                rightRotationZButtonMouseReleased(evt);
            }
        });

        rightRotationYButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-right-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rightRotationYButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rightRotationYButton.text")); // NOI18N
        rightRotationYButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rightRotationYButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightRotationYButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rightRotationYButton.setMaximumSize(new java.awt.Dimension(24, 24));
        rightRotationYButton.setMinimumSize(new java.awt.Dimension(24, 24));
        rightRotationYButton.setPreferredSize(new java.awt.Dimension(24, 24));
        rightRotationYButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rightRotationYButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                rightRotationYButtonMouseReleased(evt);
            }
        });

        leftRotationZButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-left-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(leftRotationZButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.leftRotationZButton.text")); // NOI18N
        leftRotationZButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        leftRotationZButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        leftRotationZButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        leftRotationZButton.setMaximumSize(new java.awt.Dimension(24, 24));
        leftRotationZButton.setMinimumSize(new java.awt.Dimension(24, 24));
        leftRotationZButton.setPreferredSize(new java.awt.Dimension(24, 24));
        leftRotationZButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                leftRotationZButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                leftRotationZButtonMouseReleased(evt);
            }
        });

        rightRotationXButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arrow-right-s-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(rightRotationXButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rightRotationXButton.text")); // NOI18N
        rightRotationXButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        rightRotationXButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        rightRotationXButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        rightRotationXButton.setMaximumSize(new java.awt.Dimension(24, 24));
        rightRotationXButton.setMinimumSize(new java.awt.Dimension(24, 24));
        rightRotationXButton.setPreferredSize(new java.awt.Dimension(24, 24));
        rightRotationXButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                rightRotationXButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                rightRotationXButtonMouseReleased(evt);
            }
        });

        rotationXFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));
        rotationXFTF.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.rotationXFTF.toolTipText")); // NOI18N

        javax.swing.GroupLayout rotationPanelLayout = new javax.swing.GroupLayout(rotationPanel);
        rotationPanel.setLayout(rotationPanelLayout);
        rotationPanelLayout.setHorizontalGroup(
            rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rotationPanelLayout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addComponent(rotationButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rotationXFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(rotationPanelLayout.createSequentialGroup()
                                .addComponent(leftRotationXButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rightRotationXButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGap(55, 55, 55)
                        .addComponent(rotatXLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(rotationPanelLayout.createSequentialGroup()
                                .addComponent(leftRotationYButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rightRotationYButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(rotationYFTF, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGap(29, 29, 29)
                        .addComponent(rotatYLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(rotationZFTF, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, rotationPanelLayout.createSequentialGroup()
                                .addComponent(leftRotationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rightRotationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addComponent(rotatZLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        rotationPanelLayout.setVerticalGroup(
            rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rotationPanelLayout.createSequentialGroup()
                .addGap(7, 7, 7)
                .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rotatZLabel, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(rotatXLabel, javax.swing.GroupLayout.Alignment.TRAILING)))
                    .addComponent(rotatYLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(leftRotationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(rightRotationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rotationZFTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(leftRotationXButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(rightRotationXButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(rotationXFTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(rotationYFTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, rotationPanelLayout.createSequentialGroup()
                                .addComponent(rotationButton)
                                .addGap(5, 5, 5))))
                    .addGroup(rotationPanelLayout.createSequentialGroup()
                        .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rightRotationYButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(leftRotationYButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(41, 41, 41)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        scalePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.scalePanel.border.title"))); // NOI18N

        scalePlusButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(scalePlusButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.scalePlusButton.text")); // NOI18N
        scalePlusButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        scalePlusButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        scalePlusButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        scalePlusButton.setMaximumSize(new java.awt.Dimension(24, 24));
        scalePlusButton.setMinimumSize(new java.awt.Dimension(24, 24));
        scalePlusButton.setPreferredSize(new java.awt.Dimension(24, 24));
        scalePlusButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                scalePlusButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                scalePlusButtonMouseReleased(evt);
            }
        });

        scaleFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));
        scaleFTF.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.scaleFTF.toolTipText")); // NOI18N
        scaleFTF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                scaleFTFActionPerformed(evt);
            }
        });

        scaleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/restart-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(scaleButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.scaleButton.text")); // NOI18N
        scaleButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.scaleButton.toolTipText")); // NOI18N
        scaleButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        scaleButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        scaleButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        scaleButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                scaleButtonMousePressed(evt);
            }
        });

        scaleMinusButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/subtract-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(scaleMinusButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.scaleMinusButton.text")); // NOI18N
        scaleMinusButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        scaleMinusButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        scaleMinusButton.setMargin(new java.awt.Insets(2, 2, 2, 2));
        scaleMinusButton.setMaximumSize(new java.awt.Dimension(24, 24));
        scaleMinusButton.setMinimumSize(new java.awt.Dimension(24, 24));
        scaleMinusButton.setPreferredSize(new java.awt.Dimension(24, 24));
        scaleMinusButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                scaleMinusButtonMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                scaleMinusButtonMouseReleased(evt);
            }
        });

        javax.swing.GroupLayout scalePanelLayout = new javax.swing.GroupLayout(scalePanel);
        scalePanel.setLayout(scalePanelLayout);
        scalePanelLayout.setHorizontalGroup(
            scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(scalePanelLayout.createSequentialGroup()
                .addGap(32, 32, 32)
                .addComponent(scalePlusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(scaleMinusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scalePanelLayout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addComponent(scaleButton)
                .addGap(7, 7, 7)
                .addComponent(scaleFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        scalePanelLayout.setVerticalGroup(
            scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scalePanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(scalePlusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(scaleMinusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(scaleFTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scalePanelLayout.createSequentialGroup()
                        .addComponent(scaleButton)
                        .addGap(5, 5, 5)))
                .addContainerGap())
        );

        resetAllButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/refresh-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(resetAllButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.resetAllButton.text")); // NOI18N
        resetAllButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.resetAllButton.toolTipText")); // NOI18N
        resetAllButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        resetAllButton.setFocusPainted(false);
        resetAllButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                resetAllButtonMousePressed(evt);
            }
        });

        javax.swing.GroupLayout shiftPanelLayout = new javax.swing.GroupLayout(shiftPanel);
        shiftPanel.setLayout(shiftPanelLayout);
        shiftPanelLayout.setHorizontalGroup(
            shiftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 21, Short.MAX_VALUE)
        );
        shiftPanelLayout.setVerticalGroup(
            shiftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 84, Short.MAX_VALUE)
        );

        jSeparator10.setOrientation(javax.swing.SwingConstants.VERTICAL);

        org.openide.awt.Mnemonics.setLocalizedText(applyButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.applyButton.text")); // NOI18N
        applyButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.applyButton.toolTipText")); // NOI18N
        applyButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        applyButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        applyButton.setFocusPainted(false);
        applyButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                applyButtonMousePressed(evt);
            }
        });

        shiftLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(shiftLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.shiftLabel.text")); // NOI18N
        shiftLabel.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.shiftLabel.toolTipText")); // NOI18N

        precisionGroup.add(lowShiftRB);
        org.openide.awt.Mnemonics.setLocalizedText(lowShiftRB, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.lowShiftRB.text")); // NOI18N
        lowShiftRB.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.lowShiftRB.toolTipText")); // NOI18N
        lowShiftRB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lowShiftRBActionPerformed(evt);
            }
        });

        precisionGroup.add(highShiftRB);
        org.openide.awt.Mnemonics.setLocalizedText(highShiftRB, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.highShiftRB.text")); // NOI18N
        highShiftRB.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.highShiftRB.toolTipText")); // NOI18N
        highShiftRB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                highShiftRBActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel2.text")); // NOI18N

        javax.swing.GroupLayout transformationPanelLayout = new javax.swing.GroupLayout(transformationPanel);
        transformationPanel.setLayout(transformationPanelLayout);
        transformationPanelLayout.setHorizontalGroup(
            transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(transformationPanelLayout.createSequentialGroup()
                .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(transformationPanelLayout.createSequentialGroup()
                        .addComponent(jSeparator5)
                        .addGap(474, 474, 474))
                    .addGroup(transformationPanelLayout.createSequentialGroup()
                        .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 589, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(transformationPanelLayout.createSequentialGroup()
                                    .addGap(580, 580, 580)
                                    .addComponent(shiftPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(transformationPanelLayout.createSequentialGroup()
                                    .addGap(349, 349, 349)
                                    .addComponent(jSeparator10, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(transformationPanelLayout.createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(translationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(transformationPanelLayout.createSequentialGroup()
                                            .addGap(12, 12, 12)
                                            .addComponent(shiftLabel)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(lowShiftRB)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(highShiftRB)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(transformationPanelLayout.createSequentialGroup()
                                            .addComponent(resetAllButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(applyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(transformationPanelLayout.createSequentialGroup()
                                            .addComponent(rotationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(scalePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGroup(transformationPanelLayout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jLabel2))))
                        .addGap(0, 91, Short.MAX_VALUE)))
                .addContainerGap())
        );
        transformationPanelLayout.setVerticalGroup(
            transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(transformationPanelLayout.createSequentialGroup()
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(transformationPanelLayout.createSequentialGroup()
                        .addComponent(scalePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(1, 1, 1))
                    .addComponent(translationPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(rotationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(applyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(transformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(shiftLabel)
                        .addComponent(lowShiftRB)
                        .addComponent(highShiftRB)
                        .addComponent(resetAllButton)))
                .addGap(39, 39, 39)
                .addComponent(jSeparator10, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25)
                .addComponent(shiftPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel1.setMaximumSize(new java.awt.Dimension(600, 32767));

        jLabel3.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel3.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel7.text")); // NOI18N

        jCheckBox1.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jCheckBox1.text")); // NOI18N
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel5.text")); // NOI18N

        jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));
        jFormattedTextField1.setText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jFormattedTextField1.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel6.text")); // NOI18N

        jFormattedTextField2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getIntegerInstance())));
        jFormattedTextField2.setText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jFormattedTextField2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel8.text")); // NOI18N

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "None", "Random 200" }));

        jButton1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jButton1.text")); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addGap(2, 2, 2)
                                .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addGap(6, 6, 6)
                                .addComponent(jCheckBox1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel5)
                                .addGap(4, 4, 4)
                                .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(57, 57, 57)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addGap(3, 3, 3)
                                .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(54, 54, 54))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jCheckBox1)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel5)
                        .addComponent(jLabel6)
                        .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton1)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel8)
                        .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(13, Short.MAX_VALUE))
        );

        jPanel2.setPreferredSize(new java.awt.Dimension(600, 74));

        jLabel4.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel4.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel22, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel22.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jCheckBox2, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jCheckBox2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel23, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel23.text")); // NOI18N

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Point to point", "Point to triangle" }));
        jComboBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox2ActionPerformed(evt);
            }
        });

        jToggleButton1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jToggleButton1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jToggleButton1.text")); // NOI18N
        jToggleButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jCheckBox2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(40, 40, 40)
                        .addComponent(jToggleButton1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addGap(12, 12, 12)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCheckBox2)
                            .addComponent(jLabel22)))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel23)
                        .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jToggleButton1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel1.text")); // NOI18N

        visualizationLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(visualizationLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.visualizationLabel.text")); // NOI18N

        transparencySlider.setMajorTickSpacing(5);
        transparencySlider.setMaximum(20);
        transparencySlider.setMinorTickSpacing(5);
        transparencySlider.setPaintTicks(true);
        transparencySlider.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencySlider.toolTipText")); // NOI18N
        transparencySlider.setValue(10);
        transparencySlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        transparencySlider.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                transparencySliderStateChanged(evt);
            }
        });

        transparencyButton.setFont(new java.awt.Font("Ubuntu", 0, 14)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(transparencyButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencyButton.text")); // NOI18N
        transparencyButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencyButton.toolTipText")); // NOI18N
        transparencyButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder()));
        transparencyButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        transparencyButton.setPreferredSize(new java.awt.Dimension(100, 19));
        transparencyButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                transparencyButtonActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(frontButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.frontButton.text")); // NOI18N
        frontButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.frontButton.toolTipText")); // NOI18N
        frontButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder()));
        frontButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        frontButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                frontButtonActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(profileButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.profileButton.text")); // NOI18N
        profileButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.profileButton.toolTipText")); // NOI18N
        profileButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder()));
        profileButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        featurePointsLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(featurePointsLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.featurePointsLabel.text")); // NOI18N

        thersholdFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        thersholdUpButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(thersholdUpButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.thersholdUpButton.text")); // NOI18N
        thersholdUpButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        thersholdUpButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        thersholdUpButton.setMaximumSize(new java.awt.Dimension(24, 24));
        thersholdUpButton.setMinimumSize(new java.awt.Dimension(24, 24));
        thersholdUpButton.setPreferredSize(new java.awt.Dimension(24, 24));
        thersholdUpButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                thersholdUpButtonActionPerformed(evt);
            }
        });

        thresholdDownButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/subtract-line.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(thresholdDownButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.thresholdDownButton.text")); // NOI18N
        thresholdDownButton.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        thresholdDownButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        thresholdDownButton.setMaximumSize(new java.awt.Dimension(24, 24));
        thresholdDownButton.setMinimumSize(new java.awt.Dimension(24, 24));
        thresholdDownButton.setPreferredSize(new java.awt.Dimension(24, 24));
        thresholdDownButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                thresholdDownButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(featurePointsLabel)
                                .addGap(4, 4, 4)
                                .addComponent(thersholdFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(thersholdUpButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(thresholdDownButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(frontButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(profileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel1)
                                .addGroup(jPanel4Layout.createSequentialGroup()
                                    .addComponent(visualizationLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(transparencySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 344, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(transparencyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(26, 34, Short.MAX_VALUE))))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(jLabel1)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(transparencySlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(visualizationLabel))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(transparencyButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(featurePointsLabel)
                            .addComponent(thersholdFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(55, 55, 55))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(profileButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(frontButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(thersholdUpButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(thresholdDownButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 0, Short.MAX_VALUE))))
        );

        jLabel9.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel9.text")); // NOI18N

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jPanel5.border.title"))); // NOI18N

        jLabel12.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel12, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel12.text")); // NOI18N

        jLabel13.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel13, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel13.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel10, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel10.text")); // NOI18N

        jLabel15.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel15, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel15.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel11, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel11.text")); // NOI18N

        jLabel14.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel14, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel14.text")); // NOI18N

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(jLabel10)
                    .addComponent(jLabel15)
                    .addComponent(jLabel11)
                    .addComponent(jLabel14))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jPanel3.border.title"))); // NOI18N

        jLabel16.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel16, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel16.text")); // NOI18N

        jLabel17.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jLabel17, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel17.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel18, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel18.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel19, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel19.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel20, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel20.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel21, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel21.text")); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel20)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jLabel17)
                    .addComponent(jLabel18)
                    .addComponent(jLabel19)
                    .addComponent(jLabel20)
                    .addComponent(jLabel21))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(22, 22, 22))
                    .addComponent(jLabel9)
                    .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 587, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 20, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(805, 805, 805)
                .addComponent(jSeparator11))
            .addGroup(layout.createSequentialGroup()
                .addGap(791, 791, 791)
                .addComponent(jSeparator2)
                .addGap(450, 450, 450))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(transformationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 692, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 624, Short.MAX_VALUE)
                        .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(transformationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(77, 77, 77)
                .addComponent(jSeparator11, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(221, 221, 221)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

       
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        resetAllButtonMousePressed(null);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox1ActionPerformed

    /**
     * Resets transparency slider to default position
     * @param evt 
     */
    private void transparencyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_transparencyButtonActionPerformed
        transparencySlider.setValue(TRANSPARENCY_RANGE);
        transparencySlider.repaint();
        //listener.setTransparency(PostRegistrationListener.TRANSPARENCY_RANGE);
    }//GEN-LAST:event_transparencyButtonActionPerformed

    private void transparencySliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_transparencySliderStateChanged
        listener.actionPerformed(
            new ActionEvent(
                evt.getSource(),
                ActionEvent.ACTION_PERFORMED,
                ACTION_COMMAND_TRANSPARENCY)
        );
    }//GEN-LAST:event_transparencySliderStateChanged

    private void thresholdDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_thresholdDownButtonActionPerformed
        double newValue = ((Number)thersholdFTF.getValue()).doubleValue() - 0.1;
        thersholdFTF.setValue(newValue);
        thersholdFTF.postActionEvent();
    }//GEN-LAST:event_thresholdDownButtonActionPerformed

    private void thersholdUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_thersholdUpButtonActionPerformed
        double newValue = ((Number)thersholdFTF.getValue()).doubleValue() + 0.1;
        thersholdFTF.setValue(newValue);
        thersholdFTF.postActionEvent();
    }//GEN-LAST:event_thersholdUpButtonActionPerformed

    private void highShiftRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_highShiftRBActionPerformed
        this.moveModifier = HIGH_SHIFT_QUOTIENT;
    }//GEN-LAST:event_highShiftRBActionPerformed

    private void lowShiftRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lowShiftRBActionPerformed
        this.moveModifier = LOW_SHIFT_QUOTIENT;
    }//GEN-LAST:event_lowShiftRBActionPerformed

    private void applyButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_applyButtonMousePressed
        resetAllButtonMousePressed(evt);
    }//GEN-LAST:event_applyButtonMousePressed

    private void resetAllButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_resetAllButtonMousePressed
        translationButtonMousePressed(evt);
        rotationButtonMousePressed(evt);
        scaleButtonMousePressed(evt);
    }//GEN-LAST:event_resetAllButtonMousePressed

    private void scaleMinusButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_scaleMinusButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_scaleMinusButtonMouseReleased

    private void scaleMinusButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_scaleMinusButtonMousePressed
        animator.startModelAnimation(Direction.ZOOM_OUT, this);
    }//GEN-LAST:event_scaleMinusButtonMousePressed

    private void scaleButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_scaleButtonMousePressed
        scaleFTF.setValue(0.0);
    }//GEN-LAST:event_scaleButtonMousePressed

    private void scalePlusButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_scalePlusButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_scalePlusButtonMouseReleased

    private void scalePlusButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_scalePlusButtonMousePressed
        animator.startModelAnimation(Direction.ZOOM_IN, this);
    }//GEN-LAST:event_scalePlusButtonMousePressed

    private void rightRotationXButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightRotationXButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_rightRotationXButtonMouseReleased

    private void rightRotationXButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightRotationXButtonMousePressed
        animator.startModelAnimation(Direction.ROTATE_RIGHT, this);
    }//GEN-LAST:event_rightRotationXButtonMousePressed

    private void leftRotationZButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftRotationZButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_leftRotationZButtonMouseReleased

    private void leftRotationZButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftRotationZButtonMousePressed
        animator.startModelAnimation(Direction.ROTATE_IN, this);
    }//GEN-LAST:event_leftRotationZButtonMousePressed

    private void rightRotationYButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightRotationYButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_rightRotationYButtonMouseReleased

    private void rightRotationYButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightRotationYButtonMousePressed
        animator.startModelAnimation(Direction.ROTATE_DOWN, this);
    }//GEN-LAST:event_rightRotationYButtonMousePressed

    private void rightRotationZButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightRotationZButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_rightRotationZButtonMouseReleased

    private void rightRotationZButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightRotationZButtonMousePressed
        animator.startModelAnimation(Direction.ROTATE_OUT, this);
    }//GEN-LAST:event_rightRotationZButtonMousePressed

    private void rotationButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rotationButtonMousePressed
        rotationXFTF.setValue(0.0);
        rotationYFTF.setValue(0.0);
        rotationZFTF.setValue(0.0);
    }//GEN-LAST:event_rotationButtonMousePressed

    private void leftRotationXButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftRotationXButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_leftRotationXButtonMouseReleased

    private void leftRotationXButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftRotationXButtonMousePressed
        animator.startModelAnimation(Direction.ROTATE_LEFT, this);
    }//GEN-LAST:event_leftRotationXButtonMousePressed

    private void leftRotationYButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftRotationYButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_leftRotationYButtonMouseReleased

    private void leftRotationYButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftRotationYButtonMousePressed
        animator.startModelAnimation(Direction.ROTATE_UP, this);
    }//GEN-LAST:event_leftRotationYButtonMousePressed

    private void leftTranslationZButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationZButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_leftTranslationZButtonMouseReleased

    private void leftTranslationZButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationZButtonMousePressed
        animator.startModelAnimation(Direction.TRANSLATE_IN, this);
    }//GEN-LAST:event_leftTranslationZButtonMousePressed

    private void leftTranslationXButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationXButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_leftTranslationXButtonMouseReleased

    private void leftTranslationXButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationXButtonMousePressed
        animator.startModelAnimation(Direction.TRANSLATE_LEFT, this);
    }//GEN-LAST:event_leftTranslationXButtonMousePressed

    private void rightTranslationZButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightTranslationZButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_rightTranslationZButtonMouseReleased

    private void rightTranslationZButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightTranslationZButtonMousePressed
        animator.startModelAnimation(Direction.TRANSLATE_OUT, this);
    }//GEN-LAST:event_rightTranslationZButtonMousePressed

    private void rightTranslationYButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightTranslationYButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_rightTranslationYButtonMouseReleased

    private void rightTranslationYButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightTranslationYButtonMousePressed
        animator.startModelAnimation(Direction.TRANSLATE_DOWN, this);
    }//GEN-LAST:event_rightTranslationYButtonMousePressed

    private void leftTranslationYButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationYButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_leftTranslationYButtonMouseReleased

    private void leftTranslationYButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationYButtonMousePressed
        animator.startModelAnimation(Direction.TRANSLATE_UP, this);
    }//GEN-LAST:event_leftTranslationYButtonMousePressed

    private void rightTranslationXButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightTranslationXButtonMouseReleased
        animator.stopModelAnimation(this);
    }//GEN-LAST:event_rightTranslationXButtonMouseReleased

    private void rightTranslationXButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rightTranslationXButtonMousePressed
        animator.startModelAnimation(Direction.TRANSLATE_RIGHT, this);
    }//GEN-LAST:event_rightTranslationXButtonMousePressed

    private void translationButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_translationButtonMousePressed
        translationXFTF.setValue(0.0);
        translationYFTF.setValue(0.0);
        translationZFTF.setValue(0.0);
    }//GEN-LAST:event_translationButtonMousePressed

    private void scaleFTFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scaleFTFActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_scaleFTFActionPerformed

    private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBox2ActionPerformed

    private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jToggleButton1ActionPerformed

    private void frontButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_frontButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_frontButtonActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton applyButton;
    private javax.swing.JLabel featurePointsLabel;
    private javax.swing.JButton frontButton;
    private javax.swing.JRadioButton highShiftRB;
    private javax.swing.JButton jButton1;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JComboBox<String> jComboBox1;
    private javax.swing.JComboBox<String> jComboBox2;
    private javax.swing.JFormattedTextField jFormattedTextField1;
    private javax.swing.JFormattedTextField jFormattedTextField2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator10;
    private javax.swing.JSeparator jSeparator11;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JToggleButton jToggleButton1;
    private javax.swing.JButton leftRotationXButton;
    private javax.swing.JButton leftRotationYButton;
    private javax.swing.JButton leftRotationZButton;
    private javax.swing.JButton leftTranslationXButton;
    private javax.swing.JButton leftTranslationYButton;
    private javax.swing.JButton leftTranslationZButton;
    private javax.swing.JRadioButton lowShiftRB;
    private javax.swing.ButtonGroup precisionGroup;
    private javax.swing.ButtonGroup primaryRenderModeGroup;
    private javax.swing.JButton profileButton;
    private javax.swing.JButton resetAllButton;
    private javax.swing.JButton rightRotationXButton;
    private javax.swing.JButton rightRotationYButton;
    private javax.swing.JButton rightRotationZButton;
    private javax.swing.JButton rightTranslationXButton;
    private javax.swing.JButton rightTranslationYButton;
    private javax.swing.JButton rightTranslationZButton;
    private javax.swing.JLabel rotatXLabel;
    private javax.swing.JLabel rotatYLabel;
    private javax.swing.JLabel rotatZLabel;
    private javax.swing.JButton rotationButton;
    private javax.swing.JPanel rotationPanel;
    private javax.swing.JFormattedTextField rotationXFTF;
    private javax.swing.JFormattedTextField rotationYFTF;
    private javax.swing.JFormattedTextField rotationZFTF;
    private javax.swing.JButton scaleButton;
    private javax.swing.JFormattedTextField scaleFTF;
    private javax.swing.JButton scaleMinusButton;
    private javax.swing.JPanel scalePanel;
    private javax.swing.JButton scalePlusButton;
    private javax.swing.ButtonGroup secondaryRenerModeGroup;
    private javax.swing.JLabel shiftLabel;
    private javax.swing.JPanel shiftPanel;
    private javax.swing.JFormattedTextField thersholdFTF;
    private javax.swing.JButton thersholdUpButton;
    private javax.swing.JButton thresholdDownButton;
    private javax.swing.JPanel transformationPanel;
    private javax.swing.JLabel translXLabel;
    private javax.swing.JLabel translYLabel;
    private javax.swing.JLabel translZLabel;
    private javax.swing.JButton translationButton;
    private javax.swing.JPanel translationPanel;
    private javax.swing.JFormattedTextField translationXFTF;
    private javax.swing.JFormattedTextField translationYFTF;
    private javax.swing.JFormattedTextField translationZFTF;
    private javax.swing.JButton transparencyButton;
    private javax.swing.JSlider transparencySlider;
    private javax.swing.JLabel visualizationLabel;
    // End of variables declaration//GEN-END:variables
}
