Class JMTDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
BalkingStrategyEditor, DistributionsEditor, LDEditingWindow, LDHelpDialog, LDStrategyEditor, LoadDependentRoutingEditor, PAProgressWindow

public class JMTDialog extends JDialog

Name: JMTDialog

Description: A generic dialog with some enhancements to be used by JMT

Date: 24/gen/07 Time: 17:45:51

Version:
1.0
Author:
Bertoli Marco
See Also:
  • Field Details

  • Constructor Details

    • JMTDialog

      public JMTDialog()
      Builds a non-modal JMTDialog
    • JMTDialog

      public JMTDialog(Frame owner, boolean modal)
      Builds a new JMTDialog
      Parameters:
      owner - owner frame (can be null if modal is false)
      modal - true if dialog is modal (ie blocks owner frame)
    • JMTDialog

      public JMTDialog(Dialog owner, boolean modal)
      Builds a new JMTDialog
      Parameters:
      owner - owner dialog (can be null if modal is false)
      modal - true if dialog is modal (ie blocks owner frame)
  • Method Details

    • canBeClosed

      public boolean canBeClosed()
      Returns:
      true iff this frame can be closed. Please override this method to create save on exit behaviours
    • centerWindow

      public void centerWindow()
      Centers this window on the screen
    • moveToLowerRightCorner

      public void moveToLowerRightCorner()
      Puts this window in screen lower right corner
    • centerWindow

      public void centerWindow(int width, int height)
      Sets size of this window and centers it on the page
      Parameters:
      width - width of the window
      height - height of the window
    • centerWindowWithOffset

      public void centerWindowWithOffset(int width, int height, int xOffsetFromCenter, int yOffsetFromCenter)
      Sets size of this window and centers it on the page taking into account the specified offset from the center
      Parameters:
      width - width of the window
      height - height of the window
      xOffsetFromCenter - the offset from the center on the x coordinate
      yOffsetFromCenter - the offset from the center on the y coordinate
    • close

      public final boolean close()
      Closes this window. (after checking if window can be closed).
      Returns:
      true if window was closed, false otherwise
      See Also:
    • doClose

      protected void doClose()
      Override this method to implement a custom behaviour before windows dispose
      See Also:
    • setDefaultCloseOperation

      public void setDefaultCloseOperation(int operation)
      Sets default operation to be performed when what-if window is closed.
      Overrides:
      setDefaultCloseOperation in class JDialog
      See Also: