# Class InteractionDialog

java.lang.Object
com.codename1.ui.Component
com.codename1.ui.Container
com.codename1.components.InteractionDialog

All Implemented Interfaces:
  `AbstractDialog, Animation, Editable, StyleListener, Iterable<Component>`

public class InteractionDialog extends Container implements AbstractDialog

Unlike a regular dialog the interaction dialog only looks like a dialog, it resides in the layered pane and can be used to implement features where interaction with the background form is still required.

Since this code is designed for interaction all "dialogs" created thru here are modless and never block.

    InteractionDialog dlg = new InteractionDialog("Hello");
    dlg.setLayout(new BorderLayout());
    dlg.add(BorderLayout.CENTER, new Label("Hello Dialog"));
    Button close = new Button("Close");
    close.addActionListener((ee) -> dlg.dispose());
    dlg.addComponent(BorderLayout.SOUTH, close);
    Dimension pre = dlg.getContentPane().getPreferredSize();
    dlg.show(0, 0, Display.getInstance().getDisplayWidth() - (pre.getWidth() + pre.getWidth() / 6), 0);

- ## Field Summary

  ### Fields inherited from class Component

  `BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, CROSSHAIR_CURSOR, DEFAULT_CURSOR, DRAG_REGION_IMMEDIATELY_DRAG_X, DRAG_REGION_IMMEDIATELY_DRAG_XY, DRAG_REGION_IMMEDIATELY_DRAG_Y, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, E_RESIZE_CURSOR, HAND_CURSOR, LEFT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, RIGHT, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, TOP, W_RESIZE_CURSOR, WAIT_CURSOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InteractionDialog()`
  Default constructor with no title
  `InteractionDialog(Layout l)`
  Default constructor with layout
  `InteractionDialog(String title)`
  Constructor with dialog title
  `InteractionDialog(String title, Layout l)`
  Constructor with dialog title

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addComponent(int index, Component cmp)`
  This method adds the Component at a specific index location in the Container Components array.
  `void`
  `addComponent(int index, Object constraints, Component cmp)`
  Adds a Component to the Container
  `void`
  `addComponent(Component cmp)`
  Adds a Component to the Container
  `void`
  `addComponent(Object constraints, Component cmp)`
  Adds a Component to the Container
  `void`
  `configureCommands(Command[] cmds, boolean commandsAsButtons)`
  Configures commands for the dialog UI.
  `protected void`
  `deinitialize()`
  Invoked to indicate that the component initialization is being reversed since the component was detached from the container hierarchy.
  `void`
  `dispose()`
  Removes the interaction dialog from view
  `void`
  `disposeToTheBottom()`
  Removes the interaction dialog from view with an animation to the bottom
  `void`
  `disposeToTheBottom(Runnable onFinish)`
  Removes the interaction dialog from view with an animation to the bottom
  `void`
  `disposeToTheLeft()`
  Removes the interaction dialog from view with an animation to the left
  `void`
  `disposeToTheLeft(Runnable onFinish)`
  Removes the interaction dialog from view with an animation to the left.
  `void`
  `disposeToTheRight()`
  Removes the interaction dialog from view with an animation to the right
  `void`
  `disposeToTheRight(Runnable onFinish)`
  Removes the interaction dialog from view with an animation to the right.
  `void`
  `disposeToTheTop()`
  Removes the interaction dialog from view with an animation to the top
  `void`
  `disposeToTheTop(Runnable onFinish)`
  Removes the interaction dialog from view with an animation to the top.
  `int`
  `getAnimationSpeed()`
  Duration in milliseconds used by the show, dispose and resize animations.
  `Container`
  `getContentPane()`
  Returns the body of the interaction dialog
  `Style`
  `getDialogStyle()`
  Simple getter to get the Dialog Style
  `String`
  `getDialogUIID()`
  Returns the uiid of the dialog
  `Runnable`
  `getDisposeAnimationSetup()`
  Callback invoked just before the dispose animation runs to position the dialog at the animation end state.
  `Layout`
  `getLayout()`
  Returns the layout manager responsible for arranging this container.
  `Runnable`
  `getShowAnimationSetup()`
  Callback invoked just before the show animation runs to position the dialog parent at the animation start state.
  `String`
  `getTitle()`
  Gets this dialog title text.
  `Label`
  `getTitleComponent()`
  Gets the label component used to display the title.
  `protected void`
  `initComponent()`
  Allows subclasses to bind functionality that relies on fully initialized and "ready for action" component state
  `boolean`
  `isAnimateShow()`
  Indicates whether show/dispose should be animated or not.
  `boolean`
  `isDisposeWhenPointerOutOfBounds()`
  This flag indicates if the dialog should be disposed if a pointer released event occurred out of the dialog content.
  `boolean`
  `isFormMode()`
  Selects which layered pane hosts the dialog.
  `boolean`
  `isRepositionAnimation()`
  Controls the "grow from center / shrink to center" effect used by the show/dispose animation.
  `boolean`
  `isShowing()`
  Will return true if the dialog is currently showing
  `static boolean`
  `isStackable()`
  Whether `InteractionDialog` is in the global "stackable" mode.
  `void`
  `removeAll()`
  remove all Components from container, notice that removed component might still have a pending repaint in the queue that won't be removed.
  `void`
  `removeComponent(Component cmp)`
  removes a Component from the Container, notice that removed component might still have a pending repaint in the queue that won't be removed.
  `void`
  `resize(int top, int bottom, int left, int right)`
  `void`
  `setAnimateShow(boolean animateShow)`
  Indicates whether show/dispose should be animated or not.
  `void`
  `setAnimationSpeed(int animationSpeed)`
  Sets the duration in milliseconds used by the show, dispose and resize animations, overriding the `interactionDialogSpeedInt` theme constant.
  `void`
  `setDefaultCommand(Command defaultCommand)`
  Sets the default command when supported.
  `void`
  `setDialogType(int dialogType)`
  Sets a dialog sound type (e.g. `Dialog#TYPE_INFO`).
  `void`
  `setDialogUIID(String uiid)`
  Simple setter to set the Dialog uiid
  `void`
  `setDisposeAnimationSetup(Runnable disposeAnimationSetup)`
  Sets a callback that positions the dialog at the animation end state, overriding the default dispose animation.
  `void`
  `setDisposeWhenPointerOutOfBounds(boolean disposeWhenPointerOutOfBounds)`
  This flag indicates if the dialog should be disposed if a pointer released event occurred out of the dialog content.
  `void`
  `setFormMode(boolean formMode)`
  Selects which layered pane hosts the dialog.
  `void`
  `setLayout(Layout layout)`
  Sets the layout manager responsible for arranging this container
  `void`
  `setRepositionAnimation(boolean repositionAnimation)`
  Controls the "grow from center / shrink to center" effect used by the show/dispose animation.
  `void`
  `setScrollable(boolean scrollable)`
  The equivalent of calling both setScrollableY and setScrollableX
  `void`
  `setShowAnimationSetup(Runnable showAnimationSetup)`
  Sets a callback that positions the dialog parent at the animation start state, overriding the default show animation.
  `static void`
  `setStackable(boolean stackable)`
  Opt-in robustness mode for applications that show several `InteractionDialog`s at the same time (for example a step-by-step walkthrough that highlights different components).
  `void`
  `setTimeout(long timeout)`
  Sets timeout in milliseconds after which dialog should close.
  `void`
  `setTitle(String title)`
  Sets this dialog title text.
  `void`
  `setTransitions(Transition transition)`
  No-op for `InteractionDialog`.
  `void`
  `show(int top, int bottom, int left, int right)`
  This method shows the form as a modal alert allowing us to produce a behavior of an alert/dialog box.
  `Command`
  `showDialog()`
  Shows this interaction dialog and blocks until it is disposed.
  `void`
  `showPopupDialog(Component c)`
  A popup dialog is shown with the context of a component and its selection.
  `void`
  `showPopupDialog(Component c, boolean bias)`
  A popup dialog is shown with the context of a component and its selection.
  `void`
  `showPopupDialog(Rectangle rect)`
  A popup dialog is shown with the context of a component and its selection.
  `void`
  `showPopupDialog(Rectangle rect, boolean bias)`
  A popup dialog is shown with the context of a component and its selection.

  ### Methods inherited from class Container

  `add, add, add, add, add, add, addAll, animateHierarchy, animateHierarchyAndWait, animateHierarchyFade, animateHierarchyFadeAndWait, animateLayout, animateLayoutAndWait, animateLayoutFade, animateLayoutFadeAndWait, animateUnlayout, animateUnlayoutAndWait, applyRTL, calcPreferredSize, cancelRepaints, clearClientProperties, constrainHeightWhenScrollable, constrainWidthWhenScrollable, contains, createAnimateHierarchy, createAnimateHierarchyFade, createAnimateLayout, createAnimateLayoutFade, createAnimateLayoutFadeAndWait, createAnimateMotion, createAnimateUnlayout, createReplaceTransition, dragInitiated, drop, encloseIn, encloseIn, findDropTargetAt, findFirstFocusable, fireClicked, flushReplace, forceRevalidate, getBottomGap, getChildrenAsList, getClosestComponentTo, getComponentAt, getComponentAt, getComponentCount, getComponentIndex, getGridPosX, getGridPosY, getLayoutHeight, getLayoutWidth, getLeadComponent, getLeadParent, getResponderAt, getSafeAreaRoot, getScrollIncrement, getSideGap, getUIManager, initLaf, invalidate, isEnabled, isSafeArea, isSafeAreaRoot, isScrollableX, isScrollableY, isSelectableInteraction, isSurface, iterator, iterator, keyPressed, keyReleased, layoutContainer, morph, morphAndWait, paint, paintComponentBackground, paintGlass, paramString, pointerPressed, refreshTheme, replace, replace, replaceAndWait, replaceAndWait, replaceAndWait, revalidate, revalidateLater, revalidateWithAnimationSafety, scrollComponentToVisible, setCellRenderer, setEnabled, setLeadComponent, setSafeArea, setSafeAreaRoot, setScrollableX, setScrollableY, setScrollIncrement, setShouldCalcPreferredSize, setShouldLayout, setUIManager, updateTabIndices`

  ### Methods inherited from class Component

  `addContextMenuListener, addDragFinishedListener, addDragOverListener, addDropListener, addFocusListener, addLongPressListener, addMouseWheelListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, addStateChangeListener, addStylusListener, animate, announceForAccessibility, bindProperty, blocksSideSwipe, calcScrollSize, contains, containsOrOwns, createStyleAnimation, deinitializeCustomStyle, dragEnter, dragExit, dragFinished, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getAccessibilityText, getAllStyles, getAnimationManager, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBoundPropertyValue, getBounds, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentForm, getComponentState, getCursor, getDefaultDragTransparency, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragRegionStatus, getDragSpeed, getDragTransparency, getEditingDelegate, getHeight, getInlineAllStyles, getInlineDisabledStyles, getInlinePressedStyles, getInlineSelectedStyles, getInlineStylesTheme, getInlineUnselectedStyles, getInnerHeight, getInnerPreferredH, getInnerPreferredW, getInnerWidth, getInnerX, getInnerY, getLabelForComponent, getName, getNativeOverlay, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getOuterHeight, getOuterPreferredH, getOuterPreferredW, getOuterWidth, getOuterX, getOuterY, getOwner, getParent, getPreferredH, getPreferredSize, getPreferredSizeStr, getPreferredTabIndex, getPreferredW, getPressedStyle, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getSameHeight, getSameWidth, getScrollable, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getStyle, getTabIndex, getTensileLength, getTextSelectionSupport, getTooltip, getUIID, getUnselectedStyle, getVisibleBounds, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFixedPreferredSize, hasFocus, hideNativeOverlay, initCustomStyle, initDisabledStyle, initPressedStyle, initSelectedStyle, initUnselectedStyle, installDefaultPainter, isAlwaysTensile, isBlockLead, isCellRenderer, isChildOf, isDragActivated, isDragAndDropOperation, isDraggable, isDragRegion, isDropTarget, isEditable, isEditing, isFlatten, isFocusable, isGrabsPointerEvents, isHidden, isHidden, isHideInLandscape, isHideInPortrait, isHScrollThumbGrabbed, isHScrollThumbHover, isIgnorePointerEvents, isInClippingRegion, isInitialized, isOpaque, isOwnedBy, isPinchBlocksDragAndDrop, isRippleEffect, isRTL, isScrollable, isScrollVisible, isSetCursorSupported, isSmoothScrolling, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isTraversable, isVisible, isVScrollThumbGrabbed, isVScrollThumbHover, keyRepeated, laidOut, longKeyPress, longPointerPress, onScrollX, onScrollY, onSetFocusable, paintBackground, paintBackgrounds, paintBorder, paintBorderBackground, paintComponent, paintComponent, paintIntersectingComponentsAbove, paintLock, paintLockRelease, paintRippleOverlay, paintScrollbars, paintScrollbarX, paintScrollbarY, paintShadows, parsePreferredSize, pinch, pinch, pinchReleased, pointerDragged, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, refreshTheme, remove, removeContextMenuListener, removeDragFinishedListener, removeDragOverListener, removeDropListener, removeFocusListener, removeLongPressListener, removeMouseWheelListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, removeStateChangeListener, removeStylusListener, repaint, repaint, requestFocus, resetFocusable, respondsToPointerEvents, rotation, scrollRectToVisible, scrollRectToVisible, setAccessibilityText, setAlwaysTensile, setBlockLead, setBoundPropertyValue, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setCursor, setDefaultDragTransparency, setDirtyRegion, setDisabledStyle, setDraggable, setDragTransparency, setDropTarget, setEditingDelegate, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHidden, setHidden, setHideInLandscape, setHideInPortrait, setHorizontalScrollBounds, setIgnorePointerEvents, setInitialized, setInlineAllStyles, setInlineDisabledStyles, setInlinePressedStyles, setInlineSelectedStyles, setInlineStylesTheme, setInlineUnselectedStyles, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setOpaque, setOwner, setPinchBlocksDragAndDrop, setPreferredH, setPreferredSize, setPreferredSizeStr, setPreferredTabIndex, setPreferredW, setPressedStyle, setPropertyValue, setPullToRefresh, setRippleEffect, setRTL, setSameHeight, setSameSize, setSameWidth, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSmoothScrolling, setSnapToGrid, setTabIndex, setTactileTouch, setTensileDragEnabled, setTensileLength, setTooltip, setTraversable, setUIID, setUIID, setUIIDFinal, setUnselectedStyle, setVerticalScrollBounds, setVisible, setWidth, setX, setY, shouldBlockSideSwipe, shouldBlockSideSwipeLeft, shouldBlockSideSwipeRight, shouldRenderComponentSelection, showNativeOverlay, startEditingAsync, stopEditing, stripMarginAndPadding, styleChanged, toImage, toString, unbindProperty, updateNativeOverlay, visibleBoundsContains`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface Iterable

  `forEach`

