org.browsecode.helpers.dialogs
Class Dialogs
java.lang.Object
org.browsecode.helpers.dialogs.Dialogs
public class Dialogs
- extends java.lang.Object
Constructor Summary |
Dialogs()
|
Dialogs(java.awt.Component parentComponent)
This works like the one with the frame, except it'll find the parent frame. |
Dialogs(java.awt.Dialog dialog)
|
Dialogs(java.awt.Frame frame)
|
Method Summary |
java.awt.Color |
askColor(java.lang.String dialogTitle,
java.awt.Color initialColor)
|
int |
askMultipleChoice(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices)
|
int |
askMultipleChoice(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices,
int defaultSelection)
|
java.lang.String |
askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices)
|
java.lang.String |
askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices,
int defaultSelection)
|
java.lang.String |
askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector choices)
|
java.lang.String |
askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector choices,
int defaultSelection)
|
java.lang.String |
askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector choices,
java.lang.String defaultSelection)
|
java.lang.Integer |
askNumberQuestion(java.lang.String question,
java.lang.String dialogTitle,
int defaultAnswer)
|
java.lang.String |
askPasswordQuestion(java.lang.String question)
|
java.lang.String |
askPasswordQuestion(java.lang.String question,
java.lang.String dialogTitle)
|
java.lang.String |
askTextComboBox(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector comboBoxAnswers,
java.lang.String defaultAnswer)
|
java.lang.String |
askTextQuestion(java.lang.String question)
|
java.lang.String |
askTextQuestion(java.lang.String question,
java.lang.String dialogTitle)
|
java.lang.String |
askTextQuestion(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String defaultAnswer)
|
java.lang.String |
askTextQuestion(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String defaultAnswer,
int allowWhat)
|
boolean |
askYesNo(java.lang.String question,
java.lang.String actionItem)
|
boolean |
askYesNo(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText)
|
boolean |
askYesNo(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText,
boolean modal)
|
boolean |
askYesNo(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText,
boolean modal,
boolean yesButtonDefault)
|
int |
askYesNoCancel(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText)
|
int |
askYesNoCancel(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText,
boolean noButtonIsDefault)
|
void |
doAlertDialog(java.lang.String title,
javax.swing.JComponent innerComponent)
|
void |
doAlertDialog(java.lang.String title,
javax.swing.JComponent innerComponent,
int modality,
java.awt.Dimension size)
|
void |
doAlertDialog(java.lang.String message,
java.lang.String title)
|
void |
doAlertDialog(java.lang.String message,
java.lang.String title,
int modality)
|
boolean |
doAlertDialogWithCheckbox(java.lang.String message,
java.lang.String checkboxLabel,
boolean checkboxChecked,
java.lang.String title)
|
boolean |
doAlertDialogWithCheckbox(java.lang.String message,
java.lang.String checkboxLabel,
boolean checkboxChecked,
java.lang.String title,
boolean modal)
|
javax.swing.JColorChooser |
getColorChooser()
|
java.awt.Frame |
getFrameIn()
|
static void |
main(java.lang.String[] args)
|
void |
setFrameIn(java.awt.Frame frame)
|
ProgressDialog |
startModalProgressDialog(java.lang.String question,
java.lang.String dialogTitle,
int maxValue)
|
ProgressDialog |
startProgressDialog(java.lang.String question,
java.lang.String dialogTitle,
int maxValue)
|
ProgressDialog |
startProgressDialog(java.lang.String question,
java.lang.String dialogTitle,
int maxValue,
boolean modal)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MODALITY_WAIT
public static final int MODALITY_WAIT
- See Also:
- Constant Field Values
MODALITY_WAIT_IN_THREAD
public static final int MODALITY_WAIT_IN_THREAD
- See Also:
- Constant Field Values
MODALITY_RETURN_IMMEDIATELY
public static final int MODALITY_RETURN_IMMEDIATELY
- See Also:
- Constant Field Values
YES
public static final int YES
- See Also:
- Constant Field Values
NO
public static final int NO
- See Also:
- Constant Field Values
CANCEL
public static final int CANCEL
- See Also:
- Constant Field Values
ALTERNATIVE_BUTTON
public static final int ALTERNATIVE_BUTTON
- See Also:
- Constant Field Values
ALLOW_ANYTHING
public static final int ALLOW_ANYTHING
- See Also:
- Constant Field Values
ALLOW_LETTERS_AND_NUMBERS_ONLY
public static final int ALLOW_LETTERS_AND_NUMBERS_ONLY
- See Also:
- Constant Field Values
ALLOW_NUMBERS_ONLY
public static final int ALLOW_NUMBERS_ONLY
- See Also:
- Constant Field Values
Dialogs
public Dialogs(java.awt.Frame frame)
Dialogs
public Dialogs()
Dialogs
public Dialogs(java.awt.Component parentComponent)
- This works like the one with the frame, except it'll find the parent frame.
- Parameters:
card
-
Dialogs
public Dialogs(java.awt.Dialog dialog)
askMultipleChoice
public int askMultipleChoice(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices)
getColorChooser
public javax.swing.JColorChooser getColorChooser()
askColor
public java.awt.Color askColor(java.lang.String dialogTitle,
java.awt.Color initialColor)
askMultipleChoice
public int askMultipleChoice(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices,
int defaultSelection)
askMultipleChoiceAndOther
public java.lang.String askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices,
int defaultSelection)
askMultipleChoiceAndOther
public java.lang.String askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector choices)
askMultipleChoiceAndOther
public java.lang.String askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector choices,
java.lang.String defaultSelection)
askMultipleChoiceAndOther
public java.lang.String askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector choices,
int defaultSelection)
askMultipleChoiceAndOther
public java.lang.String askMultipleChoiceAndOther(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String[] choices)
startProgressDialog
public ProgressDialog startProgressDialog(java.lang.String question,
java.lang.String dialogTitle,
int maxValue)
startProgressDialog
public ProgressDialog startProgressDialog(java.lang.String question,
java.lang.String dialogTitle,
int maxValue,
boolean modal)
startModalProgressDialog
public ProgressDialog startModalProgressDialog(java.lang.String question,
java.lang.String dialogTitle,
int maxValue)
askTextQuestion
public java.lang.String askTextQuestion(java.lang.String question)
askTextQuestion
public java.lang.String askTextQuestion(java.lang.String question,
java.lang.String dialogTitle)
askTextQuestion
public java.lang.String askTextQuestion(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String defaultAnswer)
askTextQuestion
public java.lang.String askTextQuestion(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String defaultAnswer,
int allowWhat)
- Parameters:
question
- dialogTitle
- defaultAnswer
- keyListener
- for validating keypresses if you want to.
- Returns:
askTextComboBox
public java.lang.String askTextComboBox(java.lang.String question,
java.lang.String dialogTitle,
java.util.Vector comboBoxAnswers,
java.lang.String defaultAnswer)
askNumberQuestion
public java.lang.Integer askNumberQuestion(java.lang.String question,
java.lang.String dialogTitle,
int defaultAnswer)
askPasswordQuestion
public java.lang.String askPasswordQuestion(java.lang.String question,
java.lang.String dialogTitle)
askPasswordQuestion
public java.lang.String askPasswordQuestion(java.lang.String question)
doAlertDialog
public void doAlertDialog(java.lang.String message,
java.lang.String title)
doAlertDialog
public void doAlertDialog(java.lang.String message,
java.lang.String title,
int modality)
doAlertDialog
public void doAlertDialog(java.lang.String title,
javax.swing.JComponent innerComponent)
doAlertDialog
public void doAlertDialog(java.lang.String title,
javax.swing.JComponent innerComponent,
int modality,
java.awt.Dimension size)
doAlertDialogWithCheckbox
public boolean doAlertDialogWithCheckbox(java.lang.String message,
java.lang.String checkboxLabel,
boolean checkboxChecked,
java.lang.String title)
- Parameters:
message
- checkboxLabel
- title
-
- Returns:
- true if the checkbox is checked, false if it is not (if the user clicks ok)
doAlertDialogWithCheckbox
public boolean doAlertDialogWithCheckbox(java.lang.String message,
java.lang.String checkboxLabel,
boolean checkboxChecked,
java.lang.String title,
boolean modal)
- Parameters:
message
- checkboxLabel
- title
-
- Returns:
- true if the checkbox is checked, false if it is not (if the user clicks ok)
askYesNo
public boolean askYesNo(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText)
askYesNo
public boolean askYesNo(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText,
boolean modal)
- Parameters:
question
- dialogTitle
- yesButtonText
- noButtonText
- modal
- -- if not modal, it will wait as a thread until it's done.
- Returns:
askYesNo
public boolean askYesNo(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText,
boolean modal,
boolean yesButtonDefault)
askYesNoCancel
public int askYesNoCancel(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText)
askYesNoCancel
public int askYesNoCancel(java.lang.String question,
java.lang.String dialogTitle,
java.lang.String yesButtonText,
java.lang.String noButtonText,
boolean noButtonIsDefault)
askYesNo
public boolean askYesNo(java.lang.String question,
java.lang.String actionItem)
getFrameIn
public java.awt.Frame getFrameIn()
setFrameIn
public void setFrameIn(java.awt.Frame frame)
- Parameters:
frame
-
main
public static final void main(java.lang.String[] args)