|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsemorg.gui.CompanyInternalPresentationWindow
public class CompanyInternalPresentationWindow
The window for editing new or existing company internal presentation records.
Nested Class Summary | |
---|---|
(package private) class |
CompanyInternalPresentationWindow.InputChangedListener
Inner class which provides a listener reacting on changes of the input in the CompanyInternalPresentationWindow . |
Field Summary | |
---|---|
private org.eclipse.swt.widgets.Button |
abortButton
|
private org.eclipse.swt.widgets.Combo |
annexCombo
|
private org.eclipse.swt.widgets.Button |
applyButton
|
private CalendarControl |
beginningDayCalendar
|
private AssociationTabControl |
bookingControl
The control widget to manage the association between CompanyInternalPresentation and CompanyBooking . |
private org.eclipse.swt.widgets.Button |
cancelationButton
The button to cancel a presentation (not implemented). |
private org.eclipse.swt.widgets.Button |
cancelChecker
|
private org.eclipse.swt.widgets.Button |
certificateButton
The button to create the certificates (not implemented). |
private org.eclipse.swt.widgets.Text |
cityText
|
private org.eclipse.swt.widgets.Combo |
countryCombo
|
private org.eclipse.swt.widgets.Text |
durationText
|
private CalendarControl |
endingDayCalendar
|
private TimeControl |
endingTimeSpinner
|
private org.eclipse.swt.widgets.Button |
feeMessageButton
The button to create fee messages (not implemented). |
private TimeControl |
firstStartingTimeSpinner
|
private CompanyInternalPresentation |
input
Holds the data of the actual displayed CompanyBookingWindow
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 CompanyInternalPresentationWindow.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 AssociationTabControl |
instructorControl
The control widget to manage the association instructor. |
private TimeControl |
lastEndingTimeSpinner
|
private org.eclipse.swt.widgets.Button |
listOfParticipantsButton
The button for getting the the list of participants (not implemented). |
private org.eclipse.swt.widgets.Text |
locationText
|
private org.eclipse.swt.widgets.Text |
maxEntrantsText
|
private org.eclipse.swt.widgets.Text |
maxSemTypeEntrantsText
|
private org.eclipse.swt.widgets.Text |
minSemTypeEntrantsText
|
private org.eclipse.swt.widgets.Button |
newButton
|
private org.eclipse.swt.widgets.Button |
nextButton
|
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.Text |
packagePriceText
|
private org.eclipse.swt.widgets.Button |
prevButton
|
private ForeignKeyConstraintSelector |
semTypeSelector
The control widget to manage the mandatory association between presentation and seminartype. |
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 TimeControl |
startingTimeSpinner
|
private org.eclipse.swt.widgets.Text |
streetText
|
private AssociationTabControl |
supervisorControl
The control widget to manage the association supervisor. |
private int |
titleBarHeight
The height of the title bar. |
private org.eclipse.swt.widgets.Text |
zipCodeText
|
Constructor Summary | |
---|---|
private |
CompanyInternalPresentationWindow(org.eclipse.swt.widgets.Shell parent)
Creates a CompanyInternalPresentationWindow instance with the
given shell as the parent shell. |
|
CompanyInternalPresentationWindow(org.eclipse.swt.widgets.Shell parent,
CompanyInternalPresentation input,
AssociationTabControl caller)
Creates an instance of this class, sets the input and finally opens it. |
|
CompanyInternalPresentationWindow(org.eclipse.swt.widgets.Shell parent,
CompanyInternalPresentation input,
ForeignKeyConstraintSelector 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 CompanyInternalPresentation record are entered into the window
form and if the entered fees are correct float numbers. |
protected void |
commitInputToDB()
Reads the data from the window form elements, sets the values to a CompanyInternalPresentation 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(AssociationTabControl caller)
Adds a listener to several buttons of the window form. |
private void |
createButtonListener(ForeignKeyConstraintSelector 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(CompanyInternalPresentation presentation)
Loads a given CompanyInternalPresentation 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 CompanyInternalPresentation input
CompanyBookingWindow
record. If a new record is entered it is set to null until the
changes have been committed.
private boolean settingInput
input
) is to be set into the window form, otherwise
false.
private boolean inputChanged
private boolean inputEditingEnabled
private CompanyInternalPresentationWindow.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 org.eclipse.swt.widgets.Text durationText
private final CalendarControl beginningDayCalendar
private final CalendarControl endingDayCalendar
private final TimeControl startingTimeSpinner
private final TimeControl endingTimeSpinner
private final TimeControl firstStartingTimeSpinner
private final TimeControl lastEndingTimeSpinner
private final org.eclipse.swt.widgets.Text locationText
private final org.eclipse.swt.widgets.Text streetText
private final org.eclipse.swt.widgets.Text zipCodeText
private final org.eclipse.swt.widgets.Text cityText
private final org.eclipse.swt.widgets.Combo countryCombo
private final org.eclipse.swt.widgets.Combo annexCombo
private final org.eclipse.swt.widgets.Button cancelChecker
private final ForeignKeyConstraintSelector semTypeSelector
private final org.eclipse.swt.widgets.Text packagePriceText
private final org.eclipse.swt.widgets.Text minSemTypeEntrantsText
private final org.eclipse.swt.widgets.Text maxSemTypeEntrantsText
private org.eclipse.swt.widgets.Text maxEntrantsText
private AssociationTabControl supervisorControl
private AssociationTabControl instructorControl
private AssociationTabControl bookingControl
CompanyInternalPresentation
and CompanyBooking
.
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 listOfParticipantsButton
private final org.eclipse.swt.widgets.Button certificateButton
private final org.eclipse.swt.widgets.Button feeMessageButton
private final org.eclipse.swt.widgets.Button cancelationButton
Constructor Detail |
---|
private CompanyInternalPresentationWindow(org.eclipse.swt.widgets.Shell parent)
CompanyInternalPresentationWindow
instance with the
given shell as the parent shell.
parent
- Shell instance used the as parent shell of the
CompanyInternalPresentationWindow
public CompanyInternalPresentationWindow(org.eclipse.swt.widgets.Shell parent, CompanyInternalPresentation input, AssociationTabControl caller)
parent
- the parent shell to which this window belongsinput
- the data object to be displayed in the windowcaller
- the AssociationTabControl
instance which calls the
constructor.public CompanyInternalPresentationWindow(org.eclipse.swt.widgets.Shell parent, CompanyInternalPresentation input, ForeignKeyConstraintSelector caller)
parent
- the parent shell to which this window belongsinput
- the data object to be displayed in the windowcaller
- the ForeignKeyConstraintSelector
instance which
calls the constructor.Method Detail |
---|
private void setInput(CompanyInternalPresentation presentation)
CompanyInternalPresentation
record into the window
form of initialize the elements of the form the empty string/null if no
data is given.
presentation
- CompanyInternalPresentation
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(AssociationTabControl caller)
okButton
,
abortButton
, applyButton
, newButton
,
prevButton
, nextButton
.
caller
- AssociationTabControl
instance which called the
constructor which itself calls this method.private void createButtonListener(ForeignKeyConstraintSelector caller)
okButton
,
abortButton
, applyButton
, newButton
,
prevButton
, nextButton
.
caller
- ForeignKeyConstraintSelector
instance which called
the constructor which itself calls this method.protected boolean checkInput()
CompanyInternalPresentation
record are entered into the window
form and if the entered fees are correct float numbers.
Utility.isCorrectFloat(String)
,
Utility.isCorrectInteger(String)
protected void commitInputToDB()
CompanyInternalPresentation
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(CompanyInternalPresentation)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |