Class MDDialogParentProvider

java.lang.Object
com.nomagic.magicdraw.ui.dialogs.MDDialogParentProvider
All Implemented Interfaces:
DialogParentProvider

@OpenApiAll public final class MDDialogParentProvider extends Object implements DialogParentProvider
Parent provider for the dialogs used in MagicDraw
  • Method Details

    • getProvider

      public static MDDialogParentProvider getProvider()
      Returns:
      instance of provider
    • getDialogParent

      @Deprecated public Frame getDialogParent()
      Deprecated.
      use getDialogOwner(). Frame is not always a good choice to pass as parent. Parent sometimes should be another dialog, not just a frame.
      Returns parent frame for dialogs.
      Specified by:
      getDialogParent in interface DialogParentProvider
      Returns:
      parent
    • getDialogOwner

      public Window getDialogOwner()
      Description copied from interface: DialogParentProvider
      Returns owner window(dialog or frame) for dialogs
      Specified by:
      getDialogOwner in interface DialogParentProvider
      Returns:
      owner window
    • getDialogOwner

      public Window getDialogOwner(@CheckForNull Component invoker)
      Description copied from interface: DialogParentProvider
      Returns parent window(dialog or frame) for a dialog which will be invoked by given component
      Specified by:
      getDialogOwner in interface DialogParentProvider
      Parameters:
      invoker - invoker component
      Returns:
      owner window of invoker component
    • getDialogParent

      @CheckForNull public Frame getDialogParent(boolean useFake)
      Method returns the frame used for dialogs as parent. If there is no parent returns null.
      Parameters:
      useFake - true return fake parent if there is no real parent.
      Returns:
      dialog parent frame.
    • setDialogParent

      public void setDialogParent(@CheckForNull Window parent)
      Sets the parent for dialogs those will be created in future.
      Parameters:
      parent - the new dialog's parent.
    • hideFakeParent

      public static void hideFakeParent()
      Hides fake parent