Interface AlphaPaintable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      float getAlpha()
      Get the current alpha value.
      float getEffectiveAlpha()
      Unlike other properties, alpha can be set on a component, or on one of its parents.
      boolean isInheritAlpha()
      Returns the state of the panel with respect to inheriting alpha values.
      void setAlpha​(float alpha)
      Set the alpha transparency level for this component.
      void setInheritAlpha​(boolean inheritAlpha)
      Determines if the effective alpha of this component should include the alpha of ancestors.
    • Method Detail

      • getAlpha

        float getAlpha()
        Get the current alpha value.
        Returns:
        the alpha translucency level for this component. This will be a value between 0 and 1, inclusive.
      • setAlpha

        void setAlpha​(float alpha)
        Set the alpha transparency level for this component. This automatically causes a repaint of the component.
        Parameters:
        alpha - must be a value between 0 and 1 inclusive
        Throws:
        java.lang.IllegalArgumentException - if the value is invalid
      • isInheritAlpha

        boolean isInheritAlpha()
        Returns the state of the panel with respect to inheriting alpha values.
        Returns:
        true if this panel inherits alpha values; false otherwise
        See Also:
        setInheritAlpha(boolean)
      • setInheritAlpha

        void setInheritAlpha​(boolean inheritAlpha)
        Determines if the effective alpha of this component should include the alpha of ancestors.
        Parameters:
        inheritAlpha - true to include ancestral alpha data; false otherwise
        See Also:
        isInheritAlpha(), getEffectiveAlpha()
      • getEffectiveAlpha

        float getEffectiveAlpha()
        Unlike other properties, alpha can be set on a component, or on one of its parents. If the alpha of a parent component is .4, and the alpha on this component is .5, effectively the alpha for this component is .4 because the lowest alpha in the hierarchy "wins."
        Returns:
        the lowest alpha value in the hierarchy