/*
* Copyright (c) 2010-2016, Sikuli.org, sikulix.com
* Released under the MIT License.
*
*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.sikuli.setup;
import java.awt.Color;
/**
*
* @author rhocke
*/
public class SetUpSelect extends javax.swing.JPanel {
/**
* Creates new form SetUpSelect
*/
public SetUpSelect() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT
* modify this code. The content of this method is always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
textField1 = new java.awt.TextField();
jLabel1 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jLabel2 = new javax.swing.JLabel();
suSystem = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
suJava = new javax.swing.JLabel();
jSeparator2 = new javax.swing.JSeparator();
jLabel4 = new javax.swing.JLabel();
suFolder = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jSeparator5 = new javax.swing.JSeparator();
option1 = new javax.swing.JCheckBox();
option4 = new javax.swing.JCheckBox();
jSeparator6 = new javax.swing.JSeparator();
ask1 = new javax.swing.JButton();
ask4 = new javax.swing.JButton();
setupNow = new javax.swing.JButton();
option5 = new javax.swing.JCheckBox();
ask5 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
suVersion = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
pName = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
pPort = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
option2 = new javax.swing.JCheckBox();
option3 = new javax.swing.JCheckBox();
textField1.setText("textField1");
jLabel1.setText("SikuliX SetUp ");
jLabel1.setAlignmentX(0.5F);
jLabel2.setText("We are running on: ");
suSystem.setText("...");
jLabel3.setText("... using this Java: ");
suJava.setText("...");
jLabel4.setText("... in this folder");
suFolder.setText("...");
jLabel5.setText("Please check the appropriate options below: (click the [ H ] buttons to get more specific information about the option)");
option1.setText("1 - Pack1: I want SikuliX, containing the Sikuli IDE and allowing to run Sikuli scripts from commandline ");
option1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
option1ActionPerformed(evt);
}
});
option4.setText("2 - Pack2: I want to develop in Java, Jython or other Java aware scripting language using NetBeans, Eclipse or other IDE's ");
option4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
option4ActionPerformed(evt);
}
});
ask1.setText("H");
ask1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ask1ActionPerformed(evt);
}
});
ask4.setText("H");
ask4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ask4ActionPerformed(evt);
}
});
setupNow.setText("Setup Now");
setupNow.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
setupNowActionPerformed(evt);
}
});
option5.setText("3 - I want to use the Tesseract based OCR features (You should know what you are doing!)");
option5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
option5ActionPerformed(evt);
}
});
ask5.setText("H");
ask5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ask5ActionPerformed(evt);
}
});
jButton1.setText("Cancel");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
suVersion.setText("...");
jLabel6.setText("My system uses a proxy to access the internet:");
jLabel7.setText("Hostname or IP-Address:");
jLabel8.setText("Portnumber:");
jLabel9.setText("I want to use as scripting language: ");
option2.setText("1. Python (Jython) (default)");
option2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
option2ActionPerformed(evt);
}
});
option3.setText("2. Ruby (JRuby) ");
option3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
option3ActionPerformed(evt);
}
});
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jButton1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(setupNow)
.add(20, 20, 20))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jSeparator1)
.add(jSeparator2)
.add(jSeparator5)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator6)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(option1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(ask1))
.add(layout.createSequentialGroup()
.add(option4)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 92, Short.MAX_VALUE)
.add(ask5))
.add(layout.createSequentialGroup()
.add(option5)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(ask4))
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabel1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(suVersion))
.add(layout.createSequentialGroup()
.add(6, 6, 6)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabel2)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(suSystem))
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel3)
.add(jLabel4))
.add(18, 18, 18)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(suFolder)
.add(suJava)))))
.add(jLabel5))
.add(0, 0, Short.MAX_VALUE))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(29, 29, 29)
.add(jLabel6)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jLabel7)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(pName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 193, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(18, 18, 18)
.add(jLabel8)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(pPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
.add(layout.createSequentialGroup()
.add(29, 29, 29)
.add(jLabel9)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(option2)
.add(10, 10, 10)
.add(option3)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(14, 14, 14)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel1)
.add(suVersion))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel2)
.add(suSystem))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel4)
.add(suFolder))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(suJava)
.add(jLabel3))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(18, 18, 18)
.add(jLabel5)
.add(18, 18, 18)
.add(jSeparator5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(option1)
.add(ask1))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel9)
.add(option2)
.add(option3))
.add(18, 18, 18)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(option4)
.add(ask5))
.add(18, 18, 18)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(option5)
.add(ask4))
.add(20, 20, 20)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel6)
.add(jLabel7)
.add(pName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel8)
.add(pPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(jSeparator6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton1)
.add(setupNow))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
private void option4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_option4ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_option4ActionPerformed
private void ask1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ask1ActionPerformed
RunSetup.helpOption(1);
}//GEN-LAST:event_ask1ActionPerformed
private void ask4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ask4ActionPerformed
RunSetup.helpOption(3);
}//GEN-LAST:event_ask4ActionPerformed
private void setupNowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setupNowActionPerformed
setBackground(Color.YELLOW);
}//GEN-LAST:event_setupNowActionPerformed
private void option5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_option5ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_option5ActionPerformed
private void ask5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ask5ActionPerformed
RunSetup.helpOption(2);
}//GEN-LAST:event_ask5ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
System.exit(0);
}//GEN-LAST:event_jButton1ActionPerformed
private void option1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_option1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_option1ActionPerformed
private void option2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_option2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_option2ActionPerformed
private void option3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_option3ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_option3ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
public javax.swing.JButton ask1;
public javax.swing.JButton ask4;
public javax.swing.JButton ask5;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
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.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JSeparator jSeparator5;
private javax.swing.JSeparator jSeparator6;
protected javax.swing.JCheckBox option1;
protected javax.swing.JCheckBox option2;
protected javax.swing.JCheckBox option3;
protected javax.swing.JCheckBox option4;
protected javax.swing.JCheckBox option5;
public javax.swing.JTextField pName;
public javax.swing.JTextField pPort;
private javax.swing.JButton setupNow;
public javax.swing.JLabel suFolder;
protected javax.swing.JLabel suJava;
protected javax.swing.JLabel suSystem;
public javax.swing.JLabel suVersion;
private java.awt.TextField textField1;
// End of variables declaration//GEN-END:variables
}