public boolean isActive(Component c) { if (c instanceof JComponent) { return JTattooUtilities.isActive((JComponent) c); } else { return true; } }
public void paint(Graphics g) { if (JTattooUtilities.isActive(this) || (alpha >= 1.0)) { super.paint(g); } else { Graphics2D g2D = (Graphics2D) g; Composite composite = g2D.getComposite(); AlphaComposite alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha); g2D.setComposite(alphaComposite); super.paint(g); g2D.setComposite(composite); } }