[Bojangles-cvs] cvs: bojangles / testAppPrefsDlg.java
Status: Alpha
Brought to you by:
nehresma
|
From: kai5263499 <boj...@li...> - 2002-08-22 13:44:22
|
kai5263499 Thu Aug 22 06:44:22 2002 EDT
Added files:
/bojangles testAppPrefsDlg.java
Log:
I dont know if i added this already... Its a prefs GUI
Index: bojangles/testAppPrefsDlg.java
+++ bojangles/testAppPrefsDlg.java
package bojangles;
import javax.swing.*;
/**
* <p>Title: testAppPrefsDlg</p>
* <p>Description: Dialog box to provide a GUI interface to change testing options</p>
* <p>Copyright: Copyright (c) 2002 under the GPL</p>
* @author Wes
*/
public class testAppPrefsDlg extends javax.swing.JDialog {
public String hostStr;
public String portStr;
public String pathStr;
public String browserStr;
/** Creates new form testAppPrefsDlg */
public testAppPrefsDlg(java.awt.Frame parent, boolean modal) {
super(parent, modal);
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.
*/
private void initComponents() {//GEN-BEGIN:initComponents
jLabel1 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jLabel2 = new javax.swing.JLabel();
jLabel21 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
browser = new javax.swing.JTextField();
host = new javax.swing.JTextField();
port = new javax.swing.JTextField();
path = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
statusBar = new javax.swing.JLabel();
getContentPane().setLayout(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
closeDialog(evt);
}
});
jLabel1.setFont(new java.awt.Font("Dialog", 1, 18));
jLabel1.setText("App Testing Prefrences");
getContentPane().add(jLabel1);
jLabel1.setBounds(0, 0, 400, 30);
getContentPane().add(jSeparator1);
jSeparator1.setBounds(0, 40, 390, 2);
jLabel2.setText("<html>What port does Centrallix use?</html>");
getContentPane().add(jLabel2);
jLabel2.setBounds(20, 130, 150, 30);
jLabel21.setText("<html>Where is your browser's binary file located?");
getContentPane().add(jLabel21);
jLabel21.setBounds(20, 70, 150, 30);
jLabel3.setText("<html>What host is Centrallix running on?</html>");
getContentPane().add(jLabel3);
jLabel3.setBounds(20, 100, 150, 30);
jLabel4.setText("<html>What path are the bojangle apps held in?</html");
getContentPane().add(jLabel4);
jLabel4.setBounds(20, 160, 150, 30);
jButton1.setText("Allrightythen");
getContentPane().add(jButton1);
jButton1.setBounds(30, 200, 150, 26);
jButton2.setText("Nah, needs garlic");
getContentPane().add(jButton2);
jButton2.setBounds(210, 200, 160, 26);
browser.setText("/usr/bin/mozilla");
browser.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
browserActionPerformed(evt);
}
});
getContentPane().add(browser);
browser.setBounds(180, 70, 200, 20);
host.setText("localhost");
getContentPane().add(host);
host.setBounds(180, 100, 200, 20);
port.setText("8800");
getContentPane().add(port);
port.setBounds(180, 130, 200, 20);
path.setText("/kardia");
getContentPane().add(path);
path.setBounds(180, 160, 200, 20);
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel5.setText("<html>http://localhost:8800/kardia</html>");
getContentPane().add(jLabel5);
jLabel5.setBounds(50, 50, 280, 16);
getContentPane().add(statusBar);
statusBar.setBounds(0, 230, 400, 20);
pack();
}//GEN-END:initComponents
private void browserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browserActionPerformed
// Add your handling code here:
}//GEN-LAST:event_browserActionPerformed
/** Closes the dialog */
private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
setVisible(false);
// Set class variables
this.portStr = port.getText();
this.hostStr = host.getText();
this.pathStr = path.getText();
this.browserStr = browser.getText();
// Commit suicide
dispose();
}//GEN-LAST:event_closeDialog
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton2;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel21;
private javax.swing.JTextField host;
private javax.swing.JTextField browser;
private javax.swing.JTextField path;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel statusBar;
private javax.swing.JTextField port;
// End of variables declaration//GEN-END:variables
public static void main(String args[]) {
new testAppPrefsDlg(new javax.swing.JFrame(), true).show();
}
}
|