Package com.nomagic.magicdraw.ui.dialogs
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 Summary
Modifier and TypeMethodDescriptionReturns owner window(dialog or frame) for dialogsgetDialogOwner
(Component invoker) Returns parent window(dialog or frame) for a dialog which will be invoked by given componentDeprecated.getDialogParent
(boolean useFake) Method returns the frame used for dialogs as parent.static MDDialogParentProvider
static void
Hides fake parentvoid
setDialogParent
(Window parent) Sets the parent for dialogs those will be created in future.
-
Method Details
-
getProvider
- Returns:
- instance of provider
-
getDialogParent
Deprecated.usegetDialogOwner()
. 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 interfaceDialogParentProvider
- Returns:
- parent
-
getDialogOwner
Description copied from interface:DialogParentProvider
Returns owner window(dialog or frame) for dialogs- Specified by:
getDialogOwner
in interfaceDialogParentProvider
- Returns:
- owner window
-
getDialogOwner
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 interfaceDialogParentProvider
- Parameters:
invoker
- invoker component- Returns:
- owner window of invoker component
-
getDialogParent
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
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
-
getDialogOwner()
.