|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsemorg.gui.ClientBookingWindow
public class ClientBookingWindow
The window for editing new or existing clientbooking records.
Nested Class Summary | |
---|---|
(package private) class |
ClientBookingWindow.InputChangedListener
Inner class which provides a listener reacting on changes of the input in the ClientBookingWindow window. |
Field Summary | |
---|---|
private org.eclipse.swt.widgets.Button |
abortButton
|
private org.eclipse.swt.widgets.Button |
applyButton
|
private org.eclipse.swt.widgets.Button |
billButton
The button to create the bill. |
private CalendarControl |
billedCalendar
|
private ForeignKeyConstraintSelector |
clientSelector
|
private CalendarControl |
confirmedCalendar
|
private ForeignKeyConstraintSelector |
debitorSelector
|
private CalendarControl |
enrolledCalendar
|
private ClientBooking |
input
Holds the data of the actual displayed data record. |
private boolean |
inputChanged
Is set to true if the input has been changed and not committed yet, otherwise it is set to false. |
private ClientBookingWindow.InputChangedListener |
inputChangedListener
Listener instance added to the most elements of the window. |
private boolean |
inputEditingEnabled
true if the editing of the input (i.e. the elements of the form) has been enabled, otherwise it is false. |
private org.eclipse.swt.widgets.Button |
messageButton
The button to create a message. |
private CalendarControl |
messagedCalendar
|
private org.eclipse.swt.widgets.Button |
newButton
|
private org.eclipse.swt.widgets.Button |
nextButton
The triangle-button with the apex to the right. |
private org.eclipse.swt.widgets.Label |
numberLabel
|
private org.eclipse.swt.widgets.Text |
numberText
|
private org.eclipse.swt.widgets.Button |
okButton
|
private org.eclipse.swt.widgets.Button |
paymentBehaviorButton
The button to check the payment behavior. |
private ForeignKeyConstraintSelector |
presentationSelector
|
private org.eclipse.swt.widgets.Button |
prevButton
The triangle-button with the apex to the left. |
private org.eclipse.swt.widgets.Button |
repaymentButton
The button to handle repayments. |
private boolean |
settingInput
Is set to true if the data from the database (or corresponding from input ) is to be set into the window form, otherwise
false. |
private org.eclipse.swt.widgets.Shell |
shell
The editing window. |
private CalendarControl |
signedOffCalendar
|
private ForeignKeyConstraintSelector |
substituteSelector
|
private int |
titleBarHeight
The height of the title bar. |
Constructor Summary | |
---|---|
private |
ClientBookingWindow(org.eclipse.swt.widgets.Shell parent,
AssociationTabControl caller)
Creates a ClientBookingWindow instance with the given shell as
the parent shell. |
|
ClientBookingWindow(org.eclipse.swt.widgets.Shell parent,
ClientBooking input,
AssociationTabControl caller)
Creates an instance of this class, sets the input and finally opens it. |
Method Summary | |
---|---|
protected boolean |
checkInput()
Checks if all obligatory attributes of a data record are entered into the window form. |
protected void |
commitInputToDB()
Reads the data from the window form elements, sets the values to a ClientBooking instance and commits the changes / the new record
into the database. |
private boolean |
confirmClose()
Creates a message dialog if the data in the window form has been changed (or was entered newly) and these changes haven't been confirmed (e.g. by clicking the ok button) or discarded so far. |
private void |
createButtonListener(org.eclipse.swt.widgets.Composite buttons,
AssociationTabControl caller)
Adds a listener to several buttons of the window form. |
private boolean |
onSave()
Checks whether the input has been changed (i.e. inputChanged equals true) or not. |
private void |
setInput(ClientBooking booking)
Loads a given data record into the window form of initialize the elements of the form the empty string/null if no data is given. |
private void |
setInputComponentsEnabled(boolean enabled)
According to the value of the given parameter (true/false) this method enables / disables the widgets of the window form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ClientBooking input
private boolean settingInput
input
) is to be set into the window form, otherwise
false.
private boolean inputChanged
private boolean inputEditingEnabled
private ClientBookingWindow.InputChangedListener inputChangedListener
private org.eclipse.swt.widgets.Shell shell
private int titleBarHeight
private final org.eclipse.swt.widgets.Label numberLabel
private final org.eclipse.swt.widgets.Text numberText
private final CalendarControl enrolledCalendar
private final CalendarControl confirmedCalendar
private final CalendarControl billedCalendar
private final CalendarControl signedOffCalendar
private final CalendarControl messagedCalendar
private final ForeignKeyConstraintSelector clientSelector
private final ForeignKeyConstraintSelector debitorSelector
private final ForeignKeyConstraintSelector presentationSelector
private final ForeignKeyConstraintSelector substituteSelector
private final org.eclipse.swt.widgets.Button okButton
private final org.eclipse.swt.widgets.Button applyButton
private final org.eclipse.swt.widgets.Button newButton
private final org.eclipse.swt.widgets.Button abortButton
private final org.eclipse.swt.widgets.Button prevButton
private final org.eclipse.swt.widgets.Button nextButton
private final org.eclipse.swt.widgets.Button messageButton
private final org.eclipse.swt.widgets.Button billButton
private final org.eclipse.swt.widgets.Button repaymentButton
private final org.eclipse.swt.widgets.Button paymentBehaviorButton
Constructor Detail |
---|
private ClientBookingWindow(org.eclipse.swt.widgets.Shell parent, AssociationTabControl caller)
ClientBookingWindow
instance with the given shell as
the parent shell.
parent
- Shell instance used the as parent shell of the window.caller
- AssociationTabControl
instance which called the
editing window. If editing window is called by a menu this
parameter is null.public ClientBookingWindow(org.eclipse.swt.widgets.Shell parent, ClientBooking input, AssociationTabControl caller)
parent
- the parent shell to which this window belongsinput
- the data object to be displayed in the windowClientBookingWindow(Shell, AssociationTabControl)
Method Detail |
---|
private void setInput(ClientBooking booking)
booking
- ClientBooking
instance which contains the data to
be displayed or null if a completely new record
is to be edited.private void setInputComponentsEnabled(boolean enabled)
inputEditingEnabled
to the
value of the parameter to signal that editing of the input has been
enabled or not.
enabled
- if equals true the widgets are enabled
otherwise the widgets get disabled.private void createButtonListener(org.eclipse.swt.widgets.Composite buttons, AssociationTabControl caller)
okButton
,
abortButton
, applyButton
, newButton
,
prevButton
, nextButton
.
protected boolean checkInput()
protected void commitInputToDB()
ClientBooking
instance and commits the changes / the new record
into the database.
Furthermore the member input
is set to the new values.
private boolean confirmClose()
onSave()
.
private boolean onSave()
checkInput()
), secondly invokes the
method commitInputToDB()
to commit the changes and thirdly
updates the GUI by invoking the method setInput(ClientBooking)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |