code: private float getAlpha() {
         float alpha = 1.0f;
         if (this.composite instanceof AlphaComposite) {
             AlphaComposite ac = (AlphaComposite) this.composite;
             alpha = ac.getAlpha();
         }
         return alpha;
      }
docs: Returns the current alpha (transparency) in the range 0.0 to 1.0.
  If the current composite is an {@link AlphaComposite} we read the alpha
  value from there, otherwise this method returns 1.0.
  
  @return The current alpha (transparency) in the range 0.0 to 1.0.