ServiceStatusFrame.java

00001 /*
00002  * ServiceStatusFrame.java
00003  *
00004  */
00005 
00006 package DisplayGUI;
00007 import GuiComponents.Panels.ServiceStatusGUI;
00008 
00013 public class ServiceStatusFrame extends javax.swing.JFrame implements displayParams {
00014 
00015     private javax.swing.JButton okButton;
00016     ServiceStatusGUI g;
00017 
00019     public ServiceStatusFrame() {
00020        initComponents();
00021 
00022     }
00023     
00024 
00025 
00026     private void initComponents() {
00027 
00028         getContentPane().setBackground(backgroundColor);
00029         g = new ServiceStatusGUI();
00030 
00031         getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.PAGE_AXIS));
00032         getContentPane().add(g);
00033         g.setAlignmentX(java.awt.Component.CENTER_ALIGNMENT);
00034         getContentPane().add(javax.swing.Box.createRigidArea(new java.awt.Dimension(0,3)));
00035 
00036         okButton = new javax.swing.JButton();
00037         okButton.setText(" Close ");
00038         okButton.setFont(displayScaleFont);
00039         okButton.addActionListener(new java.awt.event.ActionListener() {
00040             public void actionPerformed(java.awt.event.ActionEvent evt) {
00041                 okButtonActionPerformed(evt);
00042             }
00043         });
00044         getContentPane().add(okButton);
00045         okButton.setAlignmentX(java.awt.Component.CENTER_ALIGNMENT);
00046         getContentPane().add(javax.swing.Box.createRigidArea(new java.awt.Dimension(0,3)));
00047 
00048 
00049         setDefaultCloseOperation(javax.swing.JFrame.DO_NOTHING_ON_CLOSE); // must use close button
00050 
00051         pack();
00052         java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
00053         java.awt.Dimension WSize = getSize();
00054         setLocation((screenSize.width-(int)WSize.getWidth())/2,(screenSize.height-(int)WSize.getHeight())/2);
00055 
00056         show();
00057     }
00058     
00059     
00060     public void refresh() {
00061        g.fillTable();
00062        g.subscribe();
00063        show();
00064        }
00065 
00066 
00067 
00068 
00069     private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bOKActionPerformed
00070         setVisible(false);
00071         g.unsubscribe();
00072     }//GEN-LAST:event_bOKActionPerformed
00073     
00075     private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
00076         setVisible(false);
00077         g.unsubscribe();
00078     }//GEN-LAST:event_closeDialog
00079 
00080 
00081 
00082     
00083     
00084 }

Generated on Mon Feb 6 14:12:19 2006 for SCT DAQ/DCS Software - Java by  doxygen 1.4.6