|
Letzte
Bearbeitung dieses Dokuments: |
Code
Erklärungen
und Anwendungsbeispiele
Verwandte
Dokumentation
package
js_base.frame;
import java.awt.*;
import java.awt.event.*;
import
java.net.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.text.*;
import
js_base.bo.*;import
js_base.boc.JSBS_FramePosition_BOC;import
js_base.structures.*;import
js_base.utilities.JSBS_Formatter;
/**
*
* @author kurt(at)javascout(dot)biz
*
@date 2010-01-06
*
* @description
* de:
* Frame das von 'Task-Frame's geerbt werden kann.
* Ein 'Task-Frame' ist ein Frame mit Code zur Verarbeitung von Geschäftsdaten.
*
* Diese Klasse enthält Variablen für:
* * Die Verbindung zum 'Start-Frame' um Zugriff auf dort enthaltenen Variablen
* (z.B. Datenbank-Zugriff oder Verbindung zu einem Java-Application-Server) zu haben.
* * Eine Struktur mit Datum und Information zum Anwender.
* Diese Struktur ist von JSBS_UniversalParameters, die im StartFrame enthalten ist,
* abgeleitet.
* Weil einige Variablen aus dieser Struktur oft verwendet werden, werden die Variablen
* bei der 'Konstruktion' dieser Klasse kopiert.
* * Elemente zum Aufbau der Benutzeroberfläche (GUI / Graphic User Interface).
* Diese Elemente können auch beliebig neu platziert und durch GUI-Elemente, die in einer
* erbenden Klasse definiert werden, ergänzt werden.
*
* en: * Frame
to be inherited by 'Task-Frame's.
* A 'Task-Frame' is a
frame with code to handle the processing of business-data.
*
* This class contains variables for
* * Connection
to the 'Start-Frame' to have access to variables kept there,
*
e.g. database-access or access to a
Java-Application-Server.
* * A structure containing
date and user-information.
* This structure is
derived from the JSBS_UniversalParameters held in the
*
StartFrame.
* As some variables
from there are addressed pretty often, the variables are
copied
* at the construction time of this
class.
* * Elements to build the GUI. These elements
can be joined together and complemented
* with
GUI-elements defined in the derived class.
*
*
@change-log
* when who why
*
--------------------------------------------------------
*
*/public
class JSBS_TaskFrame
extends JFrame
implements
ActionListener, KeyListener,
FocusListener,
MouseListener,
WindowListener, ItemListener,
TableColumnModelListener {/*
*
de:
*
Referenz auf das Objekt 'Start-Frame', auch als 'Command-Center' oder 'CC' bezeichnet.
*
Das 'CC' hält Variablen die generell von allen Klassen der Anwendung verwendet werden.
*
en: *
Reference to the 'Start-Frame' object, also referred as 'Command-Center' or
'CC'.
* The 'CC' helds variables which are generally used all classes of the application. */
public
JSBS_StartFrame frmCC
= null;
/*
*
de:
*
Identifikation unter der dieser 'Task' (Geschäftsanwendung) in der Task-Liste des
*
CommandCenter registriert ist.
*
en:
*
Identifier under which this task is registered in the task-list of
the CommandCenter. */
public
double
dblCC_TaskID
= 0;/*
*
de:
* Parameter-Werte die eventuell im 'CommandCenter' vom Anwender erfaßt werden.
* Die Verwendung der Werte bestimmt die Klasse, die diese Klasse erbt.
* Üblicherweise werden vom CommandCenter Werte übergeben, die den Anwender-bekannten
* Schlüssel bilden (oder Teile davon) und damit kann ein Auswahlkriterium gebildet
* werden, die die in der Auswahl-Liste angezeigten Datensätze einschränkt.
*
en: *
Parameter-values which might have been entered by the user at the 'Command-Center'.
* The usage of these values is determined by the class inheriting this class.
* Usually, the values that are passed by the Command-Center are making up the
* user-known-key or (parts of it) and so it is possible to make a filter-criteria
* that restricts the datasets that are displayed in the selection-list. */
public String strCCParameter1
= "";
public String strCCParameter2
= "";
public String strCCParameter3
= "";
/*
*
de:
* Struktur mit den notwendigen Werten für Datenbank-Operationen auf der
*
Server-Seite.
*
Das sind die minimal notwendigen Parameter die zum Server übertragen werden müssen. *
en:
*
Structure with neccessary values for database-operations on the
Server-Side.
* These are the minimum of needed
parameters to be transferred over to the server. */
public
JSBS_MinimalParameters
structMinParm;
/*
*
de:
*
Array mit JPanels deren Umrandungen mit der Methode JSBS_GUIServices.setPanelBorders()
*
eingefärbt werden sollen.
*
Die Größe dieses Arrasy muss durch jenes Anwendungsprogramm, dass diese Basisklasse
*
erbt, durchgeführt werden.
*
en: *
Array of JPanels their borders should be colored using the method
*
JSBS_GUIServices.setPanelBorders().
* The size and the
content of this array has to be defined by the application
*
that inherits this base-class. */ public
JPanel[]
arrayJPanelBordersToBeColored
= null;
/*
*
de:
*
Struktur mit den Regeln zum Prüfen der Anwender-Eingaben in der GUI-Feldern;
*
bitte informieren Sie sich bei den Beschreibungen für jede Variable in der
*
Klasse für die Struktur.
*
en: *
Structure with Rules to check the User-Entry in GUI-fields;
*
please see description for each variable at the class of the
structure. */ public
JSBS_EntryRules
structJSBS_EntryRules
= new
JSBS_EntryRules(this);
/*
*
de:
* Vector mit Informationen zu GUI-Elementen, deren Status auf 'Disabled'
* gesetzt wurde. Diese Informationen sind notwendig um das Aussehen des
* GUI-Elements beim Status 'Enabled' wieder herstellen zu können.
*
Welche Informationen dieser Vector enthält ist in der Klasse JSBS_GUIServices
*
in der Methode processDisableGUIElement (und den folgenden Methoden) beschrieben.
*
en: * Vector with informations about GUI-Elements which status was set to 'Disabled'.
* This informations are neccessary to restore the appearance of the GUI-Element
*
when ist status is set to 'Enabled' again.
*
Detailed descriptions about the informations hold by this vector you will find
*
in class JSBS_GUIServices in the method processDisableGUIElement (and following
*
methods). */ public Vector vecDisabledGUIElements
= new Vector();
/*
*
de:
*
Schaltfläche die 'angeklickt' wird wenn die Eingabe-Taste auf der Tastatur
*
betätigt wird.
*
Diese Variable kann dynamisch durch das Anwendungsprogramm mit einem Wert versorgt
*
werden und damit kann dem Anwender signalisiert werden welche Schaltfläche als
*
nächstes empfohlen wird.
*
en:
*
Button that is 'clicked' when the Enter-Key on the keyboard is
pressed.
* This variable can be dynamically filled by the
application to guide the user
* what button is recommended
to be used next. */ private
JButton
btnEnterTriggeredButton
= null;
/*
*
de:
* Marker, ob die Schaltfläche zum Deaktivieren von Datensätzen aktiv sein darf
* wenn das Anwendungsprogramm in der Version 'MobileClient' ausgeführt wird
* und die Verbindung zum Java Application Server (JAS) unterbrochen ist.
* Mit dieser Variable kann gesteuert werden, ob Datensätze asynchron zum
* Eintrag auf der Datenbank des JAS deactiviert (logisch gelöscht) werden dürfen.
*
en:
* Flag if the button to deactivate datasets is allowed to get activ if the
* application-program is running in the 'MobileClient' version and the connection
* to the JAS (Java Application Server) is disrupted.
* This variable allows to control if datasets can be 'deactivated' (logically deleted)
* asynchronous to the database-entry on the JAS. */ public boolean
bolAllowDeleteWithMobileClientOffline
= true;
/*
*
de:
* Marker, ob neue Datensätze erstellt werden dürfen wenn das Anwendungsprogramm in der Version
* 'MobileClient' ausgeführt wird und die Verbindung zum Java Application Server (JAS)
* unterbrochen ist.
* Mit dieser Variable kann gesteuert werden, ob Datensätze asynchron zum
* Eintrag auf der Datenbank des JAS erstellt werden dürfen.
*
Innerhalb des Anwendungsprogramms (das diese Klasse erbt) muss diese Variable mit einem
*
Wert versorgt werden und das Aktivieren bzw. Deaktivieren der Schaltfläche 'copy'
*
gesteuert werden.
*
en:
* Flag if new datasets are allowed to be inserted if the application-program is running in the
* 'MobileClient' version and the connection to the JAS (Java Application Server) is disrupted.
* This variable allows to control if datasets can be created asynchronous to the
* database-entry on the JAS.
*
Within the application (that inherits this class) this variable has to be supplied with a
*
value and the activating or deactivating of the button 'copy' has to be controlled. */ public boolean
bolAllowInsertWithMobileClientOffline
= true;
/*
*
de:
*
Flags (Merker) zum merken ob 'Modifier'-Tasten (Alt, Steuerung, Umschalten)
* betätigt wurden,
*
Diese Merker werden gebraucht weil Tasten-Kombinationen 'hintereinander' von der
*
Tastatur an das Anwendungsprogramm 'geliefert' werden
*
en:
*
Flags to keep if 'modifier'-keys were typed.
* Those flags are
necessary as key-combinations are delivered from the keyboard * to the application as sequential key-strokes. */
protected
boolean
bolAltKeyModifier
= false;
protected
boolean
bolCtrlKeyModifier
= false;
protected
boolean
bolShiftKeyModifier
= false;/*
*
de:
* Business-Object, dass die Information über Größe (Breite, Höhe) und Position
* (Abstand zwischen linker oberer Ecke des Monitors und linker oberer Ecke des Frames)
* in Bildpunkten speichert.
* Weiters enthält dieses BO 10 Arrays für die Aufnahme von Spaltenbreiten von JTables.
* Diese Struktur kann von Task-Frames, die von dieser Basisklasse erben, verwendet werden.
*
en: *
Business-Object that stores the information about the Frame-Size
(width, height)
* and Position (distance between
the upper-left corner of the frame from the
* upper-left
corner of the display-screen) in pixels.
* Further, this BO holds 10
arrays to describe the column-widths of JTables.
* Those structure can be utilized by Task-Frames inheriting this base-class.
*/ public
JSBS_FramePosition_BOC
structJSBS_FramePosition_BOC;
/*
*
de:
* Flag zur Steuerung der Methoden die innerhalb von 'columnMarginChanged' aufgerufen werden.
* Damit wird verhindert, dass beim erneuten Aufbau des Inhalts von JTables durch ein
* zeitversetztes Auslösen des 'TableColumnModelListener' falsche Spaltenbreiten aus der
* JTable ausgelesen werden und in weiterer Folge auf der Datenbank gespeichert werden.
* Der Wert muss auf 'true' gesetzt werden bevor eine JTable neu 'befüllt' wird und danach
* muss der Wert wieder auf 'false' gesetzt werden.
*
en:
* Flag to control the methods called within 'columnMarginChanged'.
* This inhibits that wrong column-widths are read from the JTables and stored on the database
* thereafter. This may be caused when the 'TableColumnModelListener' is triggered with a delay.
* The value has to be set to 'true' before a JTable is 'refilled' and set to 'false' again
* after the filling of the JTable has ended. */
public boolean bolInhibitColumnMarginChangeStore
= false;/* de: GUI-Elemente für das Standard-Layout.
*
en: GUI-elements for the standard layout. */ protected
JPanel
pnl_Main; protected
JPanel
pnl_Main_With_Currency_Selection; protected
JPanel
pnl_Head; protected
JPanel
pnl_Head_With_Currency_Selection; protected
JPanel
pnl_Data; protected
JPanel
pnl_Maintain; protected
JPanel
pnl_Detail; protected
JPanel
pnl_DetailFields; protected
JPanel
pnl_DetailButtons; protected
JSBS_Dividerline dl_Detail_List; protected
JPanel
pnl_List; protected
JPanel
pnl_ListFields; protected
JPanel
pnl_ListButtons; protected
JPanel
pnl_Info;/* de: GUI-Elemente für das pnl_Head (ganz oberer Bereich).
*
en: GUI-elements for the pnl_Head (at the top). */ protected
JButton
btn_Help; protected
JButton
btn_CC;
protected
JButton
btn_Print; protected
JLabel
lbl_ApplicationTitle1; protected
JLabel
lbl_ApplicationTitle2;
protected
JLabel
lbl_CurrencySelection; protected
JComboBox
combo_CurrencySelection; protected
JLabel
lbl_HeadDate; protected
JLabel
lbl_HeadUser;/* de: GUI-Elemente für das pnl_Data_Buttons (rechts neben den Feldern mit Detail-Daten.)
*
en: GUI-elements for the pnl_DataButtons (at right side of the
Data-Fields). */ protected
JButton
btn_Store; protected
JButton
btn_Copy; protected
JButton
btn_Previous; protected
JButton
btn_Next;/* de: GUI-Elemente für das pnl_ListFields (Liste im unteren Bereich)
*
en: GUI-elements for the pnl_ListFields (list in the lower area).
*/ protected
JLabel
lbl_SelectionListHeader; protected
JScrollPane
pnl_SelectionList; protected
JTable
pnl_SelectionListTable; protected
JLabel
lbl_Selection; protected
JTextField
txt_Selection;/* de: GUI-Elemente für das pnl_ListButtons (rechts neben der Liste).
*
en: GUI-elements for the pnl_ListButtons (at right side of the List).
*/ protected
JButton
btn_Get; protected
JButton
btn_Delete;/* de: GUI-Elemente für das pnl_Info (ganz unterer Bereich).
*
en: GUI-elements for the pnl_Info (at the bottom). */ protected
JLabel
lbl_InfoMessage;/*
*
-------------------------------
* CONSTRUCTOR
* de:
* Übernehmen des Start-Frames; dort sind die Variablen für die wesentlichen
* Parameter der Anwendung definiert.
* en:
* Take over the Start-Frame; there are defined the variables for the
* siginificant parameters of the application.
*/ public
JSBS_TaskFrame(JSBS_StartFrame
parmCC) { super();/*
* de:
* Referenz auf das Start-Frame (CommandCenter) in der Variablen der Klasse
* speichern und notwendige Werte aus den UniversalParameters in die
* Struktur der MinimalParameters übernehmen.
* en: *
Keep the reference to the StartFrame (CommandCenter) and
* transfer
the values from the UniversalParameters to the MinimalParameters.
*/ frmCC
= parmCC;
structMinParm
= new
JSBS_MinimalParameters(parmCC.structJSBS_UniversalParameters);/*
* de:
* WindowListener zu diesem Task-Frame hinzufügen.
* Dieser Listener reagiert auf Änderungen des Fensters dieses Task-Frames
* (Öffnen, Schließen, Änderung der Größe, usw.).
* Der Listener wird gebraucht, weil beim Schließen des Fensters die Position
* (am Schirm) und die Größe des Fensters auf der Datenbank gespeichert werden.
* Außerdem wird nach dem Schließen des Fensters das Objekt (dieser Klasse)
* 'vernichtet'.
* en:
* Add the WindowsListener to the frame.
* This listener reacts
to changes concerning the frame
* (open, close, change size, etc.).
*
A usage of this listener is the saving of the frame-position and
-size and
* the disposal of the object (of this class) when the frame is
closed. */
addWindowListener(this);/*
* de:
* 'Konstruieren' des BOC mit den Positions-Informationen des Fensters
* und bestimmter GUI-Elemente (z.B. die Breite der Spalten in einer JTable).
* en:
* 'Construct' the BOC containing Position-informations of the frame
* and certain GUI-Elements (e.g. column-size within a JTable). */ structJSBS_FramePosition_BOC
= new
JSBS_FramePosition_BOC(this);
}/*
*
* de:
* Abwandlung des CONSTRUCTOR
* mit Übernahme der im CommandCenter erfaßten Parameter-Werte.
* en:
* Derivation of the CONSTRUCTOR
* with a take-over of the parameter-values entered within the CommandCenter.
*/ public
JSBS_TaskFrame(JSBS_StartFrame
parmCC, String parmCCParameter1, String parmCCParameter2, String parmCCParameter3) { super();/*
* de:
* Referenz auf das Start-Frame (CommandCenter) in der Variablen der Klasse
* speichern und notwendige Werte aus den UniversalParameters in die
* Struktur der MinimalParameters übernehmen.
* en: *
Keep the reference to the StartFrame (CommandCenter) and
* transfer
the values from the UniversalParameters to the MinimalParameters.
*/ frmCC
= parmCC;
structMinParm
= new
JSBS_MinimalParameters(parmCC.structJSBS_UniversalParameters);/*
* de:
* WindowListener zu diesem Task-Frame hinzufügen.
* Dieser Listener reagiert auf Änderungen des Fensters dieses Task-Frames
* (Öffnen, Schließen, Änderung der Größe, usw.).
* Der Listener wird gebraucht, weil beim Schließen des Fensters die Position
* (am Schirm) und die Größe des Fensters auf der Datenbank gespeichert werden.
* Außerdem wird nach dem Schließen des Fensters das Objekt (dieser Klasse)
* 'vernichtet'.
* en:
* Add the WindowsListener to the frame.
* This listener reacts
to changes concerning the frame
* (open, close, change size, etc.).
*
A usage of this listener is the saving of the frame-position and
-size and
* the disposal of the object (of this class) when the frame is
closed. */
addWindowListener(this);/*
* de:
* 'Konstruieren' des BOC mit den Positions-Informationen des Fensters
* und bestimmter GUI-Elemente (z.B. die Breite der Spalten in einer JTable).
* en:
* 'Construct' the BOC containing Position-informations of the frame
* and certain GUI-Elements (e.g. column-size within a JTable). */ structJSBS_FramePosition_BOC
= new
JSBS_FramePosition_BOC(this);
/*
* de:
* Übertragen der als Parameter übergebenen Werte auf die Variablen dieser
* Klasse.
* en:
* Transfer the values passed as parameters to the variables of this class. */ strCCParameter1
= parmCCParameter1;
strCCParameter2
= parmCCParameter2;
strCCParameter3
= parmCCParameter3;
}/*
* ********************
*
de: Erstellen der GUI-Elemente *
en: Create the GUI-elements. */ protected
JPanel
get_pnl_Main() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Main
==
null)
{ try
{
pnl_Main
= new
JPanel();
pnl_Main.setName("pnl_Main");
pnl_Main.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_Head = new
GridBagConstraints();
gbc_pnl_Head.gridx
= 0;
gbc_pnl_Head.gridy
= 0;
gbc_pnl_Head.fill
= GridBagConstraints.HORIZONTAL;
gbc_pnl_Head.weightx
= 1;
gbc_pnl_Head.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Main().add(get_pnl_Head(),
gbc_pnl_Head);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_Maintain = new
GridBagConstraints();
gbc_pnl_Maintain.gridx
= 0;
gbc_pnl_Maintain.gridy
= 1;
gbc_pnl_Maintain.fill
= GridBagConstraints.BOTH;
gbc_pnl_Maintain.weightx
= 1;
gbc_pnl_Maintain.weighty
= 1;
gbc_pnl_Maintain.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Main().add(get_pnl_Maintain(),
gbc_pnl_Maintain);/*
*
Define GridBagConstraints for the element to be added.
*/ GridBagConstraints
gbc_pnl_Info = new
GridBagConstraints();
gbc_pnl_Info.gridx
= 0;
gbc_pnl_Info.gridy
= 2;
gbc_pnl_Info.fill
= GridBagConstraints.HORIZONTAL;
gbc_pnl_Info.weightx
= 1;
gbc_pnl_Info.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Main().add(get_pnl_Info(),
gbc_pnl_Info);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Main in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Main; }
/*
* ********************
*/ protected
JPanel
get_pnl_Main_With_Currency_Selection() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Main_With_Currency_Selection
==
null)
{ try
{
pnl_Main_With_Currency_Selection
= new
JPanel();
pnl_Main_With_Currency_Selection.setName("pnl_Main_With_Currency_Selectio");
pnl_Main_With_Currency_Selection.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_Head_With_Currency_Selection = new
GridBagConstraints();
gbc_pnl_Head_With_Currency_Selection.gridx
= 0;
gbc_pnl_Head_With_Currency_Selection.gridy
= 0;
gbc_pnl_Head_With_Currency_Selection.fill
=
GridBagConstraints.HORIZONTAL;
gbc_pnl_Head_With_Currency_Selection.weightx
= 1;
gbc_pnl_Head_With_Currency_Selection.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Main_With_Currency_Selection().add(get_pnl_Head_With_Currency_Selection(),
gbc_pnl_Head_With_Currency_Selection);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_Maintain = new
GridBagConstraints();
gbc_pnl_Maintain.gridx
= 0;
gbc_pnl_Maintain.gridy
= 1;
gbc_pnl_Maintain.fill
= GridBagConstraints.BOTH;
gbc_pnl_Maintain.weightx
= 1;
gbc_pnl_Maintain.weighty
= 1;
gbc_pnl_Maintain.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Main_With_Currency_Selection().add(get_pnl_Maintain(),
gbc_pnl_Maintain);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_Info = new
GridBagConstraints();
gbc_pnl_Info.gridx
= 0;
gbc_pnl_Info.gridy
= 2;
gbc_pnl_Info.fill
= GridBagConstraints.HORIZONTAL;
gbc_pnl_Info.weightx
= 1;
gbc_pnl_Info.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Main_With_Currency_Selection().add(get_pnl_Info(),
gbc_pnl_Info);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Main_With_Currency_Selection in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Main_With_Currency_Selection; }
/*
* ********************
*/ protected
JPanel
get_pnl_Head_With_Currency_Selection() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Head_With_Currency_Selection
==
null)
{ try
{
pnl_Head_With_Currency_Selection
= new
JPanel();
pnl_Head_With_Currency_Selection.setName("pnl_Head_With_Currency_Selection");
pnl_Head_With_Currency_Selection.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Help = new
GridBagConstraints();
gbc_btn_Help.gridx
= 0;
gbc_btn_Help.gridy
= 0;
gbc_btn_Help.fill
= GridBagConstraints.BOTH;
gbc_btn_Help.weightx
= 1;
gbc_btn_Help.weighty
= 1;
gbc_btn_Help.gridheight
= 2;
gbc_btn_Help.anchor
= GridBagConstraints.CENTER;
gbc_btn_Help.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_btn_Help(),
gbc_btn_Help);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_CC = new
GridBagConstraints();
gbc_btn_CC.gridx
= 1;
gbc_btn_CC.gridy
= 0;
gbc_btn_CC.fill
= GridBagConstraints.BOTH;
gbc_btn_CC.weightx
= 1;
gbc_btn_CC.weighty
= 1;
gbc_btn_CC.gridheight
= 2;
gbc_btn_CC.anchor
= GridBagConstraints.CENTER;
gbc_btn_CC.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_btn_CC(),
gbc_btn_CC);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Print = new
GridBagConstraints();
gbc_btn_Print.gridx
= 2;
gbc_btn_Print.gridy
= 0;
gbc_btn_Print.fill
= GridBagConstraints.BOTH;
gbc_btn_Print.weightx
= 1;
gbc_btn_Print.weighty
= 1;
gbc_btn_Print.gridheight
= 2;
gbc_btn_Print.anchor
= GridBagConstraints.CENTER;
gbc_btn_Print.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_btn_Print(),
gbc_btn_Print);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_ApplicationTitle1 = new
GridBagConstraints();
gbc_lbl_ApplicationTitle1.gridx
= 3;
gbc_lbl_ApplicationTitle1.gridy
= 0;
gbc_lbl_ApplicationTitle1.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_ApplicationTitle1.weightx
= 1;
gbc_lbl_ApplicationTitle1.anchor
=
GridBagConstraints.LINE_START;
gbc_lbl_ApplicationTitle1.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_lbl_ApplicationTitle1(),
gbc_lbl_ApplicationTitle1);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_ApplicationTitle2 = new
GridBagConstraints();
gbc_lbl_ApplicationTitle2.gridx
= 3;
gbc_lbl_ApplicationTitle2.gridy
= 1;
gbc_lbl_ApplicationTitle2.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_ApplicationTitle2.weightx
= 1;
gbc_lbl_ApplicationTitle2.anchor
=
GridBagConstraints.LINE_START;
gbc_lbl_ApplicationTitle2.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_lbl_ApplicationTitle2(),
gbc_lbl_ApplicationTitle2);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_CurrencySelection = new
GridBagConstraints();
gbc_lbl_CurrencySelection.gridx
= 4;
gbc_lbl_CurrencySelection.gridy
= 0;
gbc_lbl_CurrencySelection.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_CurrencySelection.weightx
= 1;
gbc_lbl_CurrencySelection.anchor
=
GridBagConstraints.LINE_START;
gbc_lbl_CurrencySelection.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_lbl_CurrencySelection(),
gbc_lbl_CurrencySelection);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_combo_CurrencySelection = new
GridBagConstraints();
gbc_combo_CurrencySelection.gridx
= 4;
gbc_combo_CurrencySelection.gridy
= 1;
gbc_combo_CurrencySelection.fill
=
GridBagConstraints.HORIZONTAL;
gbc_combo_CurrencySelection.weightx
= 1;
gbc_combo_CurrencySelection.anchor
=
GridBagConstraints.LINE_START;
gbc_combo_CurrencySelection.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_combo_CurrencySelection(),
gbc_combo_CurrencySelection);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_HeadDate = new
GridBagConstraints();
gbc_lbl_HeadDate.gridx
= 5;
gbc_lbl_HeadDate.gridy
= 0;
gbc_lbl_HeadDate.fill
= GridBagConstraints.HORIZONTAL;
gbc_lbl_HeadDate.weightx
= 1;
gbc_lbl_HeadDate.anchor
= GridBagConstraints.LINE_END;
gbc_lbl_HeadDate.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_lbl_HeadDate(),
gbc_lbl_HeadDate);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_HeadUser = new
GridBagConstraints();
gbc_lbl_HeadUser.gridx
= 5;
gbc_lbl_HeadUser.gridy
= 1;
gbc_lbl_HeadUser.fill
= GridBagConstraints.HORIZONTAL;
gbc_lbl_HeadUser.weightx
= 1;
gbc_lbl_HeadUser.anchor
= GridBagConstraints.LINE_END;
gbc_lbl_HeadUser.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head_With_Currency_Selection().add(get_lbl_HeadUser(),
gbc_lbl_HeadUser);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Head_With_Currency_Selection in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Head_With_Currency_Selection; }
/*
* ********************
*/ protected
JPanel
get_pnl_Head() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Head
==
null)
{ try
{
pnl_Head
= new
JPanel();
pnl_Head.setName("pnl_Head");
pnl_Head.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Help = new
GridBagConstraints();
gbc_btn_Help.gridx
= 0;
gbc_btn_Help.gridy
= 0;
gbc_btn_Help.fill
= GridBagConstraints.BOTH;
gbc_btn_Help.weightx
= 1;
gbc_btn_Help.weighty
= 1;
gbc_btn_Help.gridheight
= 2;
gbc_btn_Help.anchor
= GridBagConstraints.CENTER;
gbc_btn_Help.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_btn_Help(),
gbc_btn_Help);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_CC = new
GridBagConstraints(); gbc_btn_CC.gridx
= 1;
gbc_btn_CC.gridy
= 0;
gbc_btn_CC.fill
= GridBagConstraints.BOTH;
gbc_btn_CC.weightx
= 1;
gbc_btn_CC.weighty
= 1;
gbc_btn_CC.gridheight
= 2; gbc_btn_CC.anchor
= GridBagConstraints.CENTER;
gbc_btn_CC.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_btn_CC(),
gbc_btn_CC);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Print = new
GridBagConstraints();
gbc_btn_Print.gridx
= 2;
gbc_btn_Print.gridy
= 0;
gbc_btn_Print.fill
= GridBagConstraints.BOTH;
gbc_btn_Print.weightx
= 1;
gbc_btn_Print.weighty
= 1;
gbc_btn_Print.gridheight
= 2;
gbc_btn_Print.anchor
= GridBagConstraints.CENTER;
gbc_btn_Print.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_btn_Print(),
gbc_btn_Print);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_ApplicationTitle1 = new
GridBagConstraints(); gbc_lbl_ApplicationTitle1.gridx
= 3;
gbc_lbl_ApplicationTitle1.gridy
= 0;
gbc_lbl_ApplicationTitle1.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_ApplicationTitle1.weightx
= 1;
gbc_lbl_ApplicationTitle1.anchor
=
GridBagConstraints.LINE_START;
gbc_lbl_ApplicationTitle1.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_lbl_ApplicationTitle1(),
gbc_lbl_ApplicationTitle1);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_ApplicationTitle2 = new
GridBagConstraints();
gbc_lbl_ApplicationTitle2.gridx
= 3;
gbc_lbl_ApplicationTitle2.gridy
= 1;
gbc_lbl_ApplicationTitle2.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_ApplicationTitle2.weightx
= 1;
gbc_lbl_ApplicationTitle2.anchor
=
GridBagConstraints.LINE_START;
gbc_lbl_ApplicationTitle2.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_lbl_ApplicationTitle2(),
gbc_lbl_ApplicationTitle2);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_HeadDate = new
GridBagConstraints();
gbc_lbl_HeadDate.gridx
= 4;
gbc_lbl_HeadDate.gridy
= 0;
gbc_lbl_HeadDate.fill
= GridBagConstraints.HORIZONTAL;
gbc_lbl_HeadDate.weightx
= 1;
gbc_lbl_HeadDate.anchor
= GridBagConstraints.LINE_END;
gbc_lbl_HeadDate.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_lbl_HeadDate(),
gbc_lbl_HeadDate);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_HeadUser = new
GridBagConstraints();
gbc_lbl_HeadUser.gridx
= 4;
gbc_lbl_HeadUser.gridy
= 1;
gbc_lbl_HeadUser.fill
= GridBagConstraints.HORIZONTAL;
gbc_lbl_HeadUser.weightx
= 1;
gbc_lbl_HeadUser.anchor
= GridBagConstraints.LINE_END;
gbc_lbl_HeadUser.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Head().add(get_lbl_HeadUser(),
gbc_lbl_HeadUser);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Head in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Head; }/*
* ********************
*/ protected
JPanel
get_pnl_Maintain() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Maintain
==
null)
{ try
{
pnl_Maintain
= new
JPanel();
pnl_Maintain.setName("pnl_Maintain");
pnl_Maintain.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_Detail = new
GridBagConstraints();
gbc_pnl_Detail.gridx
= 0;
gbc_pnl_Detail.gridy
= 0;
gbc_pnl_Detail.fill
= GridBagConstraints.HORIZONTAL;
gbc_pnl_Detail.weightx
= 1;
gbc_pnl_Detail.weighty
= 1; gbc_pnl_Detail.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Maintain().add(get_pnl_Detail(),
gbc_pnl_Detail);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_dl_Detail_List = new
GridBagConstraints();
gbc_dl_Detail_List.gridx
= 0;
gbc_dl_Detail_List.gridy
= 1;
gbc_dl_Detail_List.fill
= GridBagConstraints.HORIZONTAL;
gbc_dl_Detail_List.weightx
= 1; gbc_dl_Detail_List.anchor
= GridBagConstraints.CENTER; gbc_dl_Detail_List.insets
= new
Insets(3, 3, 3, 3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Maintain().add(get_dl_Detail_List(), gbc_dl_Detail_List);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_List = new
GridBagConstraints();
gbc_pnl_List.gridx
= 0;
gbc_pnl_List.gridy
= 2;
gbc_pnl_List.fill
= GridBagConstraints.BOTH;
gbc_pnl_List.weightx
= 1;
gbc_pnl_List.weighty
= 10; gbc_pnl_List.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Maintain().add(get_pnl_List(),
gbc_pnl_List);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Maintain in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Maintain; }
/*
* ********************
*/ protected
JPanel
get_pnl_Detail() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Detail
==
null)
{ try
{
pnl_Detail
= new
JPanel();
pnl_Detail.setName("pnl_Detail");
pnl_Detail.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_DetailFields = new
GridBagConstraints();
gbc_pnl_DetailFields.gridx
= 0;
gbc_pnl_DetailFields.gridy
= 0;
gbc_pnl_DetailFields.fill
= GridBagConstraints.BOTH;
gbc_pnl_DetailFields.weightx
= 1;
gbc_pnl_DetailFields.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Detail().add(get_pnl_DetailFields(),
gbc_pnl_DetailFields);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_DetailButtons = new
GridBagConstraints();
gbc_pnl_DetailButtons.gridx
= 1;
gbc_pnl_DetailButtons.gridy
= 0;
gbc_pnl_DetailButtons.fill
= GridBagConstraints.BOTH;
gbc_pnl_DetailButtons.weightx
= 0;
gbc_pnl_DetailButtons.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Detail().add(get_pnl_DetailButtons(),
gbc_pnl_DetailButtons);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Detail in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Detail; }
/*
* ********************
*/ protected
JPanel
get_pnl_DetailFields() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_DetailFields
==
null)
{ try
{
pnl_DetailFields
= new
JPanel();
pnl_DetailFields.setName("pnl_DetailFields");
pnl_DetailFields.setLayout(new
GridBagLayout()); }
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_DetailFields in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_DetailFields; }
/*
* ********************
*/ protected
JPanel
get_pnl_DetailButtons() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_DetailButtons
==
null)
{ try
{
pnl_DetailButtons
= new
JPanel();
pnl_DetailButtons.setName("pnl_DetailButtons");
pnl_DetailButtons.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Store = new
GridBagConstraints();
gbc_btn_Store.gridx
= 0;
gbc_btn_Store.gridy
= 0;
gbc_btn_Store.fill
= GridBagConstraints.BOTH;
gbc_btn_Store.weightx
= 1;
gbc_btn_Store.weighty
= 1;
gbc_btn_Store.gridheight
= 1;
gbc_btn_Store.anchor
= GridBagConstraints.CENTER;
gbc_btn_Store.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_DetailButtons().add(get_btn_Store(),
gbc_btn_Store);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Copy = new
GridBagConstraints();
gbc_btn_Copy.gridx
= 0;
gbc_btn_Copy.gridy
= 1;
gbc_btn_Copy.fill
= GridBagConstraints.BOTH;
gbc_btn_Copy.weightx
= 1;
gbc_btn_Copy.weighty
= 1;
gbc_btn_Copy.gridheight
= 1;
gbc_btn_Copy.anchor
= GridBagConstraints.CENTER;
gbc_btn_Copy.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_DetailButtons().add(get_btn_Copy(),
gbc_btn_Copy);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Previous = new
GridBagConstraints();
gbc_btn_Previous.gridx
= 0;
gbc_btn_Previous.gridy
= 2;
gbc_btn_Previous.fill
= GridBagConstraints.BOTH;
gbc_btn_Previous.weightx
= 1;
gbc_btn_Previous.weighty
= 1;
gbc_btn_Previous.gridheight
= 1;
gbc_btn_Previous.anchor
= GridBagConstraints.CENTER;
gbc_btn_Previous.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_DetailButtons().add(get_btn_Previous(),
gbc_btn_Previous);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Next = new
GridBagConstraints();
gbc_btn_Next.gridx
= 0;
gbc_btn_Next.gridy
= 3;
gbc_btn_Next.fill
= GridBagConstraints.BOTH;
gbc_btn_Next.weightx
= 1;
gbc_btn_Next.weighty
= 1;
gbc_btn_Next.gridheight
= 1;
gbc_btn_Next.anchor
= GridBagConstraints.CENTER;
gbc_btn_Next.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_DetailButtons().add(get_btn_Next(),
gbc_btn_Next);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_DetailButtons in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_DetailButtons; }
/*
* ********************
*/ protected
JPanel
get_pnl_List() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_List
==
null)
{ try
{
pnl_List
= new
JPanel();
pnl_List.setName("pnl_List");
pnl_List.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_ListFields = new
GridBagConstraints();
gbc_pnl_ListFields.gridx
= 0;
gbc_pnl_ListFields.gridy
= 0;
gbc_pnl_ListFields.fill
= GridBagConstraints.BOTH;
gbc_pnl_ListFields.weightx
= 1;
gbc_pnl_ListFields.weighty
= 50; gbc_pnl_ListFields.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_List().add(get_pnl_ListFields(),
gbc_pnl_ListFields);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_ListButtons = new
GridBagConstraints();
gbc_pnl_ListButtons.gridx
= 1;
gbc_pnl_ListButtons.gridy
= 0;
gbc_pnl_ListButtons.fill
= GridBagConstraints.BOTH;
gbc_pnl_ListButtons.weightx
= 0;
gbc_pnl_ListButtons.anchor
= GridBagConstraints.CENTER;/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_List().add(get_pnl_ListButtons(),
gbc_pnl_ListButtons);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_List in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_List; }
/*
* ********************
*/ protected
JPanel
get_pnl_ListFields() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_ListFields
==
null)
{ try
{
pnl_ListFields
= new
JPanel();
pnl_ListFields.setName("pnl_ListFields");
pnl_ListFields.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_SelectionListHeader = new
GridBagConstraints();
gbc_lbl_SelectionListHeader.gridx
= 0;
gbc_lbl_SelectionListHeader.gridy
= 97;
gbc_lbl_SelectionListHeader.fill
= GridBagConstraints.NONE
;
gbc_lbl_SelectionListHeader.weightx
= 1;
gbc_lbl_SelectionListHeader.anchor
=
GridBagConstraints.LINE_START;
gbc_lbl_SelectionListHeader.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_ListFields().add(get_lbl_SelectionListHeader(),
gbc_lbl_SelectionListHeader);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_pnl_SelectionList = new
GridBagConstraints();
gbc_pnl_SelectionList.gridx
= 0;
gbc_pnl_SelectionList.gridy
= 98;
gbc_pnl_SelectionList.fill
= GridBagConstraints.BOTH
;
gbc_pnl_SelectionList.gridwidth
= 99;
gbc_pnl_SelectionList.weightx
= 1;
gbc_pnl_SelectionList.weighty
= 100;
gbc_pnl_SelectionList.anchor
= GridBagConstraints.CENTER;
gbc_pnl_SelectionList.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_ListFields().add(get_pnl_SelectionList(),
gbc_pnl_SelectionList);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_Selection = new
GridBagConstraints();
gbc_lbl_Selection.gridx
= 0;
gbc_lbl_Selection.gridy
= 99;
gbc_lbl_Selection.fill
= GridBagConstraints.NONE
;
gbc_lbl_Selection.gridwidth
= 99;
gbc_lbl_Selection.weightx
= 1;
gbc_lbl_Selection.anchor
= GridBagConstraints.LINE_END;
gbc_lbl_Selection.insets
= new
Insets(3,3,3,35);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_ListFields().add(get_lbl_Selection(),
gbc_lbl_Selection);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_txt_Selection = new
GridBagConstraints();
gbc_txt_Selection.gridx
= 98;
gbc_txt_Selection.gridy
= 99;
gbc_txt_Selection.fill
= GridBagConstraints.HORIZONTAL;
gbc_txt_Selection.anchor
= GridBagConstraints.LINE_END;
gbc_txt_Selection.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_ListFields().add(get_txt_Selection(),
gbc_txt_Selection);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_ListFields in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_ListFields; }
/*
* ********************
*/ protected
JPanel
get_pnl_ListButtons() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_ListButtons
==
null)
{ try
{
pnl_ListButtons
= new
JPanel();
pnl_ListButtons.setName("pnl_ListButtons");
pnl_ListButtons.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Get = new
GridBagConstraints();
gbc_btn_Get.gridx
= 0;
gbc_btn_Get.gridy
= 0;
gbc_btn_Get.fill
= GridBagConstraints.HORIZONTAL;
gbc_btn_Get.weightx
= 1;
gbc_btn_Get.weighty
= 1;
gbc_btn_Get.gridheight
= 1;
gbc_btn_Get.anchor
= GridBagConstraints.CENTER;
gbc_btn_Get.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_ListButtons().add(get_btn_Get(),
gbc_btn_Get);/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_btn_Delete = new
GridBagConstraints();
gbc_btn_Delete.gridx
= 0;
gbc_btn_Delete.gridy
= 1;
gbc_btn_Delete.fill
= GridBagConstraints.HORIZONTAL;
gbc_btn_Delete.weightx
= 1;
gbc_btn_Delete.weighty
= 1;
gbc_btn_Delete.gridheight
= 1;
gbc_btn_Delete.anchor
= GridBagConstraints.CENTER;
gbc_btn_Delete.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_ListButtons().add(get_btn_Delete(),
gbc_btn_Delete);
}
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_ListButtons in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_ListButtons; }
/*
* ********************
*/ protected
JPanel
get_pnl_Info() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_Info
==
null)
{ try
{
pnl_Info
= new
JPanel();
pnl_Info.setName("pnl_Info");
pnl_Info.setLayout(new
GridBagLayout());/* de: Festlegen der 'GridBagConstraints' für das zu platzierende GUI-Element.
* en:
Define 'GridBagConstraints' for the GUI-element to be placed.
*/ GridBagConstraints
gbc_lbl_InfoMessage = new
GridBagConstraints();
gbc_lbl_InfoMessage.gridx
= 0;
gbc_lbl_InfoMessage.gridy
= 0;
gbc_lbl_InfoMessage.fill
=
GridBagConstraints.HORIZONTAL;
gbc_lbl_InfoMessage.weightx
= 1;
gbc_lbl_InfoMessage.anchor
= GridBagConstraints.LINE_START;
gbc_lbl_InfoMessage.insets
= new
Insets(3,3,3,3);/*
de:
* Hinzufügen des GUI-Elements auf das Panel; die Position des Elements wird durch
* 'GridBagConstraints' gesteuert.
* en:
* Add the GUI-element to the panel; element-position is controlled by
'GridBagConstraints'.
*/ get_pnl_Info().add(get_lbl_InfoMessage(),
gbc_lbl_InfoMessage); }
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_Info in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_Info; }
/*
* ********************
*/ private
JSBS_Dividerline
get_dl_Detail_List() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(dl_Detail_List
==
null)
{ try
{
dl_Detail_List
= new
JSBS_Dividerline();
dl_Detail_List.setName("dl_Detail_List"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building dl_Detail_List in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
dl_Detail_List; }
/*
* ********************
*/ public
JButton
get_btn_Help() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */
if
(btn_Help
==
null)
{ try
{
btn_Help
= new
JButton(); btn_Help.setName("btn_Help"); btn_Help.setText("btn_Help"); btn_Help.setActionCommand("btn_Help"); btn_Help.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Help in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Help; }/*
* ********************
*/ public
JButton
get_btn_CC() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_CC
==
null)
{
try
{ btn_CC
= new
JButton(); btn_CC.setName("btn_CC"); btn_CC.setText("btn_CC"); btn_CC.setActionCommand("btn_CC"); btn_CC.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_CC in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_CC; }
/*
* ********************
*/ public
JButton
get_btn_Print() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Print
==
null)
{ try
{
btn_Print
= new
JButton();
btn_Print.setName("btn_Print");
btn_Print.setText("btn_Print");
btn_Print.setActionCommand("btn_Print
");
btn_Print.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Print in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Print; }
/*
* ********************
*/ public
JLabel
get_lbl_ApplicationTitle1() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_ApplicationTitle1
==
null)
{ try
{
lbl_ApplicationTitle1
=
new
JLabel();
lbl_ApplicationTitle1.setName("lbl_ApplicationTitle1");
lbl_ApplicationTitle1.setText("lbl_ApplicationTitle1"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_ApplicationTitle1 in class
JSBS_StartFrame");
Exc.printStackTrace();
}
} return
lbl_ApplicationTitle1; }
/*
* ********************
*/ public
JLabel
get_lbl_ApplicationTitle2() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_ApplicationTitle2
==
null)
{ try
{
lbl_ApplicationTitle2
=
new
JLabel();
lbl_ApplicationTitle2.setName("lbl_ApplicationTitle2");
lbl_ApplicationTitle2.setText("lbl_ApplicationTitle2"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_ApplicationTitle2 in class
JSBS_StartFrame");
Exc.printStackTrace();
}
} return
lbl_ApplicationTitle2; }
/*
* ********************
*/ public
JLabel
get_lbl_CurrencySelection() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_CurrencySelection
==
null)
{ try
{
lbl_CurrencySelection
=
new
JLabel();
lbl_CurrencySelection.setName("lbl_CurrencySelection");
lbl_CurrencySelection.setText("lbl_CurrencySelection"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_CurrencySelection in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
lbl_CurrencySelection; }
/*
* ********************
*/ public
JComboBox
get_combo_CurrencySelection() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(combo_CurrencySelection
==
null)
{ try
{
combo_CurrencySelection
=
new
JComboBox();
combo_CurrencySelection.setName("combo_CurrencySelection"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building combo_CurrencySelection in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
combo_CurrencySelection; }
/*
* ********************
*/ public
JLabel
get_lbl_HeadDate() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_HeadDate
==
null)
{ try
{
lbl_HeadDate
=
new
JLabel();
lbl_HeadDate.setName("lbl_HeadDate");/*
de:
* Umwandeln des Arbeitsdatum aus den Universal-Parameter von der (Java-)Klasse 'Calendar'
* in die (Java-)Klasse 'Date', die für die weitere Verarbeitung verwendet werden kann.
* en:
* Convert the Working-Date from the Universal-Parameters from (Java-)class
'Calendar' to
* (Java-)class 'Date' which can be used for further
processing. */
java.util.Date
date =
new
java.util.Date(frmCC.structJSBS_UniversalParameters.calWorkDate.getTimeInMillis());/*
de: UK-Format als Standard für das angezeigte Datum verwenden.
* en: Set the UK-format as default for the displayed Date. */
DateFormat
df = DateFormat.getDateInstance(DateFormat.LONG,
Locale.ENGLISH);
/*
de: Wenn eine andere Sprache gewählt wurde dann wird eine andere 'Locale' gesetzt.
* en: If another language was chosen, set another Locale. */
if
(frmCC.structJSBS_UniversalParameters.strLanguageCode.indexOf("de")
>= 0)
df = DateFormat.getDateInstance(DateFormat.LONG,
Locale.GERMAN);
if
(frmCC.structJSBS_UniversalParameters.strLanguageCode.indexOf("fr")
>= 0)
df = DateFormat.getDateInstance(DateFormat.LONG,
Locale.FRENCH);
lbl_HeadDate.setText(df.format(date));
lbl_HeadDate.setHorizontalAlignment(SwingConstants.TRAILING); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_HeadDate in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
lbl_HeadDate; }
/*
* ********************
*/ public
JLabel
get_lbl_HeadUser() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_HeadUser
==
null)
{ try
{
lbl_HeadUser
=
new
JLabel();
lbl_HeadUser.setName("lbl_HeadUser");/*
de: Angemeldeten Anwender im Textfeld anzeigen.
* en: Set the registered User to the Text-Field. */
lbl_HeadUser.setText(frmCC.structJSBS_UniversalParameters.strUserName);
lbl_HeadUser.setHorizontalAlignment(SwingConstants.TRAILING); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_HeadUser in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
lbl_HeadUser; }
/*
* ********************
*/ public
JButton
get_btn_Store() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Store
==
null)
{ try
{
btn_Store
= new
JButton();
btn_Store.setName("btn_Store");
btn_Store.setText("btn_Store");
btn_Store.setHorizontalAlignment(SwingConstants.LEADING);
btn_Store.setActionCommand("btn_Store");
btn_Store.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Store in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Store; }
/*
* ********************
*/ public
JButton
get_btn_Copy() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Copy
==
null)
{ try
{
btn_Copy
= new
JButton();
btn_Copy.setName("btn_Copy");
btn_Copy.setText("btn_Copy");
btn_Copy.setHorizontalAlignment(SwingConstants.LEADING);
btn_Copy.setActionCommand("btn_Copy");
btn_Copy.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Copy in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Copy; }
/*
* ********************
*/ public
JButton
get_btn_Previous() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Previous
==
null)
{ try
{
btn_Previous
= new
JButton();
btn_Previous.setName("btn_Previous");
btn_Previous.setText("btn_Previous");
btn_Previous.setHorizontalAlignment(SwingConstants.LEADING);
btn_Previous.setActionCommand("btn_Previous");
btn_Previous.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Previous in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Previous; }
/*
* ********************
*/ public
JButton
get_btn_Next() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Next
==
null)
{ try
{
btn_Next
= new
JButton();
btn_Next.setName("btn_Next");
btn_Next.setText("btn_Next");
btn_Next.setHorizontalAlignment(SwingConstants.LEADING);
btn_Next.setActionCommand("btn_Next");
btn_Next.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Next in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Next; }
/*
* ********************
*/ public
JLabel
get_lbl_SelectionListHeader() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_SelectionListHeader
==
null)
{ try
{
lbl_SelectionListHeader
=
new
JLabel();
lbl_SelectionListHeader.setName("lbl_SelectionListHeader");
lbl_SelectionListHeader.setText("lbl_SelectionListHeader"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_SelectionListHeader in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
lbl_SelectionListHeader; }
/*
* ********************
*/ public
JScrollPane
get_pnl_SelectionList() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_SelectionList
==
null)
{ try
{
pnl_SelectionList
=
new
JScrollPane();
pnl_SelectionList.setName("pnl_SelectionList"); pnl_SelectionList.setAutoscrolls(true); pnl_SelectionList.setMinimumSize(new
Dimension(200,100));
pnl_SelectionList.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
pnl_SelectionList.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); pnl_SelectionList.setEnabled(false); pnl_SelectionList.setViewportView(get_pnl_SelectionListTable()); }
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_SelectionList in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_SelectionList; }
/*
* ********************
*/ public
JTable
get_pnl_SelectionListTable() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(pnl_SelectionListTable
==
null)
{ try
{
pnl_SelectionListTable
=
new
JTable();
pnl_SelectionListTable.setName("pnl_SelectionListTable"); }
catch
(Throwable
Exc) {
System.out.println("Error
while building pnl_SelectionListTable in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
pnl_SelectionListTable; }
/*
* ********************
*/ public
JLabel
get_lbl_Selection() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_Selection
==
null)
{ try
{
lbl_Selection
=
new
JLabel();
lbl_Selection.setName("lbl_Selection");
lbl_Selection.setText("lbl_Selection");
lbl_Selection.setHorizontalAlignment(SwingConstants.TRAILING); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_Selection in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
lbl_Selection; }
/*
* ********************
*/ public
JTextField
get_txt_Selection() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(txt_Selection
==
null)
{ try
{
txt_Selection
=
new
JTextField();
txt_Selection.setName("txt_Selection");
txt_Selection.setMinimumSize(new
Dimension(30, 15));
txt_Selection.setMaximumSize(new
Dimension(30, 20)); }
catch
(Throwable
Exc) {
System.out.println("Error
while building txt_Selection in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
txt_Selection; }
/*
* ********************
*/ public
JButton
get_btn_Get() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Get
==
null)
{ try
{
btn_Get
= new
JButton();
btn_Get.setName("btn_Get");
btn_Get.setText("btn_Get");
btn_Get.setHorizontalAlignment(SwingConstants.LEADING);
btn_Get.setMaximumSize(new Dimension(500,50));
btn_Get.setActionCommand("btn_Get");
btn_Get.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Get in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Get; }
/*
* ********************
*/ public
JButton
get_btn_Delete() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(btn_Delete
==
null)
{ try
{
btn_Delete
= new
JButton();
btn_Delete.setName("btn_Delete");
btn_Delete.setText("btn_Delete");
btn_Delete.setHorizontalAlignment(SwingConstants.LEADING);
btn_Delete.setMaximumSize(new Dimension(500,50));
btn_Delete.setActionCommand("btn_Delete");
btn_Delete.addActionListener(this); }
catch
(Throwable
Exc) {
System.out.println("Error
while building btn_Delete in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
btn_Delete; }
/*
* ********************
*/ public
JLabel
get_lbl_InfoMessage() {/*
de: Automatisches Erstellen des GUI-Elements wenn es nicht bereits existiert.
* en: Auto-create the GUI-element if it does not already exist. */ if
(lbl_InfoMessage
==
null)
{ try
{
lbl_InfoMessage
=
new
JLabel();
lbl_InfoMessage.setName("lbl_InfoMessage");
lbl_InfoMessage.setMinimumSize(new Dimension(10, 12)); }
catch
(Throwable
Exc) {
System.out.println("Error
while building lbl_InfoMessage in class
JSBS_TaskFrame");
Exc.printStackTrace();
}
} return
lbl_InfoMessage; }/*
*
-------------------------------
* de:
* METHODE die zusammen mit der interface ActionHandler erforderlich ist.
* Wenn diese Methode in einer abgeleiteten Klasse überschrieben wird
* dann muß der Code in dieser Methode (dieser Basis-Klasse) in der überschreibenden
* Methode so wie in diesem Beispiel aufgerufen werden:
* super.actionPerformed(e);
* en:
* METHOD that is requiered
together with the interface ActionHandler.
* If this
method is overwritten in the derived class,
* the code of this
method in this base class has to be called in the overwriting method
* like this example:
* super.actionPerformed(e);.
*/ public
void actionPerformed(ActionEvent
e) {/*
de:
* Prüfen ob eine allgemein gültige Schaltfläche angeklickt wurde und ausführen
* der Verarbeitung die der Schaltfläche zugeordnet ist.
* en:
* Verify if a General Button was clicked and perform the task
associated to it. */
String
strActionCommand = e.getActionCommand();/*
de:
* Wenn die Schaltfläche zum 'Umschalten' auf das CommandCenter angeklickt wurde
* dann wird die passende Methode beim CommandCenter (JSBS_StartFrame) aufgerufen.
* en:
* If the button to 'switch' to the CommandCenter was clicked then the fitting method
* at the CommandCenter (JSBS_StartFrame) will be called. */ if
(strActionCommand.equals("btn_CC"))
frmCC.focusCommandCenter();/* */
if
(strActionCommand.equals("btn_Help"))
{/*
de: Die Anzeige des Hilfe-Dokuments wurde angefordert.
* en: Display of the document with Help was requested. *//*
de:
* Namen der Datei mit dem Hilfe-Dokument aus der XML-Struktur
* der Datei 'DisplayStrings.xml' holen.
* en:
* Get the name of the file with the Help-document out of the XML-Struktur
* of file 'DisplayStrings.xml'. */ String strHelpFileName = frmCC.structJSBS_XML_DisplayStrings.getFrameHelpFileName(this); if
(strHelpFileName != null) {/*
de: Erste Prüfung ob ein Datei-Name gefunden wurde.
* en: First verification if a file-name was found. */ if
(strHelpFileName.length() > 0) {/*
de: Zweite Prüfung ob ein Datei-Name gefunden wurde.
* en: Second verification if a file-name was found. *//*
de: Erweitern des Datei-Namens auf gesamte Verzeichnis-Struktur.
* en: Expand the file-name to the complete directory-structure. */ strHelpFileName = frmCC.structJSBS_UniversalParameters.strHelpElementsDirectoryName + strHelpFileName;/*
de: Anzeigen des Hilfe-Dokumentes.
* en: Display the Help-document. */ try {Desktop.getDesktop().browse(new URI("file:///" + strHelpFileName));}/*
de: Fehler beim Anzeigen des Hilfe-Dokumentes - kein Grund für eine Fehlerbehandlung.
* en: Error when displaying the help-document - no reason for error-handling. */ catch (Exception wwwExc) {wwwExc.printStackTrace();} } } } }/*
*
-------------------------------
* de:
*
Methoden die zusammen mit der Interface KeyListener implementiert werden müssen.
*
Wenn eine Methode dieser Basis-Klasse Code enthält und diese Methode in einer
*
abgeleiteten Klasse überschrieben werden muß, dann muß die Methode dieser
*
Basis-Klasse auf folgende Weise aufgerufen werden:
* super.keyPressed(e);.
*
en:
*
Methods that are requiered
together with the interface KeyListener.
* If a
method of this base-class contains code and has to be overwritten
*
in the derived class, the
method in this base class has to be called in the * overwriting method
like this example:
* super.keyPressed(e);.
*/ public
void keyPressed(KeyEvent
e) {/*
de:
* Diese Methode wird verwendet um zu prüfen ob eine Funktionstaste (der Tastatur)
* betätigt wurde.
* en:
*
This method is used to check if a Function-Key (of the keyboard) was pressed. *//*
de:
* Zeichenkette die den internen Tastatur-Code enthalten wird. Das ist jener Code
* der innerhalb des JavaScout Fat-Client-Framework (JS-FCF) verwendet wird.
* en:
* String that will contain the Internal Key-Code. That ist the code that is
* used within the JavaScout Fat-Client-Framework (JS-FCF). */ String
strInternalKeyCode = "";/*
de: Flag ob eine Funktionstaste (F1 bis F12) betätigt wurde.
* en: Flag to indicate if a Function-Key (F1 to F12) was pressed. */ boolean bolFunctionKeyPressed = false;/*
de: Den Java-internen Tastatur-Code aus dem KeyEvent ermitteln.
* en: Derive the Java-internal key-code from the KeyEvent. */ int
intKeyCode
= e.getKeyCode();/*
de:
* Untersuchen des Key-Events ob die 'Enter'- (Eingabe-) Taste betätigt wurde.
* Diese simuliert einen Mausklick auf eine definierte Schaltfläche (JButton).
* en:
* Inspect the Key-Event if the 'Enter'-Key was pressed. This key simulates
* a mouse-click to the defined 'JButton'. */ if
(intKeyCode == KeyEvent.VK_ENTER)
{/* de:
* Prüfen ob der Key-Event ausgelöst wurde während ein GUI-Element vom Typ
* JTextArea den 'Focus' hatte.
* In diesem Fall darf kein JButton ausgelöst werden weil in einer JTextArea
* die 'Eingabe'-Taste eine neue Zeile im Text ergeben soll.
* en:
* Verify is the Key-Event was triggered while a GUI-Element of type JTextArea hat
* the 'Focus'.
* In that case a JButton must not be triggered as within a JTextArea the 'Enter'-key
* has the duty to make a new line. */
Component compOriginatingFrom = e.getComponent();
if
(compOriginatingFrom instanceof JTextArea) return;/* de:
* 'Eingabe'- (Enter-) Taste gedrückt; prüfen ob dieser eine Schaltfläche
* (JButton) zugeordnet ist.
* en:
* Enter-key
was pressed; verify if a Button is attached to the Enter-key. */
if
(btnEnterTriggeredButton
!=
null)
{/* de:
* Schaltfläche (JButton) ist zugeordnet; Prüfen ob er 'enabled' ist und dann
* den 'Mausklick' simulieren.
* en: JButton is defined, see if the Button is enabled and simulate the 'click'.
*/
if
(btnEnterTriggeredButton.isEnabled())
{ btnEnterTriggeredButton.doClick();
e.consume();
}
/*
de: Schaltfläche nicht 'enabled'; einen 'Beep' zur Warnung ausgeben.
* en: Button not enabled; produce a beep to warn the user. */
else getToolkit().beep();/*
de: Aufgabe der Methode erfüllt; Methode beenden.
* en: Mission of this method completed; end the method. */
return;
} }/*
de:
* Untersuchen des Key-Events ob eine 'Modifier'-Taste betätigt wurde.
* Nur so ist eine Prüfung unabhängig von Betriebssystem und gewählter
* Sprache möglich.
* en:
* Inspect the Key-Event if a 'Modifier'-Key was pressed. This code is the only
* way to check independent from operating system and chosen language. */ if
(intKeyCode == KeyEvent.VK_ALT)
{ bolAltKeyModifier
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_CONTROL)
{ bolCtrlKeyModifier
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_SHIFT)
{ bolShiftKeyModifier
= true;
e.consume();
}/*
de:
* Wenn 'Modifier'-Tasten gedrückt sind dann den internen Code für diese jetzt in
* die Zeichenkette für den Internen Key-Code einfügen.
* en:
* If 'Modifier'-keys are pressed then insert the internal code for them
* now to the string for the Internal Key-Code. */ if
(bolAltKeyModifier)
strInternalKeyCode += "Alt-"; if
(bolCtrlKeyModifier)
strInternalKeyCode += "Ctrl-"; if
(bolShiftKeyModifier)
strInternalKeyCode += "Shift-";/*
de:
* Untersuchen des Key-Events ob eine Funktionstaste betätigt wurde.
* Nur so ist eine Prüfung unabhängig von Betriebssystem und gewählter
* Sprache möglich.
* en:
* Inspect the Key-Event if a Function-Key was pressed. This code is the only
* way to check independent from operating system and chosen language. */ if
(intKeyCode == KeyEvent.VK_F1)
{
strInternalKeyCode += "F1"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F2)
{
strInternalKeyCode += "F2"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F3)
{
strInternalKeyCode += "F3"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F4)
{
strInternalKeyCode += "F4"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F5)
{
strInternalKeyCode += "F5"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F6)
{
strInternalKeyCode += "F6"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F7)
{
strInternalKeyCode += "F7"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F8)
{
strInternalKeyCode += "F8"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F9)
{
strInternalKeyCode += "F9"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F10)
{
strInternalKeyCode += "F10"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F11)
{
strInternalKeyCode += "F11"; bolFunctionKeyPressed
= true;
e.consume();
} if
(intKeyCode == KeyEvent.VK_F12)
{
strInternalKeyCode += "F12"; bolFunctionKeyPressed
= true;
e.consume();
}/*
de: * Wenn kein definierter 'Virtual-Key' für eine Funktionstaste gedrückt wurde * dann wird der Internal Key-Code mit der in Java festgelegten Bezeichnung
* für die Taste gebildet. Diese Bezeichnung der Taste kann vom Betriebssystem
* oder der gewählten Sprache abhängen.
* en:
* If no defined 'Virtual-Key' for a Function-Key was pressed then the
* Internal Key-Code is build with the Java-defined Text of the key.
* This text might depend on the operating system or chosen language. */ if (! bolFunctionKeyPressed)
strInternalKeyCode += KeyEvent.getKeyText(intKeyCode);/*
de:
* Untersuchen der XML-Struktur ob ein ButtonName dem Internal Key-Code
* zugeordnet ist.
* en:
* Inspect the XML-structure if a ButtonName is associated with the
* Internal Key-Code. */
String strButtonName = frmCC.structJSBS_XML_FunctionKeys.getButtonName(
this.getClass().getName(),
strInternalKeyCode);/*
de:
* Wenn ein 'ButtonName' gefunden wurde dann wird die Methode aufgerufen,
* die unter den GUI-Elementen den 'JButton' mit dem passenden Namen sucht
* und einen 'Mausklick' auf diesen 'JButton' simuliert.
* en:
* If a 'ButtonName' was found then the method is called to find the
'JButton'
* with the fitting ButtonName amongst the GUI-Elements and simulate a 'mouse-click'
* on that 'JButton'. */ if
(strButtonName.length()
> 0) { JSBS_GUIServices.clickButton(this.getContentPane(),
strButtonName);/*
de:
* 'Consume' (Verbrauchen) des KeyEvent damit er nichts anderes auslöst.
* en:
* 'Consume' the KeyEvent so it can not trigger something esle. */ e.consume(); }
} public
void keyReleased(KeyEvent
e) {/*
de:
* Diese Methode setzt die Markierungen für die Midifier-Tasten (Alt, Steuerung,
* Umschalten) zurück.
* Zuerst wird der numerische Tastatur-Code ermittelt und dieser wird dann mit
* dem 'Virtual-Key' verglichen.
* Der Vergleich mit dem 'Virtual Key' liefert ein eindeutiges Ergebnis das nicht
* vom verwendeten Betriebssystem oder der eingestellten Sprache abhängt.
* en:
* This method is used to reset the flags for Modifier-keys (Alt,
Control, Shift).
* First derive the numeric key-code
and then compare it with the 'Virtual-Key'.
* The comparison with the 'Virtual-Key' gives a unique result independent from
* the underlying operating-system or the chosen language. */ int
intKeyCode
= e.getKeyCode();/* de:
* Untersuchen ob ein 'Modifier-Key' losgelassen wurde.
* Wenn es ein 'Midifier-Key' war dann das entsprechende 'Flag' zurücksetzen und
* den KeyEvent als 'consumed' markieren.
* en:
* Inspect
if a Modifier-key was released.
* If it was a
Modifier-Key, reset the flag and mark the KeyEvent as 'consumed'.
*/ if
(intKeyCode == KeyEvent.VK_ALT)
{
bolAltKeyModifier
=
false;
e.consume();
} if
(intKeyCode == KeyEvent.VK_CONTROL)
{ bolCtrlKeyModifier
=
false;
e.consume();
} if
(intKeyCode == KeyEvent.VK_SHIFT)
{ bolShiftKeyModifier
=
false;
e.consume();
}
} public
void keyTyped(KeyEvent
e) {
}/*
*
-------------------------------
* de:
* Methoden die vom interface FocusListener verlangt werden.
* Da diese Methoden Code enthalten, muss, wenn diese Methode auch in einer
* abgeleiteten Klasse implementiert ist, diese Methode so wie im folgenden
* Beispiel aufgerufen werden:
* super.focusGained(e);
* en:
* Methods that are requiered
together with the interface FocusListener.
* As these
methods contain code, so if they are overwritten in the derived class,
* the
method in this base class has to be called in the overwriting method
* like this example:
* super.focusGained(e);
*/
public
void focusGained(FocusEvent
e) {/* de:
* Prüfen, ob das Objekt, das den 'Focus' erhalten hat, vom Typ 'Container' ist.
* In diesem Fall die Methode zum Ändern der 'Border'-Farbe aufrufen.
* en:
* Verify if the Object that gained the 'Focus' is of Type 'Container.
* In that case call the method to change the color of the 'Border'.
*/
if
(e.getSource() instanceof Container)
JSBS_GUIServices.setEntryFieldBorderFocussed((Container)e.getSource(), this);
}
/* */ public
void focusLost(FocusEvent
e) {/* de:
* Prüfen, ob das Objekt, das den 'Focus' erhalten hat, vom Typ 'Container' ist.
* In diesem Fall die Methode zum Ändern der 'Border'-Farbe aufrufen.
* en:
* Verify if the Object that gained the 'Focus' is of Type 'Container.
* In that case call the method to change the color of the 'Border'.
*/
if
(e.getSource() instanceof Container)
JSBS_GUIServices.setEntryFieldBorderUnfocussed(
(Container)e.getSource(),
frmCC.structJSBS_UniversalParameters,
structJSBS_EntryRules);
}
/*
*
-------------------------------
* de:
* Methoden die für die interface MouseListener erforderlich sind.
* Wenn diese Methoden Code enthalten, muss, wenn diese Methode auch in einer
* abgeleiteten Klasse implementiert ist, diese Methode so wie im folgenden
* Beispiel aufgerufen werden:
* super.mouseClicked(e);
* en: * Methods that are requiered
together with the interface MouseListener.
* If these
methods contain code and are overwritten in the derived class,
* the
method in this base class has to be called in the overwriting method
* like this example:
* super.mouseClicked(e);
*/ public
void mouseClicked(MouseEvent
e) {/*
de: Untersuchen welches GUI-element den Maus-Klick erhalten hat.
* en: Inspect which GUI-element received the mouse-click. */
if
(e.getSource()
== get_pnl_SelectionListTable()) {/*
de:
* Anwender hat einen Datensatz in der Auswahl-Liste angeklickt;
* dessen Zeilennummer ermitteln.
* en:
* User selected a dataset in the selection list;
* get the
row-number. */
int
intSelectedRow
= get_pnl_SelectionListTable().getSelectedRow();
if
(intSelectedRow
>= 0) {/*
de:
* Ausgewählte Zeile ist gültig; weil die Zeilen-Numerierung mit für den Anwender mit 1 beginnt
* wird der Wert um 1 erhöht und der neue Wert im GUI-Element, das das Eingabefeld für die
* Zeilenauswahl ist, angezeigt.
* en:
* Selected row is valid; increase the value (as the row-numbering for
the user starts with 1)
* and show the value in the
GUI-element where the user enters the row-selection. */
intSelectedRow++;
get_txt_Selection().setText(JSBS_Formatter.toFormattedString(intSelectedRow));
}
}
} public
void mouseEntered(MouseEvent
e) {
}
public
void mouseExited(MouseEvent
e) {
}
public
void mousePressed(MouseEvent
e) {
}
public
void mouseReleased(MouseEvent
e) {
}/*
*
-------------------------------
* de:
* Methoden die zusammen mit der interface WindowListener erforderlich sind.
* Wenn Methoden Code enthalten und von einer erbenden Klasse überschrieben werden,
* dann muss die Methode in dieser Klasse wie in diesem Beispiel aufgerufen werden:
* super.windowActivated(e); .
* en: * Methods that are requiered
together with the interface WindowListener.
* If these
methods contain code and are overwritten in the derived class,
* the
method in this base class has to be called in the overwriting method
* like this example:
* super.windowActivated(e); .
*/ public
void windowActivated(WindowEvent
e) {
} public
void windowClosed(WindowEvent
e) {/*
de: Klasse, die das 'Window' erstellt hat, 'vernichten'.
* en: Discard the class that constructed the 'window'.
*/
this.dispose();
} public
void windowClosing(WindowEvent
e) {/*
de: Methode aufrufen, die Größe und Position des JFrame auf der Datenbank speichert.
* en: Call the method that stores size and position of the JFrame to the
database. */
storeFramePosition();/*
de: Eintrag in der Liste der geöffneten Geschäftanwendungen im Command-Center entfernen.
* en: Remove the entry in the Open-Tasks-List in the Command-Center.
*/
frmCC.removeOpenTaskFrame(dblCC_TaskID);/*
de: Frame endgültig 'vernichten'.
* en: Finally dispose this Frame.
*/
this.dispose();
} public
void windowDeactivated(WindowEvent
e) {
} public
void windowDeiconified(WindowEvent
e) {
} public
void windowIconified(WindowEvent
e) {
} public
void windowOpened(WindowEvent
e) {
}/*
*
-------------------------------
* de:
* METHODE die zusammen mit der interface Itemistener erforderlich ist.
* Die interface ItemListener wird zu GUI-Elementen vom Typ JCheckBox und JRadioButton
* hinzugefügt und wenn sich die *Auswahl* bei diesen GUI-Elementen ändert dann wird
* die Methode itemStateChanged aufgerufen.
* Diese Methode muß in der erbenden Klasse 'überschrieben' werden wenn GUI-Elemente
* vom Typ JCheckBox oder JRadioButton verwendet werden
* en: * METHOD that is requiered
together with the interface ItemListener.
* The interface ItemListener is added to GUI-elements of type JCheckBox and JRadioButton
* and if the 'selection' at one of those GUI-elements is changed then the method
* itemStateChanged is called.
* This method has to be 'overwritten' in the inheriting class if GUI-elements of type
* JCheckBox or JRadioButton are used.
*/ public
void itemStateChanged(ItemEvent
e) {
}/*
*
-------------------------------
* de:
* Methoden die zusammen mit der interface TableColumnModelListener erforderlich sind.
* Wenn Methoden Code enthalten und von einer erbenden Klasse überschrieben werden,
* dann muss die Methode in dieser Klasse wie in diesem Beispiel aufgerufen werden:
* super.columnMarginChanged(e); .
* en: * Methods that are requiered
together with the interface TableColumnModelListener.
* If these
methods contain code and are overwritten in the derived class,
* the
method in this base class has to be called in the overwriting method
* like this example:
* super.columnMarginChanged(e); .
*/ public
void columnMarginChanged(ChangeEvent
e) {
/*
*
de:
* Weil der Wert von 'bolInhibitTableColumnChangeStore' auch von parallel laufenden
* Methoden verändert werden kann wird der gesamte Code in dieser Methode 'synchronized'
* ausgeführt.
*
en:
* As the value of 'bolInhibitTableColumnChangeStore' might be changed by concurrent
* running methods too, the whole code of this method is processed 'synchronized. */
synchronized
(this) {
/*
*
de:
* Prüfen, ob der Code in dieser Methode überhaupt ausgeführt werden soll.
* Die Bedeutung von 'bolInhibitTableColumnChangeStore' ist bei der Definition
* der Variable beschrieben.
*
en:
* Verify if the Code within this methode should be performed.
* The meaning of 'bolInhibitTableColumnChangeStore' is describe at the definition
* of the variable. */
if
(bolInhibitColumnMarginChangeStore) return;/*
*
de:
* Spaltenbreite einer Tabelle verändert.
* In dieser Basisklasse werden die neuen Breiten der Spalten in der Tabelle
* 'SelectionListTable' (in dieser Basisklasse definiert) abgefragt und auf die
* Variable 'ColumnWidthArray01' des BO 'JSBS_FramePosition_BOC' (auch in dieser
* Klasse definiert) übertragen.
* en:
* Width of a column of any table (JTable) changed.
* In this base-class the new widths of the columns in the table 'SelectionListTable'
* (defined within this base-class) are queried and transferred to the variable
* 'ColumnWidthArray' of the BO 'JSBS_FramePosition_BOC' (defined within this base-class,
* too).
*/
if
(structJSBS_FramePosition_BOC
== null)
return;
structJSBS_FramePosition_BOC.ColumnWidthArray01 = JSBS_GUIServices.getTableColumnWidth(get_pnl_SelectionListTable());
} } public
void columnSelectionChanged(ListSelectionEvent
e) {
} public
void columnAdded(TableColumnModelEvent
e) {
} public
void columnMoved(TableColumnModelEvent
e) {
} public
void columnRemoved(TableColumnModelEvent
e) {
}/*
*
-------------------------------
* de:
* METHODE, die KeyListener, FocusListener, ItemListener und DocumentListener zu einem
* GUI-Element und allen seinen untergeordneten Komponenten hinzufügt.
* Wenn diese Methode von einen TaskFrame (das diese Klasse 'erbt' dann wird das ContentPane
* des JFrame (üblicherweise das überschriebene 'MainPanel') als 'Container'-Parameter
* übergeben.
* Diese Methode untersucht jeden 'Conteiner' auf untergeordnete Komponenten und für jede
* gefundene Komponente ruft sich diese Methode selbst auf und übergibt die Komponente als
* Parameter.
*
* Der Parameter 'DocumentListener' erlaubt, diesen DocumentListener zu jeder JTextComponent
* zuzuordnen.
* Dann werden die Methoden 'changedUpdate', 'insertUpdate' oder 'removedUpdate' (in der
* Klasse, die als DocumentListener-Parameter übergeben wird) aufgerufen wenn der Text einer
* JTextComponent verändert wird.
*
* en:
* METHOD that adds
KeyListener, FocusListener and DocumentListener to a GUI-element
and
* all its subordinate components.
* If this
method is called from a TaskFrame (a derivation of this
class),
* then the ContentPane of the JFrame (usually
the overwritten 'MainPanel')
* is passed as
'Container'-parameter.
* This method inspects each
'Container' for components and calls itself for each component
* and passes that component as parameter.
*
* The parameter 'DocumentListener'
allows to attach this DocumentListener to each JTextComponents.
* Then
the methods 'changedUpdate', insertUpdate' or 'removedUpdate'
(implemented in
* the class that is passed as
DocumentListener-parameter) are called when the text of a
* JTextComponent changes.
*/ protected
void addListeners(Container
parmContainer, DocumentListener parmDocumentListener) {
/*
* de: KeyListener und FocusListener werden zu jedem Typ eines GUI-Elementeshinzugefügt.
*
en: KeyListener and FocusListener are added to any type of a
GUI-element.
*/
parmContainer.addKeyListener(this);
parmContainer.addFocusListener(this);/*
* de:
* Wenn der 'Container' eine 'JTextComponent' ist und ein 'DocumentListener' übergeben wird,
* dann wird der 'DocumentListener' zum 'Container' hinzugefügt.
* en: *
If the 'Container' is a 'JTextComponent' and a 'DocumentListener' is
passed,
* then the 'DocumentListener' is added to the
'Container'. */
if
((parmContainer instanceof
JTextComponent) && (parmDocumentListener != null))
{
/* de:
* Klassifizieren des 'Container' als Typ 'JTextComponent' um den 'DocumentListener'
* hinzufügen zu können.
* en:
* Classify
the 'Container' as type 'JTextComponent' to be able to add the
* 'DocumentListener'. */
JTextComponent
locJTextComponent = (JTextComponent) parmContainer;
/* de:
* Extrahieren des 'Document' (die Komponente die für den Text 'verantwortlich'
* ist und den 'DocumentListener' hinzufügen.
* en:
* Extract
the 'Document' (the component that is responsible for the text)
from
* the JTextComponent and add the 'DocumentListener'.
*/
locJTextComponent.getDocument().addDocumentListener(parmDocumentListener);
}
/*
* de:
* Spezielle Bearbeitung einer JComboBox ist notwendig weil das 'Document' der
* JComboBox nicht als 'Unter-Komponente' mit dem Standard-Algorithmus erreicht
* werden kann.
* en: * Special processing of a JCombobox; neccessary as the 'Document' of the JComboBox
* can not be reached as 'Sub-Component' with the standard-algorithm. */
if
(parmContainer instanceof
JComboBox)
{
/* de:
* Zuerst den 'Container' als Typ 'JComboBox' klassifizieren um danach das 'JTextDocument'
* herausholen zu können.
* en:
* First classify
the 'Container' as type 'JComboBox' to be able to get the
* 'JTextDocument' thereafter. */
JComboBox
locJComboBox = (JComboBox) parmContainer;
/* de:
* ItemListener hinzufügen; damit wird bei einer Änderung der Auswahl die entsprechende
* Methode aufgerufen.
* en:
* Add the Itemlistener; this causes that the associated method is called when
* the selection is changed. */
locJComboBox.addItemListener(this);/*
* de:
* Wenn ein 'DocumentListener' als Parameter übergeben wurde dann wird dieser dem Editor
* für den Text in der JComboBox hinzugefügt.
* en: * When a 'DocumentListener' was passed as parameter then it will be added to the editor
* for the text within the JComboBox. */
if
(parmDocumentListener != null)
{/* de:
* Extrahieren des 'Document' (die Komponente die für den Text 'verantwortlich'
* ist) und den 'DocumentListener' hinzufügen.
* en:
* Extract
the 'Document' (the component that is responsible for the text)
from
* the JTextComponent and add the 'DocumentListener'.
*/
JTextComponent
locJTextComponent =
(JTextComponent) locJComboBox.getEditor().getEditorComponent(); locJTextComponent.getDocument().addDocumentListener(parmDocumentListener);
} }/*
* de:
* Spezielle Bearbeitung einer JTable ist notwendig weil die individuell eingestellten
* Spaltenbreiten für jeden Benutzer in weiterer Folge auf einer Datenbank-Tabelle
* gespeichert wird damit bei einem neuerlichen Aufruf des Task-Frames die gewählten
* Spaltenbreiten wieder angezeigt werden.
* en: * Special processing of a JTable; neccessary as the individually chosen width of the
* columns for each user is stored in a database-table. This enables, when the task-frame
* is opened again, to re-establish the set column-widths. */
if
(parmContainer instanceof
JTable)
{
/* de:
* Zuerst den 'Container' als Typ 'JTable' klassifizieren um danach das 'TableColumnModel'
* herausholen zu können.
* en:
* First classify
the 'Container' as type 'JTable' to be able to get the
* 'TableColumnModel' thereafter. */
JTable
locJTable = (JTable) parmContainer;
/* de:
* Extrahieren des 'TableColumnModel' (die Komponente die für den Aufbau der Spalten
* 'verantwortlich' ist) und den 'Listener' hinzufügen.
* en:
* Extract
the 'TableColumnModel' (the component that is responsible for the arrangement of
* the columns)
and add the 'Listener'.
*/
TableColumnModel
locTableColumnModel = locJTable.getColumnModel();
locTableColumnModel.addColumnModelListener(this);
}/*
* de:
* Spezielle Bearbeitung von GUI-Elementen des Typs 'JToggleButton' (das sind
* JCheckBox und JRadioButton).
* Zu diesen wird der 'ItemListener' hinzugefügt der auf Änderungen des 'Status' reagiert
* und dann die Methode 'itemStateChanged' aufruft.
* en: * Special processing of GUI-elements of type 'JToggleButton' (i.e. JCheckBox and
* JRadioButton). * To these, the 'ItemListener' is added which reacts to changes of the 'Status' and
* calls the method 'itemStateChanged'. */
if
(parmContainer instanceof
JToggleButton) {
/* de:
* Zuerst den 'Container' als Typ 'JToggleButton' klassifizieren um danach dan
* 'ItemListener' hinzufügen zu können.
* en:
* First classify
the 'Container' as type 'JToggleButton' to be able to add the
* 'ItemListener' thereafter. */
JToggleButton
locJToggleButton = (JToggleButton) parmContainer;
locJToggleButton.addItemListener(this);
}
/* de:
*
Untersuchen ob der 'Container' weitere Komponenten enthält. Wenn Komponenten in diesem
* 'Container' vorhanden sind, dann diese Methode rekursiv für jeden 'Container' aufrufen.
* en:
* Inspect if the 'Container' has components in it. If there are
components
* within this 'Container', call this method
recursively for each of it. */
Component
comps[] = parmContainer.getComponents();
for(int
i = 0; i < comps.length;
i++) {
Component
comp = comps[i];
addListeners((Container)
comp, parmDocumentListener);
} }/*
*
-------------------------------
* de:
* METHODEN mit einer unterschiedlichen Anzahl von Parametern für den Aufruf
* des Error-Handlers.
* Dort wird die entsprechende Datei mit der XML-Struktur gelesen und aus deren
* Eintragungen wird entschieden ob das Ereignis
* * ein 'Fehler' (Error) ist und ein Abbruch des Anwendungsprogramms notwendig ist.
* * eine 'Warnung' (Warning) ist und eine Bestätigung des Anwenders für die
* Fortsetzung notwendig ist.
* * nur auf die Log-Datei (Log-Only) geschrieben werden soll ohne Verständigung des
* Anwenders.
* en:
* METHODS with a variable
number of parameters that call the Error-Handler.
* There,
the file with the XML-structure is read and the decision is
made
* if the event is an 'Error' (causing a
termination of the application),
* a 'Warning' (asking
for a confirmation of the user to continue processing) or
* a
'Log Only' (where the Event is just written to the Log-File without
any
* user-requiered action. */ public
void handleErrorEvent(String
parmClassName, String
parmCode,
String
parmParameter1, String
parmParameter2,
String
parmParameter3, String
parmParameter4,
String
parmParameter5) {/* de:
* Aufrufen des Dialogs zum Anzeigen und/oder Loggen des Fehler oder Warnungs-Ereignisses.
* en:
* Call
the Dialog to display and/or log Error- and Warning-Events. */
JSBS_ErrorDialog
dlgJSBS_ErrorDialog =
new JSBS_ErrorDialog(this,
parmClassName, parmCode, parmParameter1,
parmParameter2,
parmParameter3,
parmParameter4, parmParameter5); /* de: Prüfen ob der ein 'Dump' (Abbruch) des Anwendungsprogramms notwendig ist.
* en: Check
if the Dialog requests a 'dump' of the application. */
if (dlgJSBS_ErrorDialog.strProcessIndicator.compareTo("D")
== 0) System.exit(0);/* de: Anwendungsprogramm soll fortgesetzt werden; angezeigten Dialog entfernen.
* en: Application
should continue; dispose the shown dialog. */
dlgJSBS_ErrorDialog.dispose();
}/*
*/ public
void handleErrorEvent(String
parmClassName, String
parmCode,
String
parmParameter1, String
parmParameter2,
String
parmParameter3, String parmParameter4)
{
handleErrorEvent(parmClassName,
parmCode, parmParameter1,
parmParameter2,
parmParameter3,
parmParameter4, "");
}/*
*/ public
void handleErrorEvent(String
parmClassName, String
parmCode,
String
parmParameter1, String
parmParameter2,
String
parmParameter3) {
handleErrorEvent(parmClassName,
parmCode, parmParameter1,
parmParameter2,
parmParameter3,
"",
"");
}/*
*/ public
void handleErrorEvent(String
parmClassName, String
parmCode,
String
parmParameter1, String parmParameter2)
{
handleErrorEvent(parmClassName,
parmCode, parmParameter1, parmParameter2,
"",
"",
"");
}/*
*/ public
void handleErrorEvent(String
parmClassName, String
parmCode,
String
parmParameter1) {
handleErrorEvent(parmClassName,
parmCode, parmParameter1, "",
"",
"",
"");
}/*
*/ public
void handleErrorEvent(String
parmClassName, String parmCode)
{
handleErrorEvent(parmClassName,
parmCode, "",
"",
"",
"",
"");
}/*
*
-------------------------------
* de:
* METHODE um den (Objekt-)Wert jenes JButton, der ausgelöst werden soll wenn die Eingabetaste (Enter-Key)
* gedrückt wird, in der vorgesehenen Variable aufzuheben.
* Nach dem Zuweisen des Werts auf die Variable wird die Methode zum neuen Einfärben des Randes der
* Schaltfläche wieder aufgerufen.
* en:
* METHOD to keep the (object-)value of the
JButton, that should be triggered when the Enter-Key is pressed,
*
in the designed variable.
* After assigning the JButton to
the variable, the method to redraw the Button-Borders is called. */
public
void setEnterTriggeredButton(JButton
parmJButton) {/*
de: Übertragen des als Parameter übergebenen JButton in die Variable.
* en: Assign the JButton passed as parameter to the variable. */
btnEnterTriggeredButton
= parmJButton; /*
de: Aufrufen der Methode um den Rand der Schaltfläche neu zu zeichnen (einzufärben).
* en: Call the method to redraw the button-borders. */
JSBS_GUIServices.setButtonBorders(this,
frmCC.structJSBS_UniversalParameters,
btnEnterTriggeredButton);
}/*
*
-------------------------------
*
de:
*
Methode zum 'Holen' der Eigenschaften (Größe und Postion) des Frames und der Spaltenbreiten
*
für JTables von der Datenbank und Anpassen von Größe und Position des Frames
*
en: * Methods to retrieve the
Frame-Properties (size and position) and the column-widths for
JTables
* from the database and resize and position the
Frame according to them. */
/*
*
de:
* Die folgende Methode muss von der erbenden Klasse (Teilprogramm / Task-Frame mit der spezifischen
* Geschäftsanwendung) aufgerufen werden nachdem die Verbindung zur Datenbank (oder zum EJB-Server)
* hergestellt ist und das JFrame konstruiert wurde.
*
en: * The following method
has to be called by the derived class (application-specific
Task-Frame)
* after the access to the database (or
EJB-server) is established and the JFrame is constructed. */
public
void setFramePosition()
{/*
de: Holen der FramePosition-Eigenschaften von der Datenbank.
* en: Retrieve the FramePosition-properties from the database. */
structJSBS_FramePosition_BOC.getValidByUserKnownKey(this.getClass().getName(),
frmCC.structJSBS_UniversalParameters.strUserName);
/*
de:
* Nachdem die Datenbank-Tabelle 'Parameter' im Anwendungprogramm, das diese Klasse erbt, nicht
* erstellt sein kann führt ein Fehler beim Zugriff auf die Datenbank nicht zu einem Ereignis
* über das der Benutzer informiert wird. * Der Unterschied zwischen fehlerfreier Abfrage und Auftreten eines Fehler ist nur, wie das BOS * mit Daten versorgt wird.
* en:
* As there is no obligation for an application using this base-class to
have a database-table
* named 'Parameter', a failure of the
data-access is not an error to be reported.
* The
differentiation is just the way, how the BOS is supplied with values.
*/
if
(structJSBS_FramePosition_BOC.StatusCode
== JSBS_BO.CONST_OK)
{/*
de: Eigenschaften auf der Tabelle gefunden; Frame anpassen.
* en: Frame-Position-properties found on the database; adapt the Frame. */
this.setSize(structJSBS_FramePosition_BOC.FrameWidth,
structJSBS_FramePosition_BOC.FrameHeight);
this.setLocation(structJSBS_FramePosition_BOC.PosX,
structJSBS_FramePosition_BOC.PosY);
}
else
{/*
de:
* Eigenschaften für die Frame-Position nicht auf der Datenbank gefunden;
* Dieses BO mit dem Namen des JFrame und des Benutzer versorgen - für den Fall, dass das
* BO beim Schließen des Fenster gespeichert wird.
* en:
* Frame-Position-properties not found on the database;
*
Supply the BO with the name of the JFrame and the user - in case that
this information is stored
* when the JFrame is closing. */
structJSBS_FramePosition_BOC.FrameClassName
= this.getClass().getName();
structJSBS_FramePosition_BOC.UserID
= frmCC.structJSBS_UniversalParameters.strUserName;
}
}/*
*
de:
*
Die folgende Methode wird aufgerufen wenn das JFrame (Window) geschlossen wird.
*
Innerhalb dieser Methode wird die Größe und Position des JFrame ermittelt und in der Datenbank
*
gespeichert. *
en:
*
The following method is called when the JFrame (window) is
'closing'.
* Within this method, the size and the position
of the JFrame is taken and stored to the database. */
public
void storeFramePosition()
{/*
de:
* Prüfen ob das BOC konstruiert wurde.
* Weil das 'Konstruieren' in einem erbenden (Anwendungs-spezifischem) Task-Frame erfolgt tritt dieser
* Status auf wenn das Anwendungsprogramm die Größe und Position des Frames nicht in der Datenbank
* aufheben will.
* en:
* Check if the BOC is constructed.
* As the construction
happens in the derived Task-Frame (application-specific) this status happens if
*
the application does not make use of keeping the Frame-postion and
-size within the database. */
if
(structJSBS_FramePosition_BOC
== null)
return;
/*
de:
* Positions-'Eigenschaften' des Frame abfragen; diese Eigenschaften werden in einer (Java-)Klasse
* 'Rectangele' zurück geliefert.
* en:
* Get the location-properties from the frame; the properties can be derived as (Java-)class 'Rectangle'. */
Rectangle
locRectangle = new
Rectangle();
locRectangle
= this.getBounds();
structJSBS_FramePosition_BOC.PosX
= locRectangle.x;
structJSBS_FramePosition_BOC.PosY
= locRectangle.y;
structJSBS_FramePosition_BOC.FrameWidth
= locRectangle.width;
structJSBS_FramePosition_BOC.FrameHeight
= locRectangle.height;
/*
de:
* Speichern des Wertes in der Datenbank.
* Weil möglicherweise noch keine Datenbank-Tabelle 'Parameter' für dieses
* Anwendungsprogramm existiert wird das Ergebnis der Datenbank-Operation nicht geprüft
* und ein Fehler wird nicht behandelt.
* en:
* Store the values to the database.
* As there might be not
database-table 'Parameter' existing for the application,
* the result of the DB-operation is not checked and an error is not reported. */
structJSBS_FramePosition_BOC.store();
}
}
xxx
|
Dokument |
Inhalt |
|
Dieser
Leitfaden enthält die notwendigen Tätigkeiten für
die Entwicklung eines StartFrame (auch als Command-Center
bekannt). |