- ## Constructor Details

  - ### InteractionDialog

    public InteractionDialog()
    Default constructor with no title

  - ### InteractionDialog

    public InteractionDialog(Layout l)

    Default constructor with layout

    ###### Parameters

    - `l`: layout

  - ### InteractionDialog

    public InteractionDialog(String title)

    Constructor with dialog title

    ###### Parameters

    - `title`: the title of the dialog

  - ### InteractionDialog

    public InteractionDialog(String title, Layout l)

    Constructor with dialog title

    ###### Parameters

    - `title`: the title of the dialog

    - `l`: the layout for the content pane

- ## Method Details

  - ### initComponent

    protected void initComponent()
    Description copied from class: `Component`
    Allows subclasses to bind functionality that relies on fully initialized and "ready for action" component state
    Overrides:
      `initComponent` in class `Component`

  - ### isDisposeWhenPointerOutOfBounds

    public boolean isDisposeWhenPointerOutOfBounds()

    This flag indicates if the dialog should be disposed if a pointer released event occurred out of the dialog content.

    ###### Returns

    true if the dialog should dispose

  - ### setDisposeWhenPointerOutOfBounds

    public void setDisposeWhenPointerOutOfBounds(boolean disposeWhenPointerOutOfBounds)

    This flag indicates if the dialog should be disposed if a pointer released event occurred out of the dialog content.

    ###### Parameters

    - `disposeWhenPointerOutOfBounds`

  - ### getContentPane

    public Container getContentPane()

    Returns the body of the interaction dialog

    ###### Returns

    the container where the elements of the interaction dialog are added.

  - ### setScrollable

    public void setScrollable(boolean scrollable)

    The equivalent of calling both setScrollableY and setScrollableX

    ###### Parameters

    - `scrollable`: @param scrollable whether the component should/could scroll on the X and Y axis

    ###### Deprecated

    use setScrollableX and setScrollableY instead. This method is deprecated since it breeds confusion and is often misunderstood.

    Specified by:
      `setScrollable` in interface `AbstractDialog`
    Overrides:
      `setScrollable` in class `Container`

  - ### getLayout

    public Layout getLayout()

    Returns the layout manager responsible for arranging this container.

    ###### Returns

    the container layout manager

    Overrides:
      `getLayout` in class `Container`

  - ### setLayout

    public void setLayout(Layout layout)

    Sets the layout manager responsible for arranging this container

    ###### Parameters

    - `layout`: the specified layout manager
    Overrides:
      `setLayout` in class `Container`

  - ### getTitle

    public String getTitle()
    Gets this dialog title text.

  - ### setTitle

    public void setTitle(String title)

    Sets this dialog title text.

    ###### Parameters

    - `title`: the title text.

  - ### addComponent

    public void addComponent(Component cmp)

    Adds a Component to the Container

    ###### Parameters

    - `cmp`: the component to be added
    Overrides:
      `addComponent` in class `Container`

  - ### addComponent

    public void addComponent(Object constraints, Component cmp)

    Adds a Component to the Container

    ###### Parameters

    - `constraints`: @param constraints this method is useful when the Layout requires a constraint such as the BorderLayout. In this case you need to specify an additional data when you add a Component, such as "CENTER", "NORTH"...

    - `cmp`: component to add

    Specified by:
      `addComponent` in interface `AbstractDialog`
    Overrides:
      `addComponent` in class `Container`

  - ### addComponent

    public void addComponent(int index, Object constraints, Component cmp)

    Adds a Component to the Container

    ###### Parameters

    - `index`: location to insert the Component

    - `constraints`: @param constraints this method is useful when the Layout requires a constraint such as the BorderLayout. In this case you need to specify an additional data when you add a Component, such as "CENTER", "NORTH"...

    - `cmp`: component to add

    Overrides:
      `addComponent` in class `Container`

  - ### addComponent

    public void addComponent(int index, Component cmp)

    This method adds the Component at a specific index location in the Container Components array.

    ###### Parameters

    - `index`: location to insert the Component

    - `cmp`: the Component to add

    ###### Throws

    - `ArrayIndexOutOfBoundsException`: if index is out of bounds

    - `IllegalArgumentException`: @throws IllegalArgumentException if Component is already contained or the cmp is a Form Component

    Overrides:
      `addComponent` in class `Container`

  - ### removeAll

    public void removeAll()
    remove all Components from container, notice that removed component might still have a pending repaint in the queue that won't be removed. Calling form.repaint() will workaround such an issue. Notice that this method doesn't recurse and only removes from the current container.
    Overrides:
      `removeAll` in class `Container`

  - ### removeComponent

    public void removeComponent(Component cmp)

    removes a Component from the Container, notice that removed component might still have a pending repaint in the queue that won't be removed. Calling form.repaint() will workaround such an issue.

    ###### Parameters

    - `cmp`: the removed component
    Overrides:
      `removeComponent` in class `Container`

  - ### getTitleComponent

    public Label getTitleComponent()

    Gets the label component used to display the title.

    ###### Returns

    The title label component.

  - ### deinitialize

    protected void deinitialize()
    Invoked to indicate that the component initialization is being reversed since the component was detached from the container hierarchy. This allows the component to deregister animators and cleanup after itself. This method is the opposite of the initComponent() method.
    Overrides:
      `deinitialize` in class `Component`

  - ### resize

    public void resize(int top, int bottom, int left, int right)

  - ### show

    public void show(int top, int bottom, int left, int right)

    This method shows the form as a modal alert allowing us to produce a behavior of an alert/dialog box. This method will block the calling thread even if the calling thread is the EDT. Notice that this method will not release the block until dispose is called even if show() from another form is called!

    Modal dialogs Allow the forms "content" to "hang in mid air" this is especially useful for dialogs where you would want the underlying form to "peek" from behind the form.

    ###### Parameters

    - `top`: space in pixels between the top of the screen and the form

    - `bottom`: space in pixels between the bottom of the screen and the form

    - `left`: space in pixels between the left of the screen and the form

    - `right`: space in pixels between the right of the screen and the form

  - ### dispose

    public void dispose()
    Removes the interaction dialog from view
    Specified by:
      `dispose` in interface `AbstractDialog`

  - ### disposeToTheLeft

    public void disposeToTheLeft()
    Removes the interaction dialog from view with an animation to the left

  - ### disposeToTheLeft

    public void disposeToTheLeft(Runnable onFinish)

    Removes the interaction dialog from view with an animation to the left.

    ###### Parameters

    - `onFinish`: Callback called when dispose animation is complete.

  - ### disposeToTheBottom

    public void disposeToTheBottom()
    Removes the interaction dialog from view with an animation to the bottom

  - ### disposeToTheBottom

    public void disposeToTheBottom(Runnable onFinish)

    Removes the interaction dialog from view with an animation to the bottom

    ###### Parameters

    - `onFinish`: Callback called when dispose animation is complete.

  - ### disposeToTheTop

    public void disposeToTheTop()
    Removes the interaction dialog from view with an animation to the top

  - ### disposeToTheTop

    public void disposeToTheTop(Runnable onFinish)

    Removes the interaction dialog from view with an animation to the top.

    ###### Parameters

    - `onFinish`: Callback called when dispose animation is complete.

  - ### disposeToTheRight

    public void disposeToTheRight()
    Removes the interaction dialog from view with an animation to the right

  - ### disposeToTheRight

    public void disposeToTheRight(Runnable onFinish)

    Removes the interaction dialog from view with an animation to the right.

    ###### Parameters

    - `onFinish`: Callback called when dispose animation is complete.

  - ### isShowing

    public boolean isShowing()

    Will return true if the dialog is currently showing

    ###### Returns

    true if showing

  - ### isAnimateShow

    public boolean isAnimateShow()

    Indicates whether show/dispose should be animated or not. When true (the default) the dialog animates into view on `#show(int, int, int, int)` and out on `#dispose()` over `interactionDialogSpeedInt` (default 400ms). When false, both transitions are immediate. This flag also gates `#isRepositionAnimation()`: the grow/shrink behavior of `repositionAnimation` only takes effect when `animateShow` is true.

    ###### Returns

    the animateShow

  - ### setAnimateShow

    public void setAnimateShow(boolean animateShow)

    Indicates whether show/dispose should be animated or not. When true (the default) the dialog animates into view on `#show(int, int, int, int)` and out on `#dispose()` over `interactionDialogSpeedInt` (default 400ms). When false, both transitions are immediate. This flag also gates `#setRepositionAnimation(boolean)`: the grow/shrink behavior of `repositionAnimation` only takes effect when `animateShow` is true.

    ###### Parameters

    - `animateShow`: the animateShow to set

  - ### getAnimationSpeed

    public int getAnimationSpeed()

    Duration in milliseconds used by the show, dispose and resize animations. When set to a non-negative value this overrides the `interactionDialogSpeedInt` theme constant. The default is -1 which means "defer to the theme constant" (which itself defaults to 400ms).

    ###### Returns

    the animation speed in ms, or -1 if the theme constant is used

  - ### setAnimationSpeed

    public void setAnimationSpeed(int animationSpeed)

    Sets the duration in milliseconds used by the show, dispose and resize animations, overriding the `interactionDialogSpeedInt` theme constant. Pass any value < 0 (typically -1) to revert to the theme constant.

    ###### Parameters

    - `animationSpeed`: animation duration in ms, or a value < 0 to defer to the theme constant

  - ### getShowAnimationSetup

    public Runnable getShowAnimationSetup()

    Callback invoked just before the show animation runs to position the dialog parent at the animation start state. When set, this replaces the default `#setRepositionAnimation(boolean)` behavior (grow from a 1x1 point at the center, or stay at full size). Inside the callback, manipulate `getParent()` bounds (`setX`/`setY`/`setWidth`/`setHeight`) to define where the dialog should animate from. The animation will then interpolate the layered pane layout to the dialog's final bounds. Pass `null` (the default) to use the built-in show animation.

    This callback only fires when `#isAnimateShow()` is true.

    This hook is the recommended workaround when using popup dialogs that render a pointing-arrow border (`#showPopupDialog(com.codename1.ui.Component)`). With the built-in "grow from 1x1" animation the dialog is too small for the arrow image to render until the animation completes; providing a translate-from-edge setup keeps the dialog at full size for the entire animation so the arrow is visible throughout. For example, to slide in from off-screen below:

        dlg.setShowAnimationSetup(() -> {
            Container parent = dlg.getParent();
            parent.setY(Display.getInstance().getDisplayHeight());
        });

    ###### Returns

    the show animation setup callback or null

  - ### setShowAnimationSetup

    public void setShowAnimationSetup(Runnable showAnimationSetup)

    Sets a callback that positions the dialog parent at the animation start state, overriding the default show animation. See `#getShowAnimationSetup()` for details.

    ###### Parameters

    - `showAnimationSetup`: callback or null to use the built-in show animation

  - ### getDisposeAnimationSetup

    public Runnable getDisposeAnimationSetup()

    Callback invoked just before the dispose animation runs to position the dialog at the animation end state. When set, this replaces the default `#setRepositionAnimation(boolean)` behavior (shrink to a 1x1 point at the dialog center). Inside the callback, manipulate the dialog bounds (`setX`/`setY`/`setWidth`/`setHeight`) to define where the dialog should animate to. Pass `null` (the default) to use the built-in dispose animation.

    This callback only fires when `#isAnimateShow()` is true.

    ###### Returns

    the dispose animation setup callback or null

  - ### setDisposeAnimationSetup

    public void setDisposeAnimationSetup(Runnable disposeAnimationSetup)

    Sets a callback that positions the dialog at the animation end state, overriding the default dispose animation. See `#getDisposeAnimationSetup()` for details.

    ###### Parameters

    - `disposeAnimationSetup`: callback or null to use the built-in dispose animation

  - ### showPopupDialog

    public void showPopupDialog(Component c)

    A popup dialog is shown with the context of a component and its selection. You should use `#setDisposeWhenPointerOutOfBounds(boolean)` to make it dispose when the user clicks outside the bounds of the popup. It can optionally provide an arrow in the theme to point at the context component. The popup dialog has the PopupDialog style by default.

    ###### Parameters

    - `c`: the context component which is used to position the dialog and can also be pointed at

  - ### showPopupDialog

    public void showPopupDialog(Component c, boolean bias)

    A popup dialog is shown with the context of a component and its selection. You should use `#setDisposeWhenPointerOutOfBounds(boolean)` to make it dispose when the user clicks outside the bounds of the popup. It can optionally provide an arrow in the theme to point at the context component. The popup dialog has the PopupDialog style by default.

    ###### Parameters

    - `c`: the context component which is used to position the dialog and can also be pointed at

    - `bias`: directional bias value. This parameter is not supported.

    ###### Deprecated

  - ### showPopupDialog

    public void showPopupDialog(Rectangle rect)

    A popup dialog is shown with the context of a component and its selection. You should use `#setDisposeWhenPointerOutOfBounds(boolean)` to make it dispose when the user clicks outside the bounds of the popup. It can optionally provide an arrow in the theme to point at the context component. The popup dialog has the PopupDialog style by default.

    ###### Parameters

    - `rect`: the screen rectangle to which the popup should point

  - ### showPopupDialog

    public void showPopupDialog(Rectangle rect, boolean bias)

    A popup dialog is shown with the context of a component and its selection. You should use `#setDisposeWhenPointerOutOfBounds(boolean)` to make it dispose when the user clicks outside the bounds of the popup. It can optionally provide an arrow in the theme to point at the context component. The popup dialog has the PopupDialog style by default.

    ###### Parameters

    - `rect`: the screen rectangle to which the popup should point

    - `bias`: directional bias value. This parameter is not supported.

    ###### Deprecated

  - ### getDialogUIID

    public String getDialogUIID()

    Returns the uiid of the dialog

    ###### Returns

    the uiid of the dialog

  - ### setDialogUIID

    public void setDialogUIID(String uiid)

    Simple setter to set the Dialog uiid

    ###### Parameters

    - `uiid`: the id for the dialog

  - ### getDialogStyle

    public Style getDialogStyle()

    Simple getter to get the Dialog Style

    ###### Returns

    the style of the dialog

  - ### isRepositionAnimation

    public boolean isRepositionAnimation()

    Controls the "grow from center / shrink to center" effect used by the show/dispose animation. When true (the default), `#show(int, int, int, int)` collapses the dialog to a 1x1 point at the center of its target bounds and the layered pane's animation interpolates from that point out to the full dialog size. `#dispose()` performs the reverse, shrinking the dialog to a point before removal. When false, the dialog keeps its full size for the duration of the animation (only the layered pane's layout transition runs, which is typically not visible for a dialog whose bounds do not change).

    This flag has no effect when `#isAnimateShow()` is false, since the show/dispose animation is skipped entirely in that case.

    ###### Returns

    the repositionAnimation

  - ### setRepositionAnimation

    public void setRepositionAnimation(boolean repositionAnimation)

    Controls the "grow from center / shrink to center" effect used by the show/dispose animation. When true (the default), `#show(int, int, int, int)` collapses the dialog to a 1x1 point at the center of its target bounds and the layered pane's animation interpolates from that point out to the full dialog size. `#dispose()` performs the reverse, shrinking the dialog to a point before removal. When false, the dialog keeps its full size for the duration of the animation (only the layered pane's layout transition runs, which is typically not visible for a dialog whose bounds do not change).

    This flag has no effect when `#isAnimateShow()` is false, since the show/dispose animation is skipped entirely in that case.

    ###### Parameters

    - `repositionAnimation`: the repositionAnimation to set

  - ### isFormMode

    public boolean isFormMode()

    Selects which layered pane hosts the dialog.

    When false (the default), the dialog is added to `Form#getLayeredPane()`, which sits above the form's content pane but below the title area, side menu, and status bar. This is the right choice for most dialogs that interact with content pane components, and is the historical behavior of `InteractionDialog`.

    When true, the dialog is added to `Form#getFormLayeredPane(Class, boolean)`, which sits above the entire form including the title area and side menu. Use this when the dialog needs to overlay or point at a component that lives outside the content pane (for example a title bar button or an item in the side menu). `#showPopupDialog(Component)` enables this automatically when it detects that the target component is not inside the form's content pane.

    In short, leave this at the default unless you observe the dialog being clipped by the title/side menu or you are pointing at a component outside the content pane.

    ###### Returns

    the formMode

  - ### setFormMode

    public void setFormMode(boolean formMode)

    Selects which layered pane hosts the dialog.

    When false (the default), the dialog is added to `Form#getLayeredPane()`, which sits above the form's content pane but below the title area, side menu, and status bar. This is the right choice for most dialogs that interact with content pane components, and is the historical behavior of `InteractionDialog`.

    When true, the dialog is added to `Form#getFormLayeredPane(Class, boolean)`, which sits above the entire form including the title area and side menu. Use this when the dialog needs to overlay or point at a component that lives outside the content pane (for example a title bar button or an item in the side menu). `#showPopupDialog(Component)` enables this automatically when it detects that the target component is not inside the form's content pane.

    In short, leave this at the default unless you observe the dialog being clipped by the title/side menu or you are pointing at a component outside the content pane.

    ###### Parameters

    - `formMode`: the formMode to set

  - ### isStackable

    public static boolean isStackable()

    Whether `InteractionDialog` is in the global "stackable" mode. See `#setStackable(boolean)`.

    ###### Returns

    true if stackable mode is enabled

  - ### setStackable

    public static void setStackable(boolean stackable)

    Opt-in robustness mode for applications that show several `InteractionDialog`s at the same time (for example a step-by-step walkthrough that highlights different components).

    All `InteractionDialog` instances share a single layered pane keyed by the class. In the default (historical) behavior, disposing one dialog clears that whole layer (`removeAll()` / layer removal), which also wipes any sibling dialog still showing in it -- so when dialogs overlap one of them can silently fail to appear (#5193). When stackable mode is enabled dispose removes only the disposed dialog's own component; remaining dialogs stay visible, layered by the order in which `#show(int, int, int, int)` was called (later shows render on top). The shared layer container is removed only once it becomes empty, so layers do not accumulate as dialogs come and go.

    This is a global, app-wide setting (it must be on for every dialog that participates) and defaults to false to preserve backwards compatibility.

    ###### Parameters

    - `stackable`: true to enable stackable/concurrent dialog support

  - ### setDialogType

    public void setDialogType(int dialogType)
    Sets a dialog sound type (e.g. `Dialog#TYPE_INFO`).
    Specified by:
      `setDialogType` in interface `AbstractDialog`

  - ### setTransitions

    public void setTransitions(Transition transition)
    No-op for `InteractionDialog`. Transitions are not supported; the show and dispose animations are governed by `#setAnimateShow(boolean)` and `#setRepositionAnimation(boolean)` and run on the host layered pane rather than as a Form-level transition. The method is provided only to satisfy the `AbstractDialog` contract.
    Specified by:
      `setTransitions` in interface `AbstractDialog`

  - ### configureCommands

    public void configureCommands(Command[] cmds, boolean commandsAsButtons)
    Configures commands for the dialog UI.
    Specified by:
      `configureCommands` in interface `AbstractDialog`

  - ### setDefaultCommand

    public void setDefaultCommand(Command defaultCommand)
    Sets the default command when supported.
    Specified by:
      `setDefaultCommand` in interface `AbstractDialog`

  - ### setTimeout

    public void setTimeout(long timeout)
    Sets timeout in milliseconds after which dialog should close.
    Specified by:
      `setTimeout` in interface `AbstractDialog`

  - ### showDialog

    public Command showDialog()
    Shows this interaction dialog and blocks until it is disposed.
    Specified by:
      `showDialog` in interface `AbstractDialog`