game-ai/src/main/java/com/jzy/game/ai/nav/triangle/ui/TriangleNavStart.java
/**
     * 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.
     */
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.
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")
    private void initComponents() {
        position = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        randomPointButton = new javax.swing.JButton();
        showRandomPointButton = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        triangleIndexButton = new javax.swing.JButton();
        vectorIndexButton = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        scaleComboBox = new javax.swing.JComboBox<>();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jLabel1.setText("当前坐标：");
        randomPointButton.setText("随机坐标");
        randomPointButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                randomPointButtonActionPerformed(evt);
            }
        });
        showRandomPointButton.setText("显示随机点");
        showRandomPointButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                showRandomPointButtonActionPerformed(evt);
            }
        });
        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jTextArea1.setText("R键：重置坐标\nP键：暂停\n\n");
        jScrollPane1.setViewportView(jTextArea1);
        triangleIndexButton.setText("三角形序号");
        triangleIndexButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                triangleIndexButtonActionPerformed(evt);
            }
        });
        vectorIndexButton.setText("坐标序号");
        vectorIndexButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                vectorIndexButtonActionPerformed(evt);
            }
        });
        jLabel2.setText("缩放倍数：");
        scaleComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "15", "20", "25", "30" }));
        scaleComboBox.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                scaleComboBoxItemStateChanged(evt);
            }
        });
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jScrollPane1)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(randomPointButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(showRandomPointButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(triangleIndexButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(vectorIndexButton)
                            .addGap(19, 19, 19))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(position, javax.swing.GroupLayout.PREFERRED_SIZE, 315, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(10, 10, 10)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(scaleComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(randomPointButton)
                    .addComponent(showRandomPointButton)
                    .addComponent(triangleIndexButton)
                    .addComponent(vectorIndexButton))
                .addGap(21, 21, 21)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(scaleComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(position, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)
                .addContainerGap())
        );
        pack();
    }
@ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { position = new javax . swing . JTextField ( ) ; jLabel1 = new javax . swing . JLabel ( ) ; randomPointButton = new javax . swing . JButton ( ) ; showRandomPointButton = new javax . swing . JButton ( ) ; jScrollPane1 = new javax . swing . JScrollPane ( ) ; jTextArea1 = new javax . swing . JTextArea ( ) ; triangleIndexButton = new javax . swing . JButton ( ) ; vectorIndexButton = new javax . swing . JButton ( ) ; jLabel2 = new javax . swing . JLabel ( ) ; scaleComboBox = new javax . swing . JComboBox < > ( ) ; setDefaultCloseOperation ( javax . swing . WindowConstants . EXIT_ON_CLOSE ) ; jLabel1 . setText ( "当前坐标："); randomPointButton . setText ( "随机坐标"); randomPointButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { randomPointButtonActionPerformed ( evt ) ; } } ) ; showRandomPointButton . setText ( "显示随机点"); showRandomPointButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { showRandomPointButtonActionPerformed ( evt ) ; } } ) ; jTextArea1 . setColumns ( 20 ) ; jTextArea1 . setRows ( 5 ) ; jTextArea1 . setText ( "R键：重置坐标\nP键：暂停\n\n"); jScrollPane1 . setViewportView ( jTextArea1 ) ; triangleIndexButton . setText ( "三角形序号"); triangleIndexButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { triangleIndexButtonActionPerformed ( evt ) ; } } ) ; vectorIndexButton . setText ( "坐标序号"); vectorIndexButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { vectorIndexButtonActionPerformed ( evt ) ; } } ) ; jLabel2 . setText ( "缩放倍数："); scaleComboBox . setModel ( new javax . swing . DefaultComboBoxModel < > ( new String [ ] { "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "10" , "15" , "20" , "25" , "30" } ) ) ; scaleComboBox . addItemListener ( new java . awt . event . ItemListener ( ) { public void itemStateChanged ( java . awt . event . ItemEvent evt ) { scaleComboBoxItemStateChanged ( evt ) ; } } ) ; javax . swing . GroupLayout layout = new javax . swing . GroupLayout ( getContentPane ( ) ) ; getContentPane ( ) . setLayout ( layout ) ; layout . setHorizontalGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addGroup ( layout . createSequentialGroup ( ) . addContainerGap ( ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING , false ) . addComponent ( jScrollPane1 ) . addGroup ( layout . createSequentialGroup ( ) . addComponent ( randomPointButton ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED ) . addComponent ( showRandomPointButton ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addComponent ( triangleIndexButton ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addComponent ( vectorIndexButton ) . addGap ( 19 , 19 , 19 ) ) . addGroup ( javax . swing . GroupLayout . Alignment . LEADING , layout . createSequentialGroup ( ) . addComponent ( jLabel1 ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addComponent ( position , javax . swing . GroupLayout . PREFERRED_SIZE , 315 , javax . swing . GroupLayout . PREFERRED_SIZE ) . addGap ( 10 , 10 , 10 ) ) ) . addGroup ( layout . createSequentialGroup ( ) . addComponent ( jLabel2 ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addComponent ( scaleComboBox , javax . swing . GroupLayout . PREFERRED_SIZE , 87 , javax . swing . GroupLayout . PREFERRED_SIZE ) ) ) . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE , Short . MAX_VALUE ) ) ) ; layout . setVerticalGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addGroup ( layout . createSequentialGroup ( ) . addContainerGap ( ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE ) . addComponent ( randomPointButton ) . addComponent ( showRandomPointButton ) . addComponent ( triangleIndexButton ) . addComponent ( vectorIndexButton ) ) . addGap ( 21 , 21 , 21 ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE ) . addComponent ( jLabel2 ) . addComponent ( scaleComboBox , javax . swing . GroupLayout . PREFERRED_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . PREFERRED_SIZE ) ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE ) . addComponent ( jLabel1 ) . addComponent ( position , javax . swing . GroupLayout . PREFERRED_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . PREFERRED_SIZE ) ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED ) . addComponent ( jScrollPane1 , javax . swing . GroupLayout . DEFAULT_SIZE , 127 , Short . MAX_VALUE ) . addContainerGap ( ) ) ) ; pack ( ) ; }
This method is called from within the constructor to initialize the form.
This method is called from within the constructor to initialize the form .
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents