Class JXCollapsiblePane.WrapperContainer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, AlphaPaintable
Enclosing class:
JXCollapsiblePane

private final class JXCollapsiblePane.WrapperContainer extends JViewport implements AlphaPaintable
  • Field Details

    • collapsedState

      boolean collapsedState
    • alpha

      private volatile float alpha
    • oldOpaque

      private boolean oldOpaque
  • Constructor Details

    • WrapperContainer

      public WrapperContainer(Container c)
  • Method Details

    • scrollRectToVisible

      public void scrollRectToVisible(Rectangle aRect)

      Overridden to not have JViewPort behaviour (that is scroll the view) but delegate to parent scrollRectToVisible just a JComponent does.

      Overrides:
      scrollRectToVisible in class JViewport
    • getAlpha

      public float getAlpha()
      Description copied from interface: AlphaPaintable
      Get the current alpha value.
      Specified by:
      getAlpha in interface AlphaPaintable
      Returns:
      the alpha translucency level for this component. This will be a value between 0 and 1, inclusive.
    • setAlpha

      public void setAlpha(float alpha)
      Description copied from interface: AlphaPaintable
      Set the alpha transparency level for this component. This automatically causes a repaint of the component.
      Specified by:
      setAlpha in interface AlphaPaintable
      Parameters:
      alpha - must be a value between 0 and 1 inclusive
    • isInheritAlpha

      public boolean isInheritAlpha()
      Description copied from interface: AlphaPaintable
      Returns the state of the panel with respect to inheriting alpha values.
      Specified by:
      isInheritAlpha in interface AlphaPaintable
      Returns:
      true if this panel inherits alpha values; false otherwise
      See Also:
    • setInheritAlpha

      public void setInheritAlpha(boolean inheritAlpha)
      Description copied from interface: AlphaPaintable
      Determines if the effective alpha of this component should include the alpha of ancestors.
      Specified by:
      setInheritAlpha in interface AlphaPaintable
      Parameters:
      inheritAlpha - true to include ancestral alpha data; false otherwise
      See Also:
    • getEffectiveAlpha

      public float getEffectiveAlpha()
      Description copied from interface: AlphaPaintable
      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."
      Specified by:
      getEffectiveAlpha in interface AlphaPaintable
      Returns:
      the lowest alpha value in the hierarchy
    • isPaintingOrigin

      protected boolean isPaintingOrigin()
      Overrides:
      isPaintingOrigin in class JViewport
    • paint

      public void paint(Graphics g)
      Overridden paint method to take into account the alpha setting.
      Overrides:
      paint in class JViewport
      Parameters:
      g - the Graphics context in which to paint