/** * Returns whether or not the container hierarchy below is * transparent. * * @return */ protected boolean isAlpha() { // PENDING JW: use effective alpha? return getAlpha() < 1.0f; }
/** * Returns whether or not the container hierarchy below is * transparent. * * @return */ protected boolean isAlpha() { // PENDING JW: use effective alpha? return getAlpha() < 1.0f; }
/** * Returns whether or not the container hierarchy below is * transparent. * * @return */ protected boolean isAlpha() { // PENDING JW: use effective alpha? return getAlpha() < 1.0f; }
/** * Returns whether or not the container hierarchy below is * transparent. * * @return */ protected boolean isAlpha() { // PENDING JW: use effective alpha? return getAlpha() < 1.0f; }
protected boolean isPaintingOrigin() { return getAlpha() < 1f; }
protected boolean isPaintingOrigin() { return getAlpha() < 1f; }
protected boolean isPaintingOrigin() { return getAlpha() < 1f; }
protected boolean isPaintingOrigin() { return getAlpha() < 1f; }
/** * 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 heirarchy "wins" */ public float getEffectiveAlpha() { if (inheritAlpha) { float a = alpha; Component c = this; while ((c = c.getParent()) != null) { if (c instanceof JXPanel) { a = Math.min(((JXPanel)c).getAlpha(), a); } } return a; } else { return alpha; } }
@Override protected boolean toPaintBackground(JComponent c) { boolean result = super.toPaintBackground(c); if (c instanceof JXPanel) { JXPanel jxPanel = (JXPanel) c; if (jxPanel.getAlpha() < 1.0) return true; } return result; }
/** * {@inheritDoc} */ @Override public float getEffectiveAlpha() { float a = getAlpha(); if (isInheritAlpha()) { for (Component c = getParent(); c != null; c = c.getParent()) { if (c instanceof AlphaPaintable) { a = Math.min(((AlphaPaintable) c).getEffectiveAlpha(), a); break; } } } return a; }
/** * {@inheritDoc} */ @Override public float getEffectiveAlpha() { float a = getAlpha(); if (isInheritAlpha()) { for (Component c = getParent(); c != null; c = c.getParent()) { if (c instanceof AlphaPaintable) { a = Math.min(((AlphaPaintable) c).getEffectiveAlpha(), a); break; } } } return a; }
/** * {@inheritDoc} */ @Override public float getEffectiveAlpha() { float a = getAlpha(); if (isInheritAlpha()) { for (Component c = getParent(); c != null; c = c.getParent()) { if (c instanceof AlphaPaintable) { a = Math.min(((AlphaPaintable) c).getEffectiveAlpha(), a); break; } } } return a; }
/** * {@inheritDoc} */ @Override public float getEffectiveAlpha() { float a = getAlpha(); if (isInheritAlpha()) { for (Component c = getParent(); c != null; c = c.getParent()) { if (c instanceof AlphaPaintable) { a = Math.min(((AlphaPaintable) c).getEffectiveAlpha(), a); break; } } } return a; }
public void paint(Graphics g) { if (getAlpha() == 1f) { super.paint(g); } else {