|
Last
revision of this document: |
This
is document contains the code for Class JS_ErrDB_CommandCenter.
This
class contains variables and methods used for all StartFrames
(CommandCenter) of application-programs.
For easy 'cut and paste'
;-)
package
js_errdb.clientframes;
import
java.awt.*;
import
java.awt.event.*;
import
javax.swing.*;
import
js_base.connections.JSBS_DB_ConnectionManager;
import
js_base.frame.*;
import
js_base.structures.*;
import
js_base.xml.*;
/**
*
* @author kurt@javascout.biz
*
@date 2006-05-07
*
* @description
*
Command Center for the Fat-Client-Application to maintain
*
the database with the error-messages
*
* @change-log
* when who why
*
--------------------------------------------------------
*
*/
public
class JS_ErrDB_CommandCenter
extends JSBS_StartFrame
implements
JSBS_XML_Constants,
ActionListener {
private
JPanel pnl_Main=null;
private
JLabel lbl_Welcome=null;
private
JButton btn_Maintain=null;
/*
*
-------------------------------
* Constructor of the class
*/
public
JS_ErrDB_CommandCenter(String
parmstrLanguageCode){
super();
initialize_before_frame(parmstrLanguageCode);
initialize_frame();
initialize_after_frame();
}
private
JLabel get_lbl_Welcome() {
/*
The code of this method auto-creates the element if it is not already
defined */
if
(lbl_Welcome
== null) {
try
{
lbl_Welcome
= new
JLabel();
lbl_Welcome.setName("lbl_Welcome");
lbl_Welcome.setText(".....");
}
catch
(Throwable Exc) {
System.out.println("Error
while building
lbl_Welcome");
Exc.printStackTrace();
}
}
return
lbl_Welcome;
}
private
JButton get_btn_Maintain() {
/*
The code of this method auto-creates the element if it is not already
defined */
if
(btn_Maintain
== null) {
try
{
btn_Maintain
= new
JButton();
btn_Maintain.setName("btn_Maintain");
btn_Maintain.addActionListener(this);
btn_Maintain.setActionCommand("btn_Maintain");
}
catch
(Throwable Exc) {
System.out.println("Error
while building
btn_Maintain");
Exc.printStackTrace();
}
}
return
btn_Maintain;
}
public
JPanel get_pnl_Main() {
/* The code
of this method auto-creates the element if it is not already defined
*/
if
(pnl_Main
== null) {
try
{
pnl_Main
= new
JPanel();
pnl_Main.setName("pnl_Main");
pnl_Main.setLayout(new
GridBagLayout());
/*
* Define GridBagConstraints for the element to be added
*/
GridBagConstraints
gbc_lbl_Welcome = new
GridBagConstraints();
gbc_lbl_Welcome.gridx
= 0;
gbc_lbl_Welcome.gridy
= 0;
gbc_lbl_Welcome.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_Welcome.weightx
= 1;
gbc_