| |
|
| java.awt.Dialog javax.swing.JDialog com.jeta.open.gui.framework.JETADialog
All known Subclasses: com.jeta.swingbuilder.gui.components.TSErrorDialog2,
JETADialog | public class JETADialog extends JDialog (Code) | | This is a base class for all dialogs in the system. It provides a skeleton
dialog box with a cancel and ok button. Callers can add their own containers
to this dialog's content panel. This class also supports validators for the
dialog. This allows the dialog to validate the input and if validation fails,
maintain the dialog on the screen. See
com.jeta.open.rules.JETARule .
author: Jeff Tassin |
Inner Class :static class ValidatorRule | |
ID_BUTTON_PANEL | final public static String ID_BUTTON_PANEL(Code) | | The name of the button panel.
|
ID_OK | final public static String ID_OK(Code) | | The names of the ok and cancel buttons.
|
JETADialog | public JETADialog(Dialog owner, boolean bModal)(Code) | | ctor
|
JETADialog | public JETADialog(Frame owner, boolean bModal)(Code) | | ctor
|
_initialize | protected void _initialize()(Code) | | Initializes the components on this dialog
|
actionPerformed | public boolean actionPerformed(String commandId, ActionEvent evt)(Code) | | Forwarded from the view when an action occurs.
Parameters: commandId - the name of the action associated with the event Parameters: evt - the action event true if the controller handled the action |
addController | public void addController(JETAController controller)(Code) | | Adds a controller to the list of controllers that can handle events for
this dialog. When an menu or toolbar event occurs, the event is routed to
each controller added to this frame. Once a controller is found that
handles the event, the event routing is considered complete and no other
controllers are evaluated.
Parameters: controller - the controller to add |
addDialogListener | public void addDialogListener(JETADialogListener listener)(Code) | | Adds a listener to the list of listeners for this dialog
|
addValidator | public void addValidator(JETARule validator)(Code) | | This adds a rule that will be used to validate the user input for this
dialog. The validate method is called on each of these rules when the
user hits the ok button. If any rule fails validation, an error message
appears and the dialog will not close.
|
addValidator | public void addValidator(Object parameter, JETARule validator)(Code) | | This adds a rule that will be used to validate the user input for this
dialog. The validate method is called on each of these validators when
the user hits the ok button. If any rule fails validation, an error
message appears and the dialog will not close.
Parameters: parameter - a parameter to pass to the validator. If this object is anObject[] type, then it is passed directly to the validator. Parameters: validator - the rule to add to this dialog. |
cmdCancel | public void cmdCancel()(Code) | | Closes the dialog
|
cmdOk | public void cmdOk()(Code) | | Close the dialog and set the ok flag
|
dispose | public void dispose()(Code) | | Dispose the dialog
|
getButtonPanel | public JPanel getButtonPanel()(Code) | | the panel at the bottom of this dialog that contains the ok andcancel buttons |
getCloseButton | public JButton getCloseButton()(Code) | | the close button for this dialog |
getDialogContentPanel | public Container getDialogContentPanel()(Code) | | the content container for this dialog. Callers add their controlsto this container. |
getHelpButton | public JButton getHelpButton()(Code) | | the Help button for this dialog Normally, this button is notvisible. |
getOkButton | public JButton getOkButton()(Code) | | the Ok button for this dialog |
getPreferredSize | public Dimension getPreferredSize()(Code) | | Returns the preferred size for this dialog. This includes the title bar
height, border height,width, and ok/cancel button heights. This dialog
also gets the preferred size of the content panel, so you need to
correctly set the preferred size in any content panel you set for this
dialog.
the preferred size for this dialog so that the caller can sizethe window properly |
getPreferredSize | protected Dimension getPreferredSize(Dimension contentDims)(Code) | | Returns the preferred size for this dialog. The size is calculated
assuming the that dimensions of the main content panel are passed in by
the caller. The content panel dimensions are added to the title bar
height, border height,width, and ok/cancel button heights.
the preferred size for this dialog so that the caller can sizethe window properly |
getPrimaryPanel | public Component getPrimaryPanel()(Code) | | the one and only panel for this dialog. The panel must have beenset previously by calling setPrimaryPanel. |
isOk | public boolean isOk()(Code) | | true if the user clicked the Ok button to close the dialog. |
removeAllControllers | public void removeAllControllers()(Code) | | Removes all registered controllers added to this dialog
|
setButtonPanelVisible | public void setButtonPanelVisible(boolean bvis)(Code) | | Shows/Hides the button panel on this dialog.
|
setCancelEnabled | public void setCancelEnabled(boolean bCancel)(Code) | | Enables/Disables the cancel command
|
setCloseText | public void setCloseText(String txt)(Code) | | Sets the text for the close button
|
setController | public void setController(JETAController controller)(Code) | | Sets the controller that will handle events for this dialog
|
setFont | public void setFont(Font f)(Code) | | Sets the font for the ok and close buttons on this dialog
Parameters: f - the new font to set |
setInitialFocusComponent | public void setInitialFocusComponent(JComponent comp)(Code) | | Sets the component in this frame that will have initial focus.
Parameters: comp - the component that gets initial focus when dialog is displayed |
setOk | protected void setOk(boolean bok)(Code) | | Sets the Ok flag
|
setOkText | public void setOkText(String txt)(Code) | | Sets the text for the ok button
|
setPrimaryPanel | public void setPrimaryPanel(JComponent primaryPanel)(Code) | | Sets the one and only panel for this dialog
|
setTitle | public void setTitle(String title)(Code) | | Sets the title to the frame
|
showCenter | public void showCenter()(Code) | | Shows the dialog in the center of the screen
|
showOkButton | public void showOkButton(boolean bvis)(Code) | | Shows/hides the ok button
|
updateComponents | public void updateComponents(java.util.EventObject evt)(Code) | | Updates the components in the dialog based on the model state.
|
validateListeners | protected boolean validateListeners()(Code) | | Iterates through the list of listeners and allows them to process the
inputs. For example, the user may be inputing parameters for a databse.
We would like to perform the database operation. If the operation fails,
we would like the dialog to remain on the screen so the user can make any
appropriate adjustments to the dialog data. This is the purpose of the
JETADialogListeners.
|
validateValidators | protected boolean validateValidators()(Code) | | Iterates through the list of controller validators and allows them to
validate the input for this dialog. If any controller fails validation,
then we show an error message and return false.
|
Fields inherited from java.awt.Dialog | final public static ModalityType DEFAULT_MODALITY_TYPE(Code)(Java Doc)
|
|
|
|