Interface ConstrainedVisual

    • Method Detail

      • setSize

        void setSize​(int width,
                     int height)
        Sets the visual's render size.
        Parameters:
        width - The visual's new width.
        height - The visual's new height.
      • setSize

        default void setSize​(Dimensions size)
        Default method to set the visual size via a Dimensions value.
        Parameters:
        size - The complete size of this visual.
      • getPreferredWidth

        int getPreferredWidth​(int height)
        Returns the visual's preferred width given the provided height constraint.
        Parameters:
        height - The height by which to constrain the preferred width, or -1 for no constraint.
        Returns:
        The preferred width given the height constraint.
      • getPreferredHeight

        int getPreferredHeight​(int width)
        Returns the visual's preferred height given the provided width constraint.
        Parameters:
        width - The width by which to constrain the preferred height, or -1 for no constraint.
        Returns:
        The preferred height given the width constraint.
      • getPreferredSize

        Dimensions getPreferredSize()
        Returns the visual's unconstrained preferred size.
        Returns:
        The unconstrained preferred size for this component.
      • getBaseline

        int getBaseline​(int width,
                        int height)
        Returns the baseline for a given width and height.
        Parameters:
        width - Constrained width to compute the baseline for.
        height - Constrained height to compute the baseline for.
        Returns:
        The baseline relative to the origin of this visual, or -1 if this visual does not have a baseline.