Interface AlphaPaintable

All Known Implementing Classes:
AbstractPatternPanel, BasicCalendarHeaderHandler.BasicCalendarHeader, GradientPreviewPanel, JXCollapsiblePane, JXCollapsiblePane.WrapperContainer, JXDatePicker.TodayPanel, JXFindBar, JXFindPanel, JXGradientChooser, JXGraph, JXHeader, JXImagePanel, JXImageView, JXLoginPane, JXLoginPane.JXBtnPanel, JXPanel, JXSearchPanel, JXTaskPaneContainer, JXTipOfTheDay, JXTitledPanel, JXTitledSeparator, SpinningCalendarHeaderHandler.SpinningCalendarHeader, WrappingIconPanel

interface AlphaPaintable
An interface to describe an object that is capable of painting with an alpha value.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Get the current alpha value.
    float
    Unlike other properties, alpha can be set on a component, or on one of its parents.
    boolean
    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 Details

    • 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:
      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

      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:
    • 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