package com.vaadin.ui;
import java.lang.reflect.Method;
+import java.util.logging.Logger;
import com.vaadin.data.Property;
import com.vaadin.data.util.converter.Converter;
Property.Viewer, Property.ValueChangeListener,
Property.ValueChangeNotifier, Comparable<Label> {
+ private static final Logger logger = Logger
+ .getLogger(Label.class.getName());
+
/**
* @deprecated From 7.0, use {@link ContentMode#TEXT} instead
*/
}
/**
+ * Returns the value displayed by this label.
+ *
* @see java.lang.Object#toString()
- * @deprecated Use {@link #getValue()} instead
+ * @deprecated As of 7.0.0, use {@link #getValue()} to get the value of the
+ * label or {@link #getPropertyDataSource()} .getValue() to get
+ * the value of the data source.
*/
@Deprecated
@Override
public String toString() {
- throw new UnsupportedOperationException(
- "Use getValue() instead of Label.toString()");
+ logger.warning("You are using Label.toString() to get the value for a "
+ + getClass().getSimpleName()
+ + ". This is not recommended and will not be supported in future versions.");
+ return getValue();
}
/**