All Packages Class Hierarchy This Package Previous Next Index
Class distans.CCDBean
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----distans.CCDBean
- public class CCDBean
- extends Dialog
The CCDBean class is a window dialog used to prompt the user for
an String and/or an "yes" or "no".
A CCDBean is shown (and recieves all the user input as it is modal)
as long as the user have not clicked the Ok or Cancel button or the closewindow button.
-
button1
-
-
button2
-
-
CCDOk
- Indicates wheather the user clicked the Ok or the Cancel button.
-
info
-
-
input
- Indicates wheater input (as a String) is to be taken or not.
-
inputField
-
-
label1
-
-
theText
- The text that is shown to the user.
-
CCDBean(Frame)
- Constructor.
-
button1_ActionPerformed(ActionEvent)
- The Ok button was clicked.
-
button2_ActionPerformed(ActionEvent)
- The Cancel button was clicked.
-
getText()
-
-
inputField_EnterHit(ActionEvent)
- Checks that there is input set if input is required.
-
Ok()
-
-
setInput(boolean)
- Sets the (user)input variable to true or false.
-
setText(String)
- Sets the text to be shown to the user.
-
show()
- Sets the variables to their values/states when the window is about to be shown.
CCDOk
protected boolean CCDOk
- Indicates wheather the user clicked the Ok or the Cancel button.
input
private boolean input
- Indicates wheater input (as a String) is to be taken or not.
theText
private String theText
- The text that is shown to the user. It is a question or a request.
inputField
TextField inputField
label1
Label label1
button1
Button button1
info
Label info
button2
Button button2
CCDBean
public CCDBean(Frame father)
- Constructor. Initiates the graphical components.
setText
public void setText(String text)
- Sets the text to be shown to the user.
getText
public String getText()
- Returns:
- the text that the user has typed.
Ok
public boolean Ok()
- Returns:
- CCDOk, which is true if the user clicked the Ok button and false if the user clicked the Cancel button.
setInput
public void setInput(boolean state)
- Sets the (user)input variable to true or false.
- Parameters:
- state - the state that input is set to.
show
public void show()
- Sets the variables to their values/states when the window is about to be shown.
Then shows the dialog by calling super.
- Overrides:
- show in class Dialog
inputField_EnterHit
void inputField_EnterHit(ActionEvent event)
- Checks that there is input set if input is required.
If it is all right it sets CCDOk to true (Ok was clicked...) and hides the dialog.
button1_ActionPerformed
void button1_ActionPerformed(ActionEvent event)
- The Ok button was clicked.
Does the same as inputField_EnterHit.
button2_ActionPerformed
void button2_ActionPerformed(ActionEvent event)
- The Cancel button was clicked.
Sets CCDOk to false and hides the dialog.
All Packages Class Hierarchy This Package Previous Next Index