Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlUpdatableValue.java
private final Control control;
	private final String attribute;
	/**
	 * @param control
	 * @param attribute
	 */
	public ControlUpdatableValue(Control control, String attribute) {
		this.control = control;
		this.attribute = attribute;
		if (!attribute.equals(SWTProperties.ENABLED) && !attribute.equals(SWTProperties.VISIBLE)) {
			throw new IllegalArgumentException();
		}
	}
	public void setValue(Object value) {
		Object oldValue = computeValue();
		if (attribute.equals(SWTProperties.ENABLED)) {
			control.setEnabled(((Boolean) value).booleanValue());
		} else if (attribute.equals(SWTProperties.VISIBLE)) {
			control.setVisible(((Boolean) value).booleanValue());
		}
		fireChangeEvent(ChangeEvent.CHANGE, oldValue, value);
	}
	public Object computeValue() {
		return new Boolean(attribute.equals(SWTProperties.ENABLED) ? control.getEnabled() : control.getVisible());
	}
	public Class getValueType() {
		return Boolean.TYPE;
	}
}