* Constructor for {@code ValueContext}.
*
* @param component
- * The component related to current value. Can be null.
- * If the component implements {@link HasValue}, it will be returned by {@link #getHasValue()} as well.
+ * The component related to current value. Can be null. If the
+ * component implements {@link HasValue}, it will be returned by
+ * {@link #getHasValue()} as well.
*/
@SuppressWarnings("unchecked")
public ValueContext(Component component) {
Objects.requireNonNull(component,
"Component can't be null in ValueContext construction");
this.component = component;
- if(component instanceof HasValue) {
+ if (component instanceof HasValue) {
hasValue = (HasValue<?>) component;
} else {
hasValue = null;
* The component related to current value. Can be null.
* @param hasValue
* The value source related to current value. Can be null.
+ * @since 8.1
*/
public ValueContext(Component component, HasValue<?> hasValue) {
Objects.requireNonNull(component,
/**
* Constructor for {@code ValueContext}.
*
- * @param
- * component
+ * @param component
* The component can be {@code null}.
* @param locale
* The locale used with conversion. Can be {@code null}.
* @param hasValue
- * The value source related to current value. Can be {@code null}.
+ * The value source related to current value. Can be
+ * {@code null}.
+ * @since 8.1
*/
- public ValueContext(Component component, HasValue<?> hasValue, Locale locale) {
+ public ValueContext(Component component, HasValue<?> hasValue,
+ Locale locale) {
this.component = component;
this.hasValue = hasValue;
this.locale = locale;
/**
* Returns an {@code Optional} for the {@code HasValue} used in the value
- * conversion. In certain complicated cases, ex. cross-field validation, HasValue might be not available.
+ * conversion. In certain complicated cases, ex. cross-field validation,
+ * HasValue might be not available.
*
* @return the optional of {@code HasValue}
+ * @since 8.1
*/
@SuppressWarnings("unused")
public Optional<HasValue<?>> getHasValue() {
private final boolean userOriginated;
+ /**
+ * Creates a split position change event.
+ *
+ * @param source
+ * split panel from which the event originates
+ * @param userOriginated
+ * true if the event is directly based on user actions
+ * @param oldPosition
+ * old split position
+ * @param oldUnit
+ * old unit of split position
+ * @param position
+ * new split position
+ * @param unit
+ * new split position unit
+ * @since 8.1
+ */
public SplitPositionChangeEvent(final Component source,
final boolean userOriginated, final float oldPosition,
final Unit oldUnit, final float position, final Unit unit) {
return oldUnit;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @since 8.1
+ */
@Override
public boolean isUserOriginated() {
return userOriginated;
*/
public void addStyleName(String style);
-
/**
- * Adds one or more style names to this component by using one or multiple parameters.
+ * Adds one or more style names to this component by using one or multiple
+ * parameters.
+ *
* @param styles
* the style name or style names to be added to the component
* @see #addStyleName(String)
* @see #setStyleName(String)
* @see #removeStyleName(String)
+ * @since 8.1
*/
- public default void addStyleNames(String ... styles) {
+ public default void addStyleNames(String... styles) {
for (String style : styles) {
addStyleName(style);
}
/**
* Removes one or more style names from component. Multiple styles can be
* specified by using multiple parameters.
+ *
* @param styles
* the style name or style names to be removed
* @see #removeStyleName(String)
* @see #setStyleName(String)
* @see #addStyleName(String)
+ * @since 8.1
*/
- public default void removeStyleNames(String ... styles) {
+ public default void removeStyleNames(String... styles) {
for (String style : styles) {
removeStyleName(style);
}
* @param userOriginated
* <code>true</code> if the event originates from the client
* side, <code>false</code> otherwise
+ * @since 8.1
*/
public void setSelectedTab(Component component, boolean userOriginated) {
if (component != null && components.contains(component)
* @param userOriginated
* <code>true</code> if the event originates from the client
* side, <code>false</code> otherwise
+ * @since 8.1
*/
public SelectedTabChangeEvent(Component source,
boolean userOriginated) {
return (TabSheet) getSource();
}
+ /**
+ * {@inheritDoc}
+ *
+ * @since 8.1
+ */
@Override
public boolean isUserOriginated() {
return userOriginated;
* @param userOriginated
* <code>true</code> if the event originates from the client
* side, <code>false</code> otherwise
- * @since
+ * @since 8.1
*/
protected void fireSelectedTabChange(boolean userOriginated) {
fireEvent(new SelectedTabChangeEvent(this, userOriginated));