Class AbstractLayoutComponent

    • Constructor Detail

      • AbstractLayoutComponent

        public AbstractLayoutComponent​(Layout<? extends Constraints> layout)
        Layout constructor with a default info model.
        Parameters:
        layout - The layout definition for the container.
        Throws:
        java.lang.NullPointerException - if the given layout is null.
      • AbstractLayoutComponent

        public AbstractLayoutComponent​(InfoModel infoModel,
                                       Layout<? extends Constraints> layout)
        Info model and layout constructor.
        Parameters:
        infoModel - The component info model.
        layout - The layout definition for the container.
        Throws:
        java.lang.NullPointerException - if the given info model and/or layout is null.
    • Method Detail

      • addComponent

        protected void addComponent​(int index,
                                    Component childComponent)
        Description copied from class: AbstractListCompositeComponent
        Adds a child component at the specified index. This version adds the component to the component list. Any class that overrides this method must call this version.
        Overrides:
        addComponent in class AbstractListCompositeComponent
        Parameters:
        index - The index at which the component should be added.
        childComponent - The component to add to this component.
      • removeComponent

        protected void removeComponent​(Component childComponent)
        Description copied from class: AbstractListCompositeComponent
        Removes a child component. This version removes the component from the component set. Any class that overrides this method must call this version.

        This version removes the component from the component list.

        Overrides:
        removeComponent in class AbstractListCompositeComponent
        Parameters:
        childComponent - The component to remove from this component.
      • setLayout

        protected <T extends Constraints> void setLayout​(Layout<T> newLayout)
        Sets the layout definition for the component. This is a bound property. The layout is marked as not yet having a theme applied, as the specific theme rules applied to the layout may depend on the layout's owner.
        Type Parameters:
        T - The type of the constraints.
        Parameters:
        newLayout - The new layout definition for the container.
        Throws:
        java.lang.NullPointerException - if the given layout is null.
        See Also:
        LayoutComponent.LAYOUT_PROPERTY
      • isLayoutThemeApplied

        public boolean isLayoutThemeApplied()
        Specified by:
        isLayoutThemeApplied in interface LayoutComponent
        Returns:
        Whether a theme has been applied to this component's layout.
      • updateTheme

        public void updateTheme()
                         throws java.io.IOException
        Description copied from class: AbstractCompositeComponent
        Updates this object's theme. This method checks whether a theme has been applied to this object. If a theme has not been applied to this object this method calls Component.applyTheme(). This method is called for any child components before applying the theme to the component itself, to assure that child theme updates have already occurred before theme updates occur for this component. There is normally no need to override this method or to call this method directly by applications.

        This version recursively calls the AbstractCompositeComponent.updateTheme() method of all child components before updating the theme of this component.

        Specified by:
        updateTheme in interface Component
        Overrides:
        updateTheme in class AbstractCompositeComponent
        Throws:
        java.io.IOException - if there was an error loading or applying a theme.
        See Also:
        Component.isThemeApplied(), Component.applyTheme()
      • applyTheme

        public void applyTheme​(Theme theme)
        Applies a theme and its parents to this object. The theme's rules will be applied to this object and any related objects. Theme application occurs unconditionally, regardless of whether themes have been applied to this component before. There is normally no need to call this method directly by applications.

        This version applies the theme to the current layout.

        Specified by:
        applyTheme in interface Component
        Overrides:
        applyTheme in class AbstractComponent
        Parameters:
        theme - The theme to apply to the object.