public class JDialogBuff
extends java.lang.Object
implements java.io.Serializable
This class is a serializable description of a dialog object that a server is asking a client to present.
If you don't need to send a dialog definition object across an RMI
link, you can just construct a DialogRsrc
directly.
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
cancelText |
(package private) static boolean |
debug |
(package private) java.lang.String |
imageName |
(package private) java.lang.String |
okText |
(package private) java.util.Vector |
resources |
(package private) java.lang.StringBuffer |
text |
(package private) java.lang.String |
title |
| Constructor and Description |
|---|
JDialogBuff(java.lang.String Title,
java.lang.String Text)
Constructor for JDialogBuff
|
JDialogBuff(java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel)
Constructor with special "Ok" and "Cancel" strings
|
JDialogBuff(java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel,
java.lang.String image)
Constructor with special "Ok" and "Cancel" strings
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBoolean(java.lang.String string)
Adds a labeled check box field
|
void |
addBoolean(java.lang.String string,
boolean value)
Adds a labeled check box field
|
void |
addChoice(java.lang.String label,
java.util.Vector choices)
Adds a choice field to the dialog
|
void |
addChoice(java.lang.String label,
java.util.Vector choices,
java.lang.String selectedValue)
Adds a choice field to the dialog
|
void |
addDate(java.lang.String label,
java.util.Date currentDate,
java.util.Date maxDate)
Adds a labeled date field
|
void |
addMultiString(java.lang.String string,
java.lang.String value)
Adds a labeled multi-line text field
|
void |
addPassword(java.lang.String label)
Adds a text-hidden password string field to the dialog
|
void |
addPassword(java.lang.String label,
boolean isNew)
Adds a text-hidden password string field to the dialog
|
void |
addString(java.lang.String string)
Adds a labeled text field
|
void |
addString(java.lang.String string,
java.lang.String value)
Adds a labeled text field
|
void |
appendText(java.lang.String text)
Adds a newline and the provided text to the end of the text
encoded in this dialog.
|
DialogRsrc |
extractDialogRsrc(java.awt.Frame frame,
java.lang.Class refClass)
frame is an AWT Frame that can be used to format graphics
for.
|
java.lang.String |
getImageName()
public accessor for our imageName, if we have one.
|
java.lang.String |
getText()
This is a convenience function for the server.
|
static final boolean debug
java.lang.String title
java.lang.StringBuffer text
java.lang.String okText
java.lang.String cancelText
java.lang.String imageName
java.util.Vector resources
public JDialogBuff(java.lang.String Title,
java.lang.String Text)
Title - String for title of Dialog box.Text - String for message at top of dialog box.public JDialogBuff(java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel)
Title - String for title of Dialog box.Text - String for message at top of dialog box.OK - String for Ok buttonCancel - String for Cancel buttonpublic JDialogBuff(java.lang.String Title,
java.lang.String Text,
java.lang.String OK,
java.lang.String Cancel,
java.lang.String image)
Title - String for title of Dialog box.Text - String for message at top of dialog box.OK - String for Ok buttonCancel - String for Cancel buttonimage - Filename of image to display next to textpublic DialogRsrc extractDialogRsrc(java.awt.Frame frame, java.lang.Class refClass)
frame is an AWT Frame that can be used to format graphics for.
refClass, if not null, serves is used as a reference point for finding the image resources specified by this JDialogBuff. The imageName will be looked for from the same place (a jar file or a classpath directory) that the refClass was pulled from. If refClass belongs to a Java package, the image will be looked for relative to that package in the jar file or classpath directory from which refClass was loaded.
If refClass is null, the class of the frame passed in will be used as the reference class. This is only useful if the frame is a custom subclass located in the jar or classpath directory from which we wish to load the image.
public void addString(java.lang.String string)
Adds a labeled text field
string - String to use as the labelpublic void addString(java.lang.String string,
java.lang.String value)
Adds a labeled text field
string - String to use as the labelvalue - Initial value for stringpublic void addMultiString(java.lang.String string,
java.lang.String value)
Adds a labeled multi-line text field
string - String to use as the labelvalue - Initial value for stringpublic void addBoolean(java.lang.String string)
Adds a labeled check box field
string - String to use as the labelpublic void addBoolean(java.lang.String string,
boolean value)
Adds a labeled check box field
string - String to use as the labelvalue - Initial valuepublic void addDate(java.lang.String label,
java.util.Date currentDate,
java.util.Date maxDate)
Adds a labeled date field
label - String to use as the labelcurrentDate - Date to initialize the date field tomaxDate - Latest date that the user may choose for this field.public void addChoice(java.lang.String label,
java.util.Vector choices)
Adds a choice field to the dialog
label - String to use as the labelchoices - Vector of Strings to add to the choicepublic void addChoice(java.lang.String label,
java.util.Vector choices,
java.lang.String selectedValue)
Adds a choice field to the dialog
label - String to use as the labelchoices - Vector of Strings to add to the choicepublic void addPassword(java.lang.String label)
Adds a text-hidden password string field to the dialog
label - String to use as labelpublic void addPassword(java.lang.String label,
boolean isNew)
Adds a text-hidden password string field to the dialog
label - String to use as labelisNew - If true, the password field added to this dialog
definition will be doubled to prompt the user to enter the
password twice for initial validation. If false, the user will
only have to enter his password once.public void appendText(java.lang.String text)
Adds a newline and the provided text to the end of the text encoded in this dialog.
public java.lang.String getText()
This is a convenience function for the server.
public java.lang.String getImageName()