/** * Sets the transparency value. The valid value range is <code>0.0F</code> to <code>1.0F</code>. * * @param transparency the transparency value * @throws IllegalArgumentException if the given transparency value is out of range. */ public void setTransparency(float transparency) { if (transparency < 0.0F || transparency > 1.0F) { throw new IllegalArgumentException("transparency must be >= 0 and <= 1"); } if (_transparency != transparency) { _transparency = transparency; fireProductNodeChanged(PROPERTY_NAME_TRANSPARENCY); setModified(true); } }
/** * Sets the boolean flag expression code of this <code>BitmaskDef</code> instance. Also sets the <code>term</code> * property if the given string representation of the expression can be compiled. * * @param expr the string representation of the expression * @throws IllegalArgumentException if the expression is invalid (and not parsable) */ public void setExpr(String expr) { if (!ObjectUtils.equalObjects(expr, _expr)) { _expr = (expr != null) ? expr : ""; fireProductNodeChanged(PROPERTY_NAME_EXPR); setModified(true); } }
/** * Sets the color of this bitmask definition. A bitmask definition must allways have a color. If the given color is * <code>null</code> the default color is set to this bitmask definition. * * @param color the color to be set */ public void setColor(Color color) { if (!ObjectUtils.equalObjects(_color, color)) { if (color != null) { _color = color; } else { _color = _DEFAULT_COLOR; } fireProductNodeChanged(PROPERTY_NAME_COLOR); setModified(true); } }