rendered paste bodyimport java.awt.event.ActionEvent;
/*
* BaseJPanel.java
*
* Created on November 5, 2006, 11:29 PM
*/
/**
*
* @author Ofir
*/
public class BaseJPanel extends javax.swing.JPanel {
/** Creates new form BaseJPanel */
public BaseJPanel() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jFrame1 = new javax.swing.JFrame();
jPanel2 = new javax.swing.JPanel();
CloseApp1 = new javax.swing.JButton();
updateStatus1 = new javax.swing.JButton();
externalize1 = new javax.swing.JButton();
internalize1 = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
currentStatusPrefix1 = new javax.swing.JLabel();
currentStatusVar1 = new javax.swing.JLabel();
CloseApp = new javax.swing.JButton();
updateStatus = new javax.swing.JButton();
externalize = new javax.swing.JButton();
internalize = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
currentStatusPrefix = new javax.swing.JLabel();
currentStatusVar = new javax.swing.JLabel();
jFrame1.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosed(java.awt.event.WindowEvent evt) {
jFrame1WindowClosed(evt);
}
});
jPanel2.setMaximumSize(new java.awt.Dimension(306, 138));
jPanel2.setMinimumSize(new java.awt.Dimension(306, 138));
CloseApp1.setText("\u05e1\u05d2\u05d5\u05e8");
CloseApp1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CloseApp1ActionPerformed(evt);
}
});
updateStatus1.setText("\u05e2\u05d3\u05db\u05df \u05de\u05e6\u05d1");
updateStatus1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updateStatus1ActionPerformed(evt);
}
});
externalize1.setText("\u05d4\u05d7\u05e6\u05df");
externalize1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
externalize1ActionPerformed(evt);
}
});
internalize1.setText("\u05d4\u05e4\u05e0\u05dd");
internalize1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
internalize1ActionPerformed(evt);
}
});
currentStatusPrefix1.setFont(new java.awt.Font("Tahoma", 0, 18));
currentStatusPrefix1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
currentStatusPrefix1.setText("\u05de\u05e6\u05d1 \u05e0\u05d5\u05db\u05d7\u05d9:");
currentStatusVar1.setFont(new java.awt.Font("Tahoma", 0, 18));
currentStatusVar1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
currentStatusVar1.setText("\u05dc\u05d0 \u05de\u05d5\u05d2\u05d3\u05e8");
currentStatusVar1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
currentStatusVar1PropertyChange(evt);
}
});
org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.add(currentStatusVar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 129, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(17, 17, 17)
.add(currentStatusPrefix1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createSequentialGroup()
.add(20, 20, 20)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(currentStatusPrefix1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(currentStatusVar1))
.addContainerGap(19, Short.MAX_VALUE))
);
org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.add(CloseApp1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(updateStatus1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(externalize1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(internalize1))
.add(jPanel2Layout.createSequentialGroup()
.add(26, 26, 26)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
.add(19, 19, 19)
.add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(CloseApp1)
.add(updateStatus1)
.add(externalize1)
.add(internalize1))
.addContainerGap())
);
org.jdesktop.layout.GroupLayout jFrame1Layout = new org.jdesktop.layout.GroupLayout(jFrame1.getContentPane());
jFrame1.getContentPane().setLayout(jFrame1Layout);
jFrame1Layout.setHorizontalGroup(
jFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jFrame1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(18, Short.MAX_VALUE))
);
jFrame1Layout.setVerticalGroup(
jFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jFrame1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(21, Short.MAX_VALUE))
);
setMaximumSize(new java.awt.Dimension(306, 138));
setMinimumSize(new java.awt.Dimension(306, 138));
CloseApp.setText("\u05e1\u05d2\u05d5\u05e8");
CloseApp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CloseAppActionPerformed(evt);
}
});
updateStatus.setText("\u05e2\u05d3\u05db\u05df \u05de\u05e6\u05d1");
updateStatus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
updateStatusActionPerformed(evt);
}
});
externalize.setText("\u05d4\u05d7\u05e6\u05df");
externalize.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
externalizeActionPerformed(evt);
}
});
internalize.setText("\u05d4\u05e4\u05e0\u05dd");
internalize.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
internalizeActionPerformed(evt);
}
});
currentStatusPrefix.setFont(new java.awt.Font("Tahoma", 0, 18));
currentStatusPrefix.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
currentStatusPrefix.setText("\u05de\u05e6\u05d1 \u05e0\u05d5\u05db\u05d7\u05d9:");
currentStatusVar.setFont(new java.awt.Font("Tahoma", 0, 18));
currentStatusVar.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
currentStatusVar.setText("\u05dc\u05d0 \u05de\u05d5\u05d2\u05d3\u05e8");
currentStatusVar.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
currentStatusVarPropertyChange(evt);
}
});
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(currentStatusVar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 129, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(17, 17, 17)
.add(currentStatusPrefix, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(20, 20, 20)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(currentStatusPrefix, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(currentStatusVar))
.addContainerGap(19, Short.MAX_VALUE))
);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(CloseApp)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(updateStatus)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(externalize)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(internalize))
.add(layout.createSequentialGroup()
.add(26, 26, 26)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(19, 19, 19)
.add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(CloseApp)
.add(updateStatus)
.add(externalize)
.add(internalize))
.addContainerGap())
);
}// </editor-fold>
private void jFrame1WindowClosed(java.awt.event.WindowEvent evt) {
// TODO add your handling code here:
CloseAppActionPerformed(new ActionEvent(this,0,""));
}
private void currentStatusVar1PropertyChange(java.beans.PropertyChangeEvent evt) {
// TODO add your handling code here:
}
private void internalize1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void externalize1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void updateStatus1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void CloseApp1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void currentStatusVarPropertyChange(java.beans.PropertyChangeEvent evt) {
// TODO add your handling code here:
}
private void internalizeActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String status= TempHoleClient.internalize();
currentStatusVar.setText(status);
}
private void updateStatusActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String status= TempHoleClient.getStatus();
currentStatusVar.setText(status);
}
private void externalizeActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String status= TempHoleClient.externalize();
currentStatusVar.setText(status);
}
private void CloseAppActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String status= TempHoleClient.internalize();
currentStatusVar.setText(status);
try{
synchronized(this){
Thread.sleep(3000);
}}catch(Exception e){}
System.exit(0);
}
// Variables declaration - do not modify
private javax.swing.JButton CloseApp;
private javax.swing.JButton CloseApp1;
private javax.swing.JLabel currentStatusPrefix;
private javax.swing.JLabel currentStatusPrefix1;
private javax.swing.JLabel currentStatusVar;
private javax.swing.JLabel currentStatusVar1;
private javax.swing.JButton externalize;
private javax.swing.JButton externalize1;
private javax.swing.JButton internalize;
private javax.swing.JButton internalize1;
private javax.swing.JFrame jFrame1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JButton updateStatus;
private javax.swing.JButton updateStatus1;
// End of variables declaration
}