Class BaseDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
DialogWithButtons

public class BaseDialog extends JDialog
A dialog that loads the size and location from the props file automatically.

Calling code needs to dispose the dialog manually or enable automatic disposal:
 BaseDialog dialog = new ...
 dialog.setDefaultCloseOperation(BaseDialog.DISPOSE_ON_CLOSE);
 
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
  • Constructor Details

    • BaseDialog

      public BaseDialog()
      Creates a modeless dialog without a title and without a specified Frame owner.
    • BaseDialog

      public BaseDialog(Dialog owner)
      Creates a modeless dialog without a title with the specified Dialog as its owner.
      Parameters:
      owner - the owning dialog
    • BaseDialog

      public BaseDialog(Dialog owner, Dialog.ModalityType modality)
      Creates a dialog with the specified owner Dialog and modality.
      Parameters:
      owner - the owning dialog
      modality - the type of modality
    • BaseDialog

      public BaseDialog(Dialog owner, String title)
      Creates a modeless dialog with the specified title and with the specified owner dialog.
      Parameters:
      owner - the owning dialog
      title - the title of the dialog
    • BaseDialog

      public BaseDialog(Dialog owner, String title, Dialog.ModalityType modality)
      Creates a dialog with the specified title, modality and the specified owner Dialog.
      Parameters:
      owner - the owning dialog
      title - the title of the dialog
      modality - the type of modality
    • BaseDialog

      public BaseDialog(Frame owner)
      Creates a modeless dialog without a title with the specified Frame as its owner.
      Parameters:
      owner - the owning frame
    • BaseDialog

      public BaseDialog(Frame owner, boolean modal)
      Creates a dialog with the specified owner Frame, modality and an empty title.
      Parameters:
      owner - the owning frame
      modal - whether the dialog is modal or not
    • BaseDialog

      public BaseDialog(Frame owner, String title)
      Creates a modeless dialog with the specified title and with the specified owner frame.
      Parameters:
      owner - the owning frame
      title - the title of the dialog
    • BaseDialog

      public BaseDialog(Frame owner, String title, boolean modal)
      Creates a dialog with the specified owner Frame, modality and title.
      Parameters:
      owner - the owning frame
      title - the title of the dialog
      modal - whether the dialog is modal or not
  • Method Details

    • initialize

      protected void initialize()
      For initializing members.
    • initGUI

      protected void initGUI()
      For initializing the GUI.
    • finishInit

      protected void finishInit()
      finishes the initialization, by setting size/location.
    • beforeShow

      protected void beforeShow()
      Hook method just before the dialog is made visible.
    • afterShow

      protected void afterShow()
      Hook method just after the dialog was made visible.
    • beforeHide

      protected void beforeHide()
      Hook method just before the dialog is hidden.
    • afterHide

      protected void afterHide()
      Hook method just after the dialog was hidden.
    • setVisible

      public void setVisible(boolean value)
      closes/shows the dialog.
      Overrides:
      setVisible in class Dialog
      Parameters:
      value - if true then display the dialog, otherwise close it