Class DialogWindowImpl

java.lang.Object
io.jmix.ui.component.impl.WindowImpl
io.jmix.ui.component.impl.DialogWindowImpl
All Implemented Interfaces:
ActionsHolder, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, ComponentContainer, DialogWindow, ExpandingLayout, Frame, HasComponents, HasMargin, HasSpacing, HasSubParts, FrameImplementation, WindowImplementation, OrderedContainer, SecuredActionsHolder, SupportsExpandRatio, Window, org.springframework.beans.factory.InitializingBean

public class DialogWindowImpl extends WindowImpl implements DialogWindow, org.springframework.beans.factory.InitializingBean
  • Field Details

    • dialogWindow

      protected JmixWindow dialogWindow
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • notifications

      protected Notifications notifications
    • screens

      protected Screens screens
    • screenProperties

      protected UiScreenProperties screenProperties
  • Constructor Details

    • DialogWindowImpl

      public DialogWindowImpl()
  • Method Details

    • createComponent

      protected JmixWindow createComponent()
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • setupDefaultSize

      protected void setupDefaultSize()
    • setupContextMenu

      protected void setupContextMenu()
    • setupDialogShortcuts

      protected void setupDialogShortcuts()
    • onCloseButtonClick

      protected void onCloseButtonClick(JmixWindow.PreCloseEvent preCloseEvent)
    • onCloseShortcutTriggered

      protected void onCloseShortcutTriggered(Object sender, Object target)
    • setApplicationContext

      @Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
    • setNotifications

      @Autowired public void setNotifications(Notifications notifications)
    • setScreens

      @Autowired public void setScreens(Screens screens)
    • setScreenProperties

      @Autowired public void setScreenProperties(UiScreenProperties screenProperties)
    • setIcon

      public void setIcon(@Nullable String icon)
      Description copied from interface: Component.HasIcon
      Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.
      Specified by:
      setIcon in interface Component.HasIcon
      Overrides:
      setIcon in class WindowImpl
    • setCaption

      public void setCaption(@Nullable String caption)
      Description copied from interface: Component.HasCaption
      Sets the component's caption.
      Specified by:
      setCaption in interface Component.HasCaption
      Overrides:
      setCaption in class WindowImpl
      Parameters:
      caption - the new component's caption
    • setDescription

      public void setDescription(@Nullable String description)
      Description copied from interface: Component.HasDescription
      Sets the component's description.
      Specified by:
      setDescription in interface Component.HasDescription
      Overrides:
      setDescription in class WindowImpl
      Parameters:
      description - the new description to set
    • getComposition

      public com.vaadin.ui.Component getComposition()
      Specified by:
      getComposition in interface Component.Wrapper
      Overrides:
      getComposition in class WindowImpl
    • setDialogWidth

      public void setDialogWidth(@Nullable String dialogWidth)
      Description copied from interface: DialogWindow
      Sets dialog width.
      Specified by:
      setDialogWidth in interface DialogWindow
      Parameters:
      dialogWidth - width
    • getDialogWidth

      public float getDialogWidth()
      Specified by:
      getDialogWidth in interface DialogWindow
      Returns:
      dialog width
    • getDialogWidthUnit

      public SizeUnit getDialogWidthUnit()
      Specified by:
      getDialogWidthUnit in interface DialogWindow
      Returns:
      dialog width unit
    • setDialogHeight

      public void setDialogHeight(@Nullable String dialogHeight)
      Description copied from interface: DialogWindow
      Sets dialog height.
      Specified by:
      setDialogHeight in interface DialogWindow
      Parameters:
      dialogHeight - height
    • getDialogHeight

      public float getDialogHeight()
      Specified by:
      getDialogHeight in interface DialogWindow
      Returns:
      height
    • getDialogHeightUnit

      public SizeUnit getDialogHeightUnit()
      Specified by:
      getDialogHeightUnit in interface DialogWindow
      Returns:
      dialog height unit
    • setDialogStylename

      public void setDialogStylename(@Nullable String stylename)
      Description copied from interface: DialogWindow
      Sets the custom CSS style.
      Specified by:
      setDialogStylename in interface DialogWindow
      Parameters:
      stylename - style name
    • getDialogStylename

      @Nullable public String getDialogStylename()
      Specified by:
      getDialogStylename in interface DialogWindow
      Returns:
      custom style name
    • setResizable

      public void setResizable(boolean resizable)
      Description copied from interface: DialogWindow
      Sets window resizable.
      Specified by:
      setResizable in interface DialogWindow
      Parameters:
      resizable - resizable flag
    • isResizable

      public boolean isResizable()
      Specified by:
      isResizable in interface DialogWindow
      Returns:
      true if window is resizable by the end-user, otherwise false.
    • setDraggable

      public void setDraggable(boolean draggable)
      Description copied from interface: DialogWindow
      Enables or disables that a window can be dragged (moved) by the user. By default a window is draggable.
      Specified by:
      setDraggable in interface DialogWindow
      Parameters:
      draggable - draggable flag
    • isDraggable

      public boolean isDraggable()
      Specified by:
      isDraggable in interface DialogWindow
      Returns:
      true if window is draggable
    • setCloseable

      public void setCloseable(boolean closeable)
      Description copied from interface: Window
      Sets the closable status for the window.
      Specified by:
      setCloseable in interface Window
      Overrides:
      setCloseable in class WindowImpl
      Parameters:
      closeable - closeable flag
    • setModal

      public void setModal(boolean modal)
      Description copied from interface: DialogWindow
      Sets window modality. When a modal window is open, components outside that window cannot be accessed.
      Specified by:
      setModal in interface DialogWindow
      Parameters:
      modal - modal flag
    • isModal

      public boolean isModal()
      Specified by:
      isModal in interface DialogWindow
      Returns:
      true if window is modal
    • setCloseOnClickOutside

      public void setCloseOnClickOutside(boolean closeOnClickOutside)
      Description copied from interface: DialogWindow
      Sets if window can be closed by click outside of window content (by modality curtain).
      Specified by:
      setCloseOnClickOutside in interface DialogWindow
      Parameters:
      closeOnClickOutside - true if window to be closed by click outside of window content (by modality curtain)
    • isCloseOnClickOutside

      public boolean isCloseOnClickOutside()
      Specified by:
      isCloseOnClickOutside in interface DialogWindow
      Returns:
      true if window can be closed by click outside of window content (by modality curtain)
    • setWindowMode

      public void setWindowMode(WindowMode mode)
      Description copied from interface: DialogWindow
      Sets the mode for the window.
      Specified by:
      setWindowMode in interface DialogWindow
      Parameters:
      mode - mode
    • getWindowMode

      public WindowMode getWindowMode()
      Specified by:
      getWindowMode in interface DialogWindow
      Returns:
      the mode of the window
    • center

      public void center()
      Description copied from interface: DialogWindow
      Sets this window to be centered on screen.
      Specified by:
      center in interface DialogWindow
    • setPositionX

      public void setPositionX(int positionX)
      Description copied from interface: DialogWindow
      Sets the distance of Window left border in pixels from left border of the containing (main window).
      Specified by:
      setPositionX in interface DialogWindow
      Parameters:
      positionX - left position in pixels
    • getPositionX

      public int getPositionX()
      Specified by:
      getPositionX in interface DialogWindow
      Returns:
      the distance of Window left border in pixels from left border of the containing (main window) or -1 if unspecified
    • setPositionY

      public void setPositionY(int positionY)
      Description copied from interface: DialogWindow
      Sets the distance of Window top border in pixels from top border of the containing (main window).
      Specified by:
      setPositionY in interface DialogWindow
      Parameters:
      positionY - top position in pixels
    • getPositionY

      public int getPositionY()
      Specified by:
      getPositionY in interface DialogWindow
      Returns:
      distance of Window top border in pixels from top border of the containing (main window) or -1 if unspecified