Class WindowImpl

java.lang.Object
io.jmix.ui.component.impl.WindowImpl
All Implemented Interfaces:
ActionsHolder, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, ComponentContainer, ExpandingLayout, Frame, HasComponents, HasMargin, HasSpacing, HasSubParts, FrameImplementation, WindowImplementation, OrderedContainer, SecuredActionsHolder, SupportsExpandRatio, Window
Direct Known Subclasses:
DialogWindowImpl, RootWindowImpl, TabWindowImpl

  • Field Details

    • C_WINDOW_LAYOUT

      protected static final String C_WINDOW_LAYOUT
      See Also:
    • id

      protected String id
    • facets

      protected Set<Facet> facets
    • ownComponents

      protected List<Component> ownComponents
    • allComponents

      protected Map<String,Component> allComponents
    • focusComponentId

      protected String focusComponentId
    • component

      protected com.vaadin.ui.AbstractOrderedLayout component
    • frameOwner

      protected Screen frameOwner
    • element

      protected org.dom4j.Element element
    • context

      protected WindowContext context
    • icon

      protected String icon
    • caption

      protected String caption
    • description

      protected String description
    • actionsHolder

      protected FrameActionsHolder actionsHolder
    • actionsPermissions

      protected ActionsPermissions actionsPermissions
    • icons

      protected Icons icons
    • closeable

      protected boolean closeable
    • resolvedState

      protected NavigationState resolvedState
    • defaultScreenWindow

      protected boolean defaultScreenWindow
  • Constructor Details

    • WindowImpl

      public WindowImpl()
  • Method Details

    • getEventHub

      protected EventHub getEventHub()
    • publish

      protected <E> void publish(Class<E> eventType, E event)
    • unsubscribe

      protected <E> boolean unsubscribe(Class<E> eventType, Consumer<E> listener)
    • setIcons

      @Autowired protected void setIcons(Icons icons)
    • disableEventListeners

      protected void disableEventListeners()
    • enableEventListeners

      protected void enableEventListeners()
    • createLayout

      protected com.vaadin.ui.AbstractOrderedLayout createLayout()
    • getContainer

      protected com.vaadin.ui.ComponentContainer getContainer()
    • addFacet

      public void addFacet(Facet facet)
      Description copied from interface: Frame
      Registers the passed non-visual component in the frame.
      Specified by:
      addFacet in interface Frame
      Parameters:
      facet - facet
    • getFacet

      @Nullable public Facet getFacet(String id)
      Description copied from interface: Frame
      Finds registered facet by ID.
      Specified by:
      getFacet in interface Frame
      Parameters:
      id - facet ID
      Returns:
      facet instance or null
    • removeFacet

      public void removeFacet(Facet facet)
      Description copied from interface: Frame
      Removes the non-visual component from the frame.
      Specified by:
      removeFacet in interface Frame
      Parameters:
      facet - facet
    • getFacets

      public Stream<Facet> getFacets()
      Specified by:
      getFacets in interface Frame
      Returns:
      stream of registered non-visual components
    • registerComponent

      public void registerComponent(Component component)
      Description copied from interface: FrameImplementation
      INTERNAL. Don't call from application code.
      Specified by:
      registerComponent in interface FrameImplementation
    • unregisterComponent

      public void unregisterComponent(Component component)
      Description copied from interface: FrameImplementation
      INTERNAL. Don't call from application code.
      Specified by:
      unregisterComponent in interface FrameImplementation
    • getRegisteredComponent

      @Nullable public Component getRegisteredComponent(String id)
      Description copied from interface: FrameImplementation
      INTERNAL. Don't call from application code.
      Specified by:
      getRegisteredComponent in interface FrameImplementation
    • getStyleName

      public String getStyleName()
      Description copied from interface: Component
      Styles implementation is client-type-specific.
      Specified by:
      getStyleName in interface Component
      Returns:
      current style name.
    • setStyleName

      public void setStyleName(@Nullable String name)
      Description copied from interface: Component
      Sets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.
      Specified by:
      setStyleName in interface Component
      Parameters:
      name - one or more style names separated by space.
    • addStyleName

      public void addStyleName(String styleName)
      Description copied from interface: Component
      Adds one or more style names to this component. Multiple styles can be specified as a space-separated list of style names.
      Specified by:
      addStyleName in interface Component
      Parameters:
      styleName - one or more style names separated by space.
    • removeStyleName

      public void removeStyleName(String styleName)
      Description copied from interface: Component
      Removes one or more style names from component. Multiple styles can be specified as a space-separated list of style names.
      Specified by:
      removeStyleName in interface Component
      Parameters:
      styleName - one or more style names separated by space.
    • unwrap

      public <X> X unwrap(Class<X> internalComponentClass)
      Description copied from interface: Component
      Get client specific component instance. Can be used in client module to simplify invocation of underlying API.
      Example:
       com.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
       
      Specified by:
      unwrap in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalComponentClass - class of underlying component implementation based on Vaadin or Swing
      Returns:
      internal client specific component
    • unwrapOrNull

      @Nullable public <X> X unwrapOrNull(Class<X> internalComponentClass)
      Description copied from interface: Component
      Get client specific component instance. Can be used in client module to simplify invocation of underlying API.
      Returns null if underlying component cannot be casted to the given internalComponentClass. Example:
       com.vaadin.ui.TextField vTextField = textField.unwrapOrNull(com.vaadin.ui.TextField.class);
       
      Specified by:
      unwrapOrNull in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalComponentClass - class of underlying component implementation based on Vaadin or Swing
      Returns:
      internal client specific component or null if it cannot be casted to given class
    • withUnwrapped

      public <X> void withUnwrapped(Class<X> internalComponentClass, Consumer<X> action)
      Description copied from interface: Component
      Performs the given action with underlying component if it can be casted to the given internalComponentClass. Example:
       textField.withUnwrapped(com.vaadin.ui.TextField.class, vTextField -> {
           // do something
       });
       
      Specified by:
      withUnwrapped in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalComponentClass - class of underlying component implementation based on Vaadin or Swing
      action - action to perform if underlying component can be casted to given class
    • unwrapComposition

      public <X> X unwrapComposition(Class<X> internalCompositionClass)
      Description copied from interface: Component
      Get the outmost external container of client specific component instance. Can be used in client module to simplify invocation of underlying API.
      Example:
       com.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
       
      Specified by:
      unwrapComposition in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalCompositionClass - class of underlying composition implementation based on Vaadin or Swing
      Returns:
      internal client specific component
    • unwrapCompositionOrNull

      @Nullable public <X> X unwrapCompositionOrNull(Class<X> internalCompositionClass)
      Description copied from interface: Component
      Get the outmost external container of client specific component instance. Can be used in client module to simplify invocation of underlying API.
      Returns null if composition cannot be casted to given internalCompositionClass. Example:
       com.vaadin.ui.Layout vLayout = table.unwrapCompositionOrNull(com.vaadin.ui.Layout.class);
       
      Specified by:
      unwrapCompositionOrNull in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalCompositionClass - class of underlying composition implementation based on Vaadin or Swing
      Returns:
      internal client specific component or null if cannot be casted to given class
    • withUnwrappedComposition

      public <X> void withUnwrappedComposition(Class<X> internalCompositionClass, Consumer<X> action)
      Description copied from interface: Component
      Get the outmost external container of client specific component instance and performs the given action.
      Can be used in client module to simplify invocation of underlying API.
      Example:
       table.withUnwrappedComposition(com.vaadin.ui.Layout.class, vLayout -> {
           // do something
       });
       
      Specified by:
      withUnwrappedComposition in interface Component
      Type Parameters:
      X - type of internal class
      Parameters:
      internalCompositionClass - class of underlying composition implementation based on Vaadin or Swing
      action - to perform if underlying composition can be casted to given class
    • getSpacing

      public boolean getSpacing()
      Specified by:
      getSpacing in interface HasSpacing
    • setSpacing

      public void setSpacing(boolean enabled)
      Specified by:
      setSpacing in interface HasSpacing
    • getMargin

      public MarginInfo getMargin()
      Specified by:
      getMargin in interface HasMargin
    • setMargin

      public void setMargin(MarginInfo marginInfo)
      Specified by:
      setMargin in interface HasMargin
    • setMinWidth

      public void setMinWidth(String minWidth)
      Description copied from interface: Window
      Sets minimum CSS width for window layout. Examples: "640px", "auto".
      Specified by:
      setMinWidth in interface Window
      Parameters:
      minWidth - minimum width
    • getMinWidth

      @Nullable public String getMinWidth()
      Specified by:
      getMinWidth in interface Window
      Returns:
      previously set minimal CSS width or null
    • setMaxWidth

      public void setMaxWidth(String maxWidth)
      Description copied from interface: Window
      Sets maximum CSS width for window layout. Examples: "640px", "100%".
      Specified by:
      setMaxWidth in interface Window
      Parameters:
      maxWidth - maximum width
    • getMaxWidth

      @Nullable public String getMaxWidth()
      Specified by:
      getMaxWidth in interface Window
      Returns:
      previously set maximum CSS width or null
    • setMinHeight

      public void setMinHeight(String minHeight)
      Description copied from interface: Window
      Sets minimum CSS height for window layout. Examples: "640px", "auto".
      Specified by:
      setMinHeight in interface Window
      Parameters:
      minHeight - minimum height
    • getMinHeight

      @Nullable public String getMinHeight()
      Specified by:
      getMinHeight in interface Window
      Returns:
      previously set minimum CSS height or null
    • setMaxHeight

      public void setMaxHeight(String maxHeight)
      Description copied from interface: Window
      Sets maximum CSS height for window layout. Examples: "640px", "100%".
      Specified by:
      setMaxHeight in interface Window
      Parameters:
      maxHeight - maximum height
    • getMaxHeight

      @Nullable public String getMaxHeight()
      Specified by:
      getMaxHeight in interface Window
      Returns:
      previously set maximum CSS height or null
    • addAction

      public void addAction(Action action)
      Description copied from interface: ActionsHolder
      Add an action to the component
      Specified by:
      addAction in interface ActionsHolder
    • addAction

      public void addAction(Action action, int index)
      Description copied from interface: ActionsHolder
      Add an action to the component with index.
      Specified by:
      addAction in interface ActionsHolder
    • removeAction

      public void removeAction(Action action)
      Description copied from interface: ActionsHolder
      Remove the action from the component
      Specified by:
      removeAction in interface ActionsHolder
    • removeAction

      public void removeAction(String id)
      Description copied from interface: ActionsHolder
      Remove the action by its ID. If there is no action with that ID, nothing happens.
      Specified by:
      removeAction in interface ActionsHolder
    • removeAllActions

      public void removeAllActions()
      Description copied from interface: ActionsHolder
      Remove all actions from the component
      Specified by:
      removeAllActions in interface ActionsHolder
    • getActions

      public Collection<Action> getActions()
      Specified by:
      getActions in interface ActionsHolder
      Returns:
      unmodifiable collection of actions
    • getAction

      @Nullable public Action getAction(String id)
      Specified by:
      getAction in interface ActionsHolder
      Returns:
      an action by its ID, or null if not found
    • isValid

      public boolean isValid()
      Description copied from interface: Frame
      Check validity by invoking validators on all components which support them.
      Specified by:
      isValid in interface Frame
      Returns:
      true if all components are in valid state
    • validate

      public void validate() throws ValidationException
      Description copied from interface: Frame
      Check validity by invoking validators on all components which support them.
      Specified by:
      validate in interface Frame
      Throws:
      ValidationException - if some components are currently in invalid state
    • validate

      public boolean validate(List<Validatable> fields)
      Description copied from interface: Window
      Checks validity by invoking validators on specified components which support them and show validation result notification.
      Specified by:
      validate in interface Frame
      Specified by:
      validate in interface Window
      Returns:
      true if the validation was successful, false if there were any problems
    • validateAll

      public boolean validateAll()
      Description copied from interface: Window
      Checks validity by invoking validators on all components which support them and show validation result notification.
      Specified by:
      validateAll in interface Frame
      Specified by:
      validateAll in interface Window
      Returns:
      true if the validation was successful, false if there were any problems
    • handleValidationErrors

      protected boolean handleValidationErrors(ValidationErrors errors)
    • isCloseable

      public boolean isCloseable()
      Specified by:
      isCloseable in interface Window
      Returns:
      true if the window can be closed by user with close button or keyboard shortcut
    • setCloseable

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

      public Screen getFrameOwner()
      Specified by:
      getFrameOwner in interface Frame
      Specified by:
      getFrameOwner in interface Window
      Returns:
      UI controller of the window
      See Also:
    • setFrameOwner

      public void setFrameOwner(Screen controller)
      Specified by:
      setFrameOwner in interface WindowImplementation
    • initUiEventListeners

      public void initUiEventListeners()
      Specified by:
      initUiEventListeners in interface WindowImplementation
    • getContext

      public WindowContext getContext()
      Specified by:
      getContext in interface Frame
      Specified by:
      getContext in interface Window
      Returns:
      current window context
    • setContext

      public void setContext(FrameContext ctx)
      Description copied from interface: FrameImplementation
      INTERNAL. Don't call from application code.
      Specified by:
      setContext in interface FrameImplementation
    • getComponentToFocus

      @Nullable protected Component.Focusable getComponentToFocus(Iterator<Component> componentsIterator)
    • getFocusComponent

      public String getFocusComponent()
      Specified by:
      getFocusComponent in interface Window
      Returns:
      an ID of the component which is set to be focused after the screen is opened
    • setFocusComponent

      public void setFocusComponent(@Nullable String componentId)
      Description copied from interface: Window
      Sets a component to be focused after the screen is opened.
      Specified by:
      setFocusComponent in interface Window
      Parameters:
      componentId - component's ID in XML. If null, then first focusable component will be focused
    • addBeforeWindowCloseListener

      public Subscription addBeforeWindowCloseListener(Consumer<Window.BeforeCloseEvent> listener)
      Description copied from interface: Window
      Registers a new before window close listener.
      Specified by:
      addBeforeWindowCloseListener in interface Window
      Parameters:
      listener - the listener to register
      Returns:
      a registration object for removing an event listener added to a window
    • fireBeforeClose

      public void fireBeforeClose(Window.BeforeCloseEvent event)
    • getXmlDescriptor

      @Nullable public org.dom4j.Element getXmlDescriptor()
      Specified by:
      getXmlDescriptor in interface Component.HasXmlDescriptor
    • setXmlDescriptor

      public void setXmlDescriptor(@Nullable org.dom4j.Element element)
      Specified by:
      setXmlDescriptor in interface Component.HasXmlDescriptor
    • add

      public void add(Component childComponent)
      Description copied from interface: ComponentContainer
      Adds a component to this container.
      Specified by:
      add in interface ComponentContainer
      Parameters:
      childComponent - a component to add
    • add

      public void add(Component childComponent, int index)
      Specified by:
      add in interface OrderedContainer
    • indexOf

      public int indexOf(Component component)
      Specified by:
      indexOf in interface OrderedContainer
    • getComponent

      @Nullable public Component getComponent(int index)
      Description copied from interface: OrderedContainer
      Returns the component at the given position.
      Specified by:
      getComponent in interface OrderedContainer
      Parameters:
      index - component index
      Returns:
      the component at the given index or null.
    • remove

      public void remove(Component childComponent)
      Description copied from interface: ComponentContainer
      Removes a component from this container.
      Specified by:
      remove in interface ComponentContainer
      Parameters:
      childComponent - a component to remove
    • removeAll

      public void removeAll()
      Description copied from interface: ComponentContainer
      Removes all components from this container.
      Specified by:
      removeAll in interface ComponentContainer
    • getOwnComponents

      public Collection<Component> getOwnComponents()
      Description copied from interface: HasComponents
      Gets all components directly owned by this container.
      Specified by:
      getOwnComponents in interface HasComponents
      Returns:
      all components directly owned by this container
    • getOwnComponentsStream

      public Stream<Component> getOwnComponentsStream()
      Description copied from interface: HasComponents
      Gets stream of all components directly owned by this container.
      Specified by:
      getOwnComponentsStream in interface HasComponents
      Returns:
      stream of all components directly owned by this container
    • getComponents

      public Collection<Component> getComponents()
      Description copied from interface: HasComponents
      Gets all components belonging to the whole components tree below this container.
      Specified by:
      getComponents in interface HasComponents
      Returns:
      all components belonging to the whole components tree below this container
    • getId

      @Nullable public String getId()
      Description copied from interface: Component
      Component ID as defined in id attribute
      Specified by:
      getId in interface Component
    • setId

      public void setId(@Nullable String id)
      Description copied from interface: Component
      Set component ID
      Specified by:
      setId in interface Component
    • getParent

      @Nullable public Component getParent()
      Specified by:
      getParent in interface Component
      Returns:
      parent of component.
    • setParent

      public void setParent(@Nullable Component parent)
      Description copied from interface: Component
      INTERNAL.
      ComponentContainer.add(Component) is normally used for adding components to a parent and the used method will call this method implicitly.
      Specified by:
      setParent in interface Component
      Parameters:
      parent - Parent component
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: Component
      Is the component enabled?
      Note that this method only returns the status of the component and does not take parents into account. Even though this method returns true the component can be disabled to the user if a parent is disabled.
      Specified by:
      isEnabled in interface Component
      Returns:
      true if the component enabled flag is set to true
    • setEnabled

      public void setEnabled(boolean enabled)
      Description copied from interface: Component
      Sets the component enabled state.
      The user can not interact with disabled components, which are shown with a style that indicates the status. Components are enabled by default.
      Specified by:
      setEnabled in interface Component
      Parameters:
      enabled - enabled flag
    • isResponsive

      public boolean isResponsive()
      Description copied from interface: Component
      Is the component responsive?
      Specified by:
      isResponsive in interface Component
      Returns:
      true if the component applies conditional CSS rules for width / height sizes.
    • setResponsive

      public void setResponsive(boolean responsive)
      Description copied from interface: Component
      Sets component to be responsive by width and height.
      If responsive flag is true then you can use conditional CSS rules that respond to size changes in the browser. You can set specific rules using "width-range" or "height-range" properties in CSS files.
      Specified by:
      setResponsive in interface Component
      Parameters:
      responsive - responsive flag
    • isVisible

      public boolean isVisible()
      Description copied from interface: Component
      Is the component visible?
      A component is visible only if all its parents are also visible. This is not checked by this method though, so even if this method returns true, the component can be hidden from the user because a parent is set to invisible.
      Specified by:
      isVisible in interface Component
      Returns:
      true if the component visibility is set to true
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: Component
      Sets visibility value for the component.
      Visible components are drawn in the user interface, while invisible ones are not. The effect is not a cosmetic CSS change - no information about an invisible component will be sent to the client. The effect is thus the same as removing the component from its parent.
      Specified by:
      setVisible in interface Component
      Parameters:
      visible - visible flag
    • isVisibleRecursive

      public boolean isVisibleRecursive()
      Specified by:
      isVisibleRecursive in interface Component
      Returns:
      true if the component and all its parent components are visible
    • isEnabledRecursive

      public boolean isEnabledRecursive()
      Specified by:
      isEnabledRecursive in interface Component
      Returns:
      true if the component and all its parent components are enabled
    • getHeight

      public float getHeight()
      Description copied from interface: Component
      Get component height in Component.getHeightSizeUnit()
      Specified by:
      getHeight in interface Component
    • setHeight

      public void setHeight(@Nullable String height)
      Description copied from interface: Component
      Set component height in Component.getHeightSizeUnit()
      Specified by:
      setHeight in interface Component
    • getHeightSizeUnit

      public SizeUnit getHeightSizeUnit()
      Description copied from interface: Component
      Gets the height property units.
      Specified by:
      getHeightSizeUnit in interface Component
      Returns:
      units used in height property.
    • getWidth

      public float getWidth()
      Description copied from interface: Component
      Get component width in Component.getWidthSizeUnit()
      Specified by:
      getWidth in interface Component
    • setWidth

      public void setWidth(@Nullable String width)
      Description copied from interface: Component
      Set component width in Component.getWidthSizeUnit()}
      Specified by:
      setWidth in interface Component
    • getWidthSizeUnit

      public SizeUnit getWidthSizeUnit()
      Description copied from interface: Component
      Gets the width property units.
      Specified by:
      getWidthSizeUnit in interface Component
      Returns:
      units used in the width property.
    • getOwnComponent

      @Nullable public Component getOwnComponent(String id)
      Description copied from interface: HasComponents
      Gets component directly owned by this container.
      Specified by:
      getOwnComponent in interface HasComponents
      Returns:
      component or null if not found
    • getComponent

      @Nullable public Component getComponent(String id)
      Description copied from interface: HasComponents
      Gets a component belonging to the whole components tree below this container.
      Specified by:
      getComponent in interface HasComponents
      Returns:
      component or null if not found
    • getAlignment

      public Component.Alignment getAlignment()
      Specified by:
      getAlignment in interface Component
    • setAlignment

      public void setAlignment(Component.Alignment alignment)
      Specified by:
      setAlignment in interface Component
    • expand

      public void expand(Component childComponent)
      Description copied from interface: ExpandingLayout
      Specifies the component that will be given maximum available space.
      Specified by:
      expand in interface ExpandingLayout
      Parameters:
      childComponent - the component
    • resetExpanded

      public void resetExpanded()
      Description copied from interface: ExpandingLayout
      Resets the expanded component and provides equal space for all nested components.
      Specified by:
      resetExpanded in interface ExpandingLayout
    • isExpanded

      public boolean isExpanded(Component component)
      Description copied from interface: ExpandingLayout
      Returns true if the component occupies the maximum available space.
      Specified by:
      isExpanded in interface ExpandingLayout
      Parameters:
      component - component to check
      Returns:
      true if the component occupies the maximum available space
    • getExpandDirection

      public ExpandingLayout.ExpandDirection getExpandDirection()
      Specified by:
      getExpandDirection in interface ExpandingLayout
      Returns:
      expand direction
      See Also:
    • getComponent

      public com.vaadin.ui.Component getComponent()
      Specified by:
      getComponent in interface Component.Wrapper
    • getComposition

      public com.vaadin.ui.Component getComposition()
      Specified by:
      getComposition in interface Component.Wrapper
    • findAndFocusChildComponent

      public boolean findAndFocusChildComponent()
    • getCaption

      @Nullable public String getCaption()
      Specified by:
      getCaption in interface Component.HasCaption
      Returns:
      the caption of the component
    • 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
      Parameters:
      caption - the new component's caption
    • getDescription

      @Nullable public String getDescription()
      Specified by:
      getDescription in interface Component.HasDescription
      Returns:
      the components description, used in tooltips
    • 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
      Parameters:
      description - the new description to set
    • getFrame

      @Nullable public Frame getFrame()
      Specified by:
      getFrame in interface Component.BelongToFrame
    • setFrame

      public void setFrame(@Nullable Frame frame)
      Specified by:
      setFrame in interface Component.BelongToFrame
    • getActionsPermissions

      public ActionsPermissions getActionsPermissions()
      Specified by:
      getActionsPermissions in interface SecuredActionsHolder
      Returns:
      permissions container
    • getIcon

      @Nullable public String getIcon()
      Description copied from interface: Component.HasIcon
      Get icon source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.
      Specified by:
      getIcon in interface Component.HasIcon
    • 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
    • setIconFromSet

      public void setIconFromSet(@Nullable Icons.Icon icon)
      Description copied from interface: Component.HasIcon
      Set an icon from an icon set.
      Specified by:
      setIconFromSet in interface Component.HasIcon
    • setExpandRatio

      public void setExpandRatio(Component component, float ratio)
      Description copied from interface: SupportsExpandRatio
      Sets expand ratio for the component. The ratio must be greater than or equal to 0.
      Specified by:
      setExpandRatio in interface SupportsExpandRatio
      Parameters:
      component - component to expand with ratio
      ratio - ratio
    • getExpandRatio

      public float getExpandRatio(Component component)
      Specified by:
      getExpandRatio in interface SupportsExpandRatio
      Parameters:
      component - component for which returns ratio
      Returns:
      ratio for the component, 0.0f by default
    • getResolvedState

      @Nullable public NavigationState getResolvedState()
    • setResolvedState

      public void setResolvedState(NavigationState resolvedState)
    • isDefaultScreenWindow

      public boolean isDefaultScreenWindow()
    • setDefaultScreenWindow

      public void setDefaultScreenWindow(boolean defaultScreenWindow)