Browse Source

Format the project using Neon, remove trailing whitespace

Change-Id: I145e20226958910c243b9897bb1e9516919f55cd
tags/8.0.0.alpha1
Artur Signell 7 years ago
parent
commit
82806ef9b7
100 changed files with 360 additions and 435 deletions
  1. 2
    1
      client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java
  2. 0
    1
      client/src/main/java/com/vaadin/client/BrowserInfo.java
  3. 0
    1
      client/src/main/java/com/vaadin/client/LayoutManager.java
  4. 0
    1
      client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java
  5. 0
    1
      client/src/main/java/com/vaadin/client/Util.java
  6. 0
    1
      client/src/main/java/com/vaadin/client/WidgetUtil.java
  7. 0
    1
      client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java
  8. 0
    1
      client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java
  9. 0
    1
      client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java
  10. 0
    1
      client/src/main/java/com/vaadin/client/ui/VButton.java
  11. 2
    1
      client/src/main/java/com/vaadin/client/ui/VFormLayout.java
  12. 0
    1
      client/src/main/java/com/vaadin/client/ui/VLabel.java
  13. 0
    1
      client/src/main/java/com/vaadin/client/ui/VUpload.java
  14. 0
    1
      client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java
  15. 0
    1
      client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java
  16. 0
    1
      client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java
  17. 0
    1
      compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java
  18. 2
    1
      compatibility-client/src/main/java/com/vaadin/v7/client/connectors/TextRendererConnector.java
  19. 0
    1
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/JsniMousewheelHandler.java
  20. 1
    3
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java
  21. 0
    1
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java
  22. 2
    2
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java
  23. 0
    1
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/TreeConnector.java
  24. 9
    9
      compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java
  25. 3
    3
      compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java
  26. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/Container.java
  27. 4
    6
      compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java
  28. 15
    18
      compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java
  29. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java
  30. 3
    3
      compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java
  31. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java
  32. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java
  33. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java
  34. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java
  35. 1
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java
  36. 5
    8
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java
  37. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java
  38. 2
    4
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java
  39. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java
  40. 1
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java
  41. 1
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java
  42. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java
  43. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java
  44. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java
  45. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java
  46. 7
    7
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java
  47. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java
  48. 7
    7
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java
  49. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java
  50. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java
  51. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java
  52. 15
    15
      compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
  53. 2
    3
      compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java
  54. 3
    6
      compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java
  55. 1
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java
  56. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java
  57. 3
    4
      compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java
  58. 7
    7
      compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
  59. 1
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java
  60. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java
  61. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java
  62. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/TextField.java
  63. 5
    5
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java
  64. 5
    10
      compatibility-server/src/test/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactoryTest.java
  65. 1
    2
      compatibility-server/src/test/java/com/vaadin/v7/data/util/TransactionalPropertyWrapperTest.java
  66. 1
    2
      compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/AnyEnumToStringConverterTest.java
  67. 2
    4
      compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/ConverterFactoryTest.java
  68. 4
    4
      compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/CompositeValidatorTest.java
  69. 7
    9
      compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/DateRangeValidatorTest.java
  70. 2
    4
      compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/NullValidatorTest.java
  71. 4
    4
      compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/RegexpValidatorTest.java
  72. 1
    2
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/SerializationTest.java
  73. 2
    2
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java
  74. 3
    4
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/fieldgroup/BeanFieldGroupTest.java
  75. 81
    86
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java
  76. 1
    2
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldTest.java
  77. 2
    2
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldWithValidatorTest.java
  78. 1
    2
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/renderer/RendererTest.java
  79. 18
    18
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/BeanValidationTest.java
  80. 4
    8
      compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/RangeValidatorTest.java
  81. 8
    9
      server/src/main/java/com/vaadin/data/BeanBinder.java
  82. 3
    3
      server/src/main/java/com/vaadin/data/HasValue.java
  83. 11
    11
      server/src/main/java/com/vaadin/data/Listing.java
  84. 6
    6
      server/src/main/java/com/vaadin/data/selection/AbstractSelectionModel.java
  85. 12
    12
      server/src/main/java/com/vaadin/data/selection/SingleSelection.java
  86. 1
    2
      server/src/main/java/com/vaadin/data/util/BeanUtil.java
  87. 2
    2
      server/src/main/java/com/vaadin/data/validator/BeanValidator.java
  88. 5
    5
      server/src/main/java/com/vaadin/event/EventListener.java
  89. 2
    2
      server/src/main/java/com/vaadin/server/data/DataGenerator.java
  90. 6
    6
      server/src/main/java/com/vaadin/ui/AbstractListing.java
  91. 4
    4
      server/src/test/java/com/vaadin/data/BeanBinderTest.java
  92. 1
    2
      uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/SelectElement.java
  93. 1
    2
      uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/TreeElement.java
  94. 2
    4
      uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java
  95. 1
    2
      uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java
  96. 1
    2
      uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java
  97. 2
    4
      uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java
  98. 2
    1
      uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java
  99. 1
    2
      uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java
  100. 0
    0
      uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java

+ 2
- 1
client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java View File

@@ -142,7 +142,8 @@ public class RendererVisitor extends TypeVisitor {
+ AbstractRendererConnector.class.getName());
}

private static boolean isAbstractRendererConnector(String connectorSrcName) {
private static boolean isAbstractRendererConnector(
String connectorSrcName) {
return connectorSrcName
.equals(AbstractRendererConnector.class.getName())
|| connectorSrcName

+ 0
- 1
client/src/main/java/com/vaadin/client/BrowserInfo.java View File

@@ -520,4 +520,3 @@ public class BrowserInfo {
return (getBrowserMajorVersion() > majorVersion);
}
}


+ 0
- 1
client/src/main/java/com/vaadin/client/LayoutManager.java View File

@@ -1846,4 +1846,3 @@ public class LayoutManager {
return false;
}
}


+ 0
- 1
client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java View File

@@ -94,4 +94,3 @@ public class MouseEventDetailsBuilder {
}

}


+ 0
- 1
client/src/main/java/com/vaadin/client/Util.java View File

@@ -1260,4 +1260,3 @@ public class Util {
return Logger.getLogger(Util.class.getName());
}
}


+ 0
- 1
client/src/main/java/com/vaadin/client/WidgetUtil.java View File

@@ -1775,4 +1775,3 @@ public class WidgetUtil {
return integerPart + ((int) nrFractions) / divisor;
}
}


+ 0
- 1
client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java View File

@@ -312,4 +312,3 @@ public class InfoSection implements Section {
}

}


+ 0
- 1
client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java View File

@@ -409,4 +409,3 @@ public class ResponsiveConnector extends AbstractExtensionConnector
}-*/;

}


+ 0
- 1
client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java View File

@@ -497,4 +497,3 @@ public class VAbsoluteLayout extends ComplexPanel {
}
}
}


+ 0
- 1
client/src/main/java/com/vaadin/client/ui/VButton.java View File

@@ -468,4 +468,3 @@ public class VButton extends FocusWidget implements ClickHandler {
}-*/;

}


+ 2
- 1
client/src/main/java/com/vaadin/client/ui/VFormLayout.java View File

@@ -303,7 +303,8 @@ public class VFormLayout extends SimplePanel {
}

boolean required = owner instanceof HasRequiredIndicator
&& ((HasRequiredIndicator) owner).isRequiredIndicatorVisible();
&& ((HasRequiredIndicator) owner)
.isRequiredIndicatorVisible();

AriaHelper.handleInputRequired(owner.getWidget(), required);


+ 0
- 1
client/src/main/java/com/vaadin/client/ui/VLabel.java View File

@@ -58,4 +58,3 @@ public class VLabel extends HTML {
}

}


+ 0
- 1
client/src/main/java/com/vaadin/client/ui/VUpload.java View File

@@ -391,4 +391,3 @@ public class VUpload extends SimplePanel {
}

}


+ 0
- 1
client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java View File

@@ -800,4 +800,3 @@ public class Slot extends SimplePanel {
}
}
}


+ 0
- 1
client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java View File

@@ -735,4 +735,3 @@ public class VAbstractOrderedLayout extends FlowPanel {
}

}


+ 0
- 1
client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java View File

@@ -568,4 +568,3 @@ public class VBrowserDetailsUserAgentParserTest {
}

}


+ 0
- 1
compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java View File

@@ -275,4 +275,3 @@ public class JavaScriptRendererConnector
return helper;
}
}


+ 2
- 1
compatibility-client/src/main/java/com/vaadin/v7/client/connectors/TextRendererConnector.java View File

@@ -25,7 +25,8 @@ import com.vaadin.v7.client.renderers.TextRenderer;
* @author Vaadin Ltd
*/
@Connect(com.vaadin.v7.ui.renderers.TextRenderer.class)
public class TextRendererConnector extends AbstractGridRendererConnector<String> {
public class TextRendererConnector
extends AbstractGridRendererConnector<String> {

@Override
public TextRenderer getRenderer() {

+ 0
- 1
compatibility-client/src/main/java/com/vaadin/v7/client/ui/JsniMousewheelHandler.java View File

@@ -72,4 +72,3 @@ abstract class JsniMousewheelHandler {
}-*/;

}


+ 1
- 3
compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java View File

@@ -6493,8 +6493,7 @@ public class VScrollTable extends FlowPanel
if (!(widget instanceof VLabel)
&& !(widget instanceof VEmbedded)
&& !(widget instanceof VTextField
&& ((VTextField) widget)
.isReadOnly())) {
&& ((VTextField) widget).isReadOnly())) {
return null;
}
}
@@ -8419,4 +8418,3 @@ public class VScrollTable extends FlowPanel
}

}


+ 0
- 1
compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java View File

@@ -2271,4 +2271,3 @@ public class VTree extends FocusElementPanel
Util.notifyParentOfSizeChange(this, false);
}
}


+ 2
- 2
compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java View File

@@ -31,8 +31,8 @@ import com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid;
/**
* A class that defines the default implementation for a color picker grid
* connector. Connects the server side
* {@link com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid} with the client
* side counterpart {@link VColorPickerGrid}
* {@link com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid} with the
* client side counterpart {@link VColorPickerGrid}
*
* @since 7.0.0
*/

+ 0
- 1
compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/TreeConnector.java View File

@@ -389,4 +389,3 @@ public class TreeConnector extends AbstractComponentConnector
WidgetUtil.clearTextSelection();
}
}


+ 9
- 9
compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java View File

@@ -673,13 +673,13 @@ public class Escalator extends Widget
/*-{
var vScroll = esc.@com.vaadin.v7.client.widgets.Escalator::verticalScrollbar;
var vScrollElem = vScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()();
var hScroll = esc.@com.vaadin.v7.client.widgets.Escalator::horizontalScrollbar;
var hScrollElem = hScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()();
return $entry(function(e) {
var target = e.target;
// in case the scroll event was native (i.e. scrollbars were dragged, or
// the scrollTop/Left was manually modified), the bundles have old cache
// values. We need to make sure that the caches are kept up to date.
@@ -700,29 +700,29 @@ public class Escalator extends Widget
return $entry(function(e) {
var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX;
var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY;
// Delta mode 0 is in pixels; we don't need to do anything...
// A delta mode of 1 means we're scrolling by lines instead of pixels
// We need to scale the number of lines by the default line height
if(e.deltaMode === 1) {
var brc = esc.@com.vaadin.v7.client.widgets.Escalator::body;
deltaY *= brc.@com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer::getDefaultRowHeight()();
}
// Other delta modes aren't supported
if((e.deltaMode !== undefined) && (e.deltaMode >= 2 || e.deltaMode < 0)) {
var msg = "Unsupported wheel delta mode \"" + e.deltaMode + "\"";
// Print warning message
esc.@com.vaadin.v7.client.widgets.Escalator::logWarning(*)(msg);
}
// IE8 has only delta y
if (isNaN(deltaY)) {
deltaY = -0.5*e.wheelDelta;
}
@com.vaadin.v7.client.widgets.Escalator.JsniUtil::moveScrollFromEvent(*)(esc, deltaX, deltaY, e);
});
}-*/;

+ 3
- 3
compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java View File

@@ -201,9 +201,9 @@ import com.vaadin.v7.shared.ui.grid.ScrollDestination;
* might have a {@link com.vaadin.v7.client.renderers.TextRenderer TextRenderer}
* that simply takes in a {@code String} and displays it as the cell's content.
* A more complex renderer might be
* {@link com.vaadin.v7.client.renderers.ProgressBarRenderer ProgressBarRenderer}
* that takes in a floating point number, and displays a progress bar instead,
* based on the given number.
* {@link com.vaadin.v7.client.renderers.ProgressBarRenderer
* ProgressBarRenderer} that takes in a floating point number, and displays a
* progress bar instead, based on the given number.
* <p>
* <em>See:</em> {@link #addColumn(Column)}, {@link #addColumn(Column, int)} and
* {@link #addColumns(Column...)}. <em>Also</em>

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/Container.java View File

@@ -839,8 +839,8 @@ public interface Container extends Serializable {
* Adding items (if supported) to a filtered {@link Ordered} or
* {@link Indexed} container should insert them immediately after the
* indicated visible item. The unfiltered position of items added at index
* 0, at index {@link com.vaadin.v7.data.Container#size()} or at an undefined
* position is up to the implementation.
* 0, at index {@link com.vaadin.v7.data.Container#size()} or at an
* undefined position is up to the implementation.
* </p>
* <p>
* The functionality of SimpleFilterable can be implemented using the

+ 4
- 6
compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java View File

@@ -156,8 +156,8 @@ public class BeanFieldGroup<T> extends FieldGroup {
}

@Override
public <T extends Field> T buildAndBind(String caption,
Object propertyId, Class<T> fieldType) throws BindException {
public <T extends Field> T buildAndBind(String caption, Object propertyId,
Class<T> fieldType) throws BindException {
ensureNestedPropertyAdded(propertyId);
return super.buildAndBind(caption, propertyId, fieldType);
}
@@ -227,8 +227,7 @@ public class BeanFieldGroup<T> extends FieldGroup {
* @param bean
* the bean to be bound
* @param objectWithMemberFields
* the class that contains {@link Field}s for bean
* properties
* the class that contains {@link Field}s for bean properties
* @return the bean field group used to make binding
*/
public static <T> BeanFieldGroup<T> bindFieldsUnbuffered(T bean,
@@ -249,8 +248,7 @@ public class BeanFieldGroup<T> extends FieldGroup {
* @param bean
* the bean to be bound
* @param objectWithMemberFields
* the class that contains {@link Field}s for bean
* properties
* the class that contains {@link Field}s for bean properties
* @return the bean field group used to make binding
*/
public static <T> BeanFieldGroup<T> bindFieldsBuffered(T bean,

+ 15
- 18
compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java View File

@@ -245,8 +245,7 @@ public class FieldGroup implements Serializable {
* If the field is null or the property id is already bound to
* another field by this field binder
*/
public void bind(Field<?> field, Object propertyId)
throws BindException {
public void bind(Field<?> field, Object propertyId) throws BindException {
throwIfFieldIsNull(field, propertyId);
throwIfPropertyIdAlreadyBound(field, propertyId);

@@ -745,8 +744,8 @@ public class FieldGroup implements Serializable {
/**
* Checks the validity of the bound fields.
* <p>
* Call the {@link Field#validate()} for the fields to get the
* individual error messages.
* Call the {@link Field#validate()} for the fields to get the individual
* error messages.
*
* @return true if all bound fields are valid, false otherwise.
*/
@@ -841,9 +840,9 @@ public class FieldGroup implements Serializable {
* that have not been initialized.
* <p>
* This method processes all (Java) member fields whose type extends
* {@link Field} and that can be mapped to a property id. Property ids
* are searched in the following order: @{@link PropertyId} annotations,
* exact field name matches and the case-insensitive matching that ignores
* {@link Field} and that can be mapped to a property id. Property ids are
* searched in the following order: @{@link PropertyId} annotations, exact
* field name matches and the case-insensitive matching that ignores
* underscores. Fields that are not initialized (null) are built using the
* field factory. All non-null fields for which a property id can be
* determined are bound to the property id.
@@ -886,9 +885,9 @@ public class FieldGroup implements Serializable {
* member fields that have not been initialized.
* <p>
* This method processes all (Java) member fields whose type extends
* {@link Field} and that can be mapped to a property id. Property ids
* are searched in the following order: @{@link PropertyId} annotations,
* exact field name matches and the case-insensitive matching that ignores
* {@link Field} and that can be mapped to a property id. Property ids are
* searched in the following order: @{@link PropertyId} annotations, exact
* field name matches and the case-insensitive matching that ignores
* underscores. Fields that are not initialized (null) are built using the
* field factory is buildFields is true. All non-null fields for which a
* property id can be determined are bound to the property id.
@@ -1154,8 +1153,7 @@ public class FieldGroup implements Serializable {
* finder.
* @throws BindException
* If there is a problem while building or binding
* @return The created and bound field. Can be any type of
* {@link Field}.
* @return The created and bound field. Can be any type of {@link Field}.
*/
public Field<?> buildAndBind(String caption, Object propertyId)
throws BindException {
@@ -1173,12 +1171,11 @@ public class FieldGroup implements Serializable {
* finder.
* @throws BindException
* If the field could not be created
* @return The created and bound field. Can be any type of
* {@link Field}.
* @return The created and bound field. Can be any type of {@link Field}.
*/

public <T extends Field> T buildAndBind(String caption,
Object propertyId, Class<T> fieldType) throws BindException {
public <T extends Field> T buildAndBind(String caption, Object propertyId,
Class<T> fieldType) throws BindException {
Class<?> type = getPropertyType(propertyId);

T field = build(caption, type, fieldType);
@@ -1191,8 +1188,8 @@ public class FieldGroup implements Serializable {
* Creates a field based on the given data type.
* <p>
* The data type is the type that we want to edit using the field. The field
* type is the type of field we want to create, can be {@link Field}
* if any LegacyField is good.
* type is the type of field we want to create, can be {@link Field} if any
* LegacyField is good.
* </p>
*
* @param caption

+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java View File

@@ -33,11 +33,10 @@ public interface FieldGroupFieldFactory extends Serializable {
* @param dataType
* The type that we want to edit using the field
* @param fieldType
* The type of field we want to create. If set to
* {@link Field} then any type of field is accepted
* The type of field we want to create. If set to {@link Field}
* then any type of field is accepted
* @return A field that can be assigned to the given fieldType and that is
* capable of editing the given type of data
*/
<T extends Field> T createField(Class<?> dataType,
Class<T> fieldType);
<T extends Field> T createField(Class<?> dataType, Class<T> fieldType);
}

+ 3
- 3
compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java View File

@@ -29,9 +29,9 @@ import com.vaadin.v7.ui.Field;
* The automatic data binding in FieldGroup and BeanFieldGroup relies on a
* naming convention by default: properties of an item are bound to similarly
* named field components in given a editor object. If you want to map a
* property with a different name (ID) to a
* {@link com.vaadin.client.ui.Field}, you can use this annotation for the
* member fields, with the name (ID) of the desired property as the parameter.
* property with a different name (ID) to a {@link com.vaadin.client.ui.Field},
* you can use this annotation for the member fields, with the name (ID) of the
* desired property as the parameter.
* <p>
* In following usage example, the text field would be bound to property "foo"
* in the Entity class. <code>

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java View File

@@ -536,7 +536,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE>
/**
* Adds the bean after the given bean.
*
* @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, Object)
* @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object,
* Object)
*/
protected BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId,
IDTYPE newItemId, BEANTYPE bean) {

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java View File

@@ -92,7 +92,8 @@ public class BeanContainer<IDTYPE, BEANTYPE>
/**
* Adds the bean after the given item id.
*
* @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, Object)
* @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object,
* Object)
*/
@Override
public BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId,

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java View File

@@ -186,7 +186,8 @@ public class BeanItemContainer<BEANTYPE>
* @param newItemId
* the bean (of type BT) to add (not null)
*
* @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, Object)
* @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object,
* Object)
*/
@Override
@SuppressWarnings("unchecked")

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java View File

@@ -239,7 +239,8 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String>
* This should not be called directly.
*/
@Override
public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event) {
public void valueChange(
com.vaadin.v7.data.Property.ValueChangeEvent event) {
fireValueChange();
}


+ 1
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java View File

@@ -32,8 +32,7 @@ import java.util.Locale;
* @since 7.1
* @author Vaadin Ltd
*/
public class DateToSqlDateConverter
implements Converter<Date, java.sql.Date> {
public class DateToSqlDateConverter implements Converter<Date, java.sql.Date> {

@Override
public java.sql.Date convertToModel(Date value,

+ 5
- 8
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java View File

@@ -24,8 +24,8 @@ import java.util.logging.Logger;
import com.vaadin.server.VaadinSession;

/**
* Default implementation of {@link ConverterFactory}. Provides converters
* for standard types like {@link String}, {@link Double} and {@link Date}.
* Default implementation of {@link ConverterFactory}. Provides converters for
* standard types like {@link String}, {@link Double} and {@link Date}.
* </p>
* <p>
* Custom converters can be provided by extending this class and using
@@ -57,8 +57,7 @@ public class DefaultConverterFactory implements ConverterFactory {
if (reverseConverter != null) {
log.finest(getClass().getName() + " created a reverse "
+ reverseConverter.getClass());
return new ReverseConverter<PRESENTATION, MODEL>(
reverseConverter);
return new ReverseConverter<PRESENTATION, MODEL>(reverseConverter);
}

log.finest(getClass().getName() + " could not find a converter for "
@@ -90,8 +89,7 @@ public class DefaultConverterFactory implements ConverterFactory {

}

protected Converter<Date, ?> createDateConverter(
Class<?> sourceType) {
protected Converter<Date, ?> createDateConverter(Class<?> sourceType) {
if (Long.class.isAssignableFrom(sourceType)) {
return new DateToLongConverter();
} else if (java.sql.Date.class.isAssignableFrom(sourceType)) {
@@ -101,8 +99,7 @@ public class DefaultConverterFactory implements ConverterFactory {
}
}

protected Converter<String, ?> createStringConverter(
Class<?> sourceType) {
protected Converter<String, ?> createStringConverter(Class<?> sourceType) {
if (Double.class.isAssignableFrom(sourceType)) {
return new StringToDoubleConverter();
} else if (Float.class.isAssignableFrom(sourceType)) {

+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java View File

@@ -19,8 +19,8 @@ package com.vaadin.v7.data.util.converter;
import java.util.Locale;

/**
* A converter that wraps another {@link Converter} and reverses source
* and target types.
* A converter that wraps another {@link Converter} and reverses source and
* target types.
*
* @param <MODEL>
* The source type
@@ -42,8 +42,7 @@ public class ReverseConverter<PRESENTATION, MODEL>
* @param converter
* The converter to use in a reverse fashion
*/
public ReverseConverter(
Converter<MODEL, PRESENTATION> converter) {
public ReverseConverter(Converter<MODEL, PRESENTATION> converter) {
this.realConverter = converter;
}


+ 2
- 4
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java View File

@@ -33,8 +33,7 @@ import java.util.Locale;
* @author Vaadin Ltd
* @since 7.0
*/
public class StringToBooleanConverter
implements Converter<String, Boolean> {
public class StringToBooleanConverter implements Converter<String, Boolean> {

private final String trueString;

@@ -58,8 +57,7 @@ public class StringToBooleanConverter
* @param trueString
* string representation for <code>true</code>
*/
public StringToBooleanConverter(String trueString,
String falseString) {
public StringToBooleanConverter(String trueString, String falseString) {
this.trueString = trueString;
this.falseString = falseString;
}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java View File

@@ -77,8 +77,8 @@ public class StringToCollectionConverter
* @param tokenType
* expected token model type
*/
public StringToCollectionConverter(
Converter<String, ?> tokenConverter, Class<?> tokenType) {
public StringToCollectionConverter(Converter<String, ?> tokenConverter,
Class<?> tokenType) {
this(", ", tokenConverter, tokenType);
}


+ 1
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java View File

@@ -34,8 +34,7 @@ import java.util.Locale;
* @author Vaadin Ltd
* @since 7.0
*/
public class StringToDateConverter
implements Converter<String, Date> {
public class StringToDateConverter implements Converter<String, Date> {

/**
* Returns the format used by

+ 1
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java View File

@@ -36,8 +36,7 @@ import java.util.Locale;
* @author Vaadin Ltd
* @since 7.4
*/
public class StringToEnumConverter
implements Converter<String, Enum> {
public class StringToEnumConverter implements Converter<String, Enum> {

@Override
public Enum convertToModel(String value, Class<? extends Enum> targetType,

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java View File

@@ -18,8 +18,8 @@ package com.vaadin.v7.data.validator;
import com.vaadin.v7.data.Validator;

/**
* Abstract {@link com.vaadin.v7.data.Validator Validator} implementation
* that provides a basic Validator implementation except the
* Abstract {@link com.vaadin.v7.data.Validator Validator} implementation that
* provides a basic Validator implementation except the
* {@link #isValidValue(Object)} method.
* <p>
* To include the value that failed validation in the exception message you can

+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java View File

@@ -24,8 +24,7 @@ import java.math.BigDecimal;
* @since 7.4
*/
@SuppressWarnings("serial")
public class BigDecimalRangeValidator
extends RangeValidator<BigDecimal> {
public class BigDecimalRangeValidator extends RangeValidator<BigDecimal> {

/**
* Creates a validator for checking that an BigDecimal is within a given
@@ -43,8 +42,8 @@ public class BigDecimalRangeValidator
* @param maxValue
* The maximum value to accept or null for no limit
*/
public BigDecimalRangeValidator(String errorMessage,
BigDecimal minValue, BigDecimal maxValue) {
public BigDecimalRangeValidator(String errorMessage, BigDecimal minValue,
BigDecimal maxValue) {
super(errorMessage, BigDecimal.class, minValue, maxValue);
}


+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java View File

@@ -24,8 +24,7 @@ import java.math.BigInteger;
* @since 7.4
*/
@SuppressWarnings("serial")
public class BigIntegerRangeValidator
extends RangeValidator<BigInteger> {
public class BigIntegerRangeValidator extends RangeValidator<BigInteger> {

/**
* Creates a validator for checking that an BigInteger is within a given
@@ -43,8 +42,8 @@ public class BigIntegerRangeValidator
* @param maxValue
* The maximum value to accept or null for no limit
*/
public BigIntegerRangeValidator(String errorMessage,
BigInteger minValue, BigInteger maxValue) {
public BigIntegerRangeValidator(String errorMessage, BigInteger minValue,
BigInteger maxValue) {
super(errorMessage, BigInteger.class, minValue, maxValue);
}


+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java View File

@@ -53,8 +53,8 @@ public class DateRangeValidator extends RangeValidator<Date> {
* @param maxValue
* The maximum value to accept or null for no limit
*/
public DateRangeValidator(String errorMessage, Date minValue,
Date maxValue, Resolution resolution) {
public DateRangeValidator(String errorMessage, Date minValue, Date maxValue,
Resolution resolution) {
super(errorMessage, Date.class, minValue, maxValue);
}


+ 7
- 7
compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java View File

@@ -20,14 +20,14 @@ import com.vaadin.v7.data.util.converter.StringToDoubleConverter;

/**
* String validator for a double precision floating point number. See
* {@link com.vaadin.v7.data.validator.AbstractStringValidator} for
* more information.
* {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more
* information.
*
* @author Vaadin Ltd.
* @since 5.4
* @deprecated As of 7.0. Use a {@link StringToDoubleConverter} converter
* on the field instead or bind the field to a {@link Property} of
* type {@link Double}.
* @deprecated As of 7.0. Use a {@link StringToDoubleConverter} converter on the
* field instead or bind the field to a {@link Property} of type
* {@link Double}.
*/
@Deprecated
@SuppressWarnings("serial")
@@ -40,8 +40,8 @@ public class DoubleValidator extends AbstractStringValidator {
* @param errorMessage
* the message to display in case the value does not validate.
* @deprecated As of 7.0. Use a Double converter on the field instead and/or
* use a {@link DoubleRangeValidator} for validating that
* the value is inside a given range.
* use a {@link DoubleRangeValidator} for validating that the
* value is inside a given range.
*/
@Deprecated
public DoubleValidator(String errorMessage) {

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java View File

@@ -20,8 +20,8 @@ package com.vaadin.v7.data.validator;
* complete according to RFC 822 but handles the vast majority of valid e-mail
* addresses correctly.
*
* See {@link com.vaadin.v7.data.validator.AbstractStringValidator}
* for more information.
* See {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more
* information.
*
* <p>
* An empty string or a null is always accepted - use the required flag on

+ 7
- 7
compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java View File

@@ -20,14 +20,14 @@ import com.vaadin.v7.data.util.converter.StringToIntegerConverter;

/**
* String validator for integers. See
* {@link com.vaadin.v7.data.validator.AbstractStringValidator} for
* more information.
* {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more
* information.
*
* @author Vaadin Ltd.
* @since 5.4
* @deprecated As of 7.0. Use a {@link StringToIntegerConverter} converter
* on the field instead or bind the field to a {@link Property} of
* type {@link Integer}.
* @deprecated As of 7.0. Use a {@link StringToIntegerConverter} converter on
* the field instead or bind the field to a {@link Property} of type
* {@link Integer}.
*/
@SuppressWarnings("serial")
@Deprecated
@@ -40,8 +40,8 @@ public class IntegerValidator extends AbstractStringValidator {
* @param errorMessage
* the message to display in case the value does not validate.
* @deprecated As of 7.0. Use an Integer converter on the field instead
* and/or use an {@link IntegerRangeValidator} for
* validating that the value is inside a given range.
* and/or use an {@link IntegerRangeValidator} for validating
* that the value is inside a given range.
*/
@Deprecated
public IntegerValidator(String errorMessage) {

+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java View File

@@ -24,8 +24,8 @@ package com.vaadin.v7.data.validator;
* {@link IntegerRangeValidator}, {@link DoubleRangeValidator} or
* {@link DateRangeValidator} in applications.
* <p>
* Note that {@link RangeValidator} always accept null values. Make a
* field required to ensure that no empty values are accepted or override
* Note that {@link RangeValidator} always accept null values. Make a field
* required to ensure that no empty values are accepted or override
* {@link #isValidValue(Comparable)}.
* </p>
*
@@ -35,8 +35,7 @@ package com.vaadin.v7.data.validator;
* @author Vaadin Ltd.
* @since 7.0
*/
public class RangeValidator<T extends Comparable>
extends AbstractValidator<T> {
public class RangeValidator<T extends Comparable> extends AbstractValidator<T> {

private T minValue = null;
private boolean minValueIncluded = true;

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java View File

@@ -27,8 +27,8 @@ import java.util.regex.Pattern;
* {@link java.util.regex.Pattern#sum}
* </p>
* <p>
* See {@link com.vaadin.v7.data.validator.AbstractStringValidator}
* for more information.
* See {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more
* information.
* </p>
* <p>
* An empty string or a null is always accepted - use the required flag on

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java View File

@@ -62,8 +62,8 @@ public abstract class DataBoundTransferable extends TransferableImpl {
/**
* Returns the container data source from which the transfer occurs.
*
* {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is used
* to obtain the underlying container of the source component.
* {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is
* used to obtain the underlying container of the source component.
*
* @return Container
*/

+ 15
- 15
compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java View File

@@ -68,8 +68,8 @@ import com.vaadin.v7.data.util.converter.ConverterUtil;
* </p>
*
* <p>
* The class also supports {@link com.vaadin.v7.data.Validator validators}
* to make sure the value contained in the field is valid.
* The class also supports {@link com.vaadin.v7.data.Validator validators} to
* make sure the value contained in the field is valid.
* </p>
*
* @author Vaadin Ltd.
@@ -424,8 +424,8 @@ public abstract class AbstractField<T> extends AbstractComponent
* @throws Property.ReadOnlyException
*/
@Override
public void setValue(T newFieldValue) throws Property.ReadOnlyException,
Converter.ConversionException {
public void setValue(T newFieldValue)
throws Property.ReadOnlyException, Converter.ConversionException {
setValue(newFieldValue, false);
}

@@ -585,10 +585,10 @@ public abstract class AbstractField<T> extends AbstractComponent
* <p>
* If the data source implements
* {@link com.vaadin.v7.data.Property.ValueChangeNotifier} and/or
* {@link com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier}, the field
* registers itself as a listener and updates itself according to the events
* it receives. To avoid memory leaks caused by references to a field no
* longer in use, the listener registrations are removed on
* {@link com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier}, the
* field registers itself as a listener and updates itself according to the
* events it receives. To avoid memory leaks caused by references to a field
* no longer in use, the listener registrations are removed on
* {@link AbstractField#detach() detach} and re-added on
* {@link AbstractField#attach() attach}.
* </p>
@@ -621,8 +621,8 @@ public abstract class AbstractField<T> extends AbstractComponent

// Check if the current converter is compatible.
if (newDataSource != null
&& !ConverterUtil.canConverterPossiblyHandle(
getConverter(), getType(), newDataSource.getType())) {
&& !ConverterUtil.canConverterPossiblyHandle(getConverter(),
getType(), newDataSource.getType())) {
// There is no converter set or there is no way the current
// converter can be compatible.
setConverter(newDataSource.getType());
@@ -805,9 +805,9 @@ public abstract class AbstractField<T> extends AbstractComponent
* Returns the current value (as returned by {@link #getValue()}) converted
* to the data source type.
* <p>
* This returns the same as {@link AbstractField#getValue()} if no
* converter has been set. The value is not necessarily the same as the data
* source value e.g. if the field is in buffered mode and has been modified.
* This returns the same as {@link AbstractField#getValue()} if no converter
* has been set. The value is not necessarily the same as the data source
* value e.g. if the field is in buffered mode and has been modified.
* </p>
*
* @return The converted value that is compatible with the data source type
@@ -1584,8 +1584,8 @@ public abstract class AbstractField<T> extends AbstractComponent

/**
* A ready-made {@link ShortcutListener} that focuses the given
* {@link Focusable} (usually a {@link Field}) when the keyboard
* shortcut is invoked.
* {@link Focusable} (usually a {@link Field}) when the keyboard shortcut is
* invoked.
*
*/
public static class FocusShortcut extends ShortcutListener {

+ 2
- 3
compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java View File

@@ -80,9 +80,8 @@ import com.vaadin.v7.shared.ui.select.AbstractSelectState;
*/
@SuppressWarnings("serial")
// TODO currently cannot specify type more precisely in case of multi-select
public abstract class AbstractSelect extends AbstractField<Object>
implements Container, Container.Viewer,
Container.PropertySetChangeListener,
public abstract class AbstractSelect extends AbstractField<Object> implements
Container, Container.Viewer, Container.PropertySetChangeListener,
Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier,
Container.ItemSetChangeListener, LegacyComponent {


+ 3
- 6
compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java View File

@@ -129,11 +129,9 @@ public abstract class AbstractTextField extends AbstractField<String> implements
}

if (hasListeners(TextChangeEvent.class)) {
target.addAttribute(
TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE,
target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE,
getTextChangeEventMode().toString());
target.addAttribute(
TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT,
target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT,
getTextChangeTimeout());
if (lastKnownTextContent != null) {
/*
@@ -477,8 +475,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
* some sort of diffs instead of always sending the whole text content.
* Also on value change events we could use the mechanism.
*/
String object = (String) variables
.get(TextFieldConstants.VAR_CUR_TEXT);
String object = (String) variables.get(TextFieldConstants.VAR_CUR_TEXT);
lastKnownTextContent = object;
textChangeEventPending = true;
}

+ 1
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java View File

@@ -248,8 +248,7 @@ public class CheckBox extends AbstractField<Boolean> {
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
CheckBox def = (CheckBox) designContext
.getDefaultInstance(this);
CheckBox def = (CheckBox) designContext.getDefaultInstance(this);
Attributes attr = design.attributes();
DesignAttributeHandler.writeAttribute("checked", attr, getValue(),
def.getValue(), Boolean.class);

+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java View File

@@ -58,8 +58,8 @@ import com.vaadin.v7.shared.ui.datefield.TextualDateFieldState;
* </p>
* <p>
* A <code>DateField</code> is in write-through mode by default, so
* {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)}must
* be called to enable buffering.
* {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)}must be called
* to enable buffering.
* </p>
*
* @author Vaadin Ltd.
@@ -214,8 +214,7 @@ public class DateField extends AbstractField<Date> implements
* @param dataSource
* the Property to be edited with this editor.
*/
public DateField(Property dataSource)
throws IllegalArgumentException {
public DateField(Property dataSource) throws IllegalArgumentException {
if (!Date.class.isAssignableFrom(dataSource.getType())) {
throw new IllegalArgumentException(
"Can't use " + dataSource.getType().getName()

+ 3
- 4
compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java View File

@@ -28,8 +28,7 @@ import com.vaadin.v7.data.Property;
* a value that the user can change through the user interface.
*
* LegacyField components are built upon the framework defined in the
* LegacyField interface and the {@link com.vaadin.AbstractField} base
* class.
* LegacyField interface and the {@link com.vaadin.AbstractField} base class.
*
* The LegacyField interface inherits the {@link com.vaadin.ui.Component}
* superinterface and also the {@link com.vaadin.ui.Property} interface to have
@@ -47,8 +46,8 @@ import com.vaadin.v7.data.Property;
* extend {@link com.vaadin.ui.AbstractField} instead.
*/
@Deprecated
public interface Field<T> extends Component, BufferedValidatable,
Property<T>, Property.ValueChangeNotifier, Property.ValueChangeListener,
public interface Field<T> extends Component, BufferedValidatable, Property<T>,
Property.ValueChangeNotifier, Property.ValueChangeListener,
Property.Editor, Focusable, HasRequired {
/**
* Is this field required.

+ 7
- 7
compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java View File

@@ -137,9 +137,9 @@ import elemental.json.JsonValue;
* <p>
* Each column has its own {@link Renderer} that displays data into something
* that can be displayed in the browser. That data is first converted with a
* {@link com.vaadin.v7.data.util.converter.Converter Converter} into
* something that the Renderer can process. This can also be an implicit step -
* if a column has a simple data type, like a String, no explicit assignment is
* {@link com.vaadin.v7.data.util.converter.Converter Converter} into something
* that the Renderer can process. This can also be an implicit step - if a
* column has a simple data type, like a String, no explicit assignment is
* needed.
* <p>
* Usually a renderer takes some kind of object, and converts it into a
@@ -544,8 +544,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}

@Override
protected <T extends Field> T build(String caption,
Class<?> dataType, Class<T> fieldType) throws BindException {
protected <T extends Field> T build(String caption, Class<?> dataType,
Class<T> fieldType) throws BindException {
T field = super.build(caption, dataType, fieldType);
if (field instanceof CheckBox) {
field.setCaption(null);
@@ -3218,8 +3218,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
/**
* A check for allowing the
* {@link #Column(Grid, GridColumnState, Object) constructor} to call
* {@link #setConverter(Converter)} with a <code>null</code>, even
* if model and renderer aren't compatible.
* {@link #setConverter(Converter)} with a <code>null</code>, even if
* model and renderer aren't compatible.
*/
private boolean isFirstConverterAssignment = true;


+ 1
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java View File

@@ -42,8 +42,7 @@ public class PopupDateField extends DateField {
super();
}

public PopupDateField(Property dataSource)
throws IllegalArgumentException {
public PopupDateField(Property dataSource) throws IllegalArgumentException {
super(dataSource);
}


+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java View File

@@ -4172,8 +4172,8 @@ public class Table extends AbstractSelect implements Action.Container,
if (hasConverter(colId)) {
converter = getConverter(colId);
} else {
converter = (Converter) ConverterUtil.getConverter(
String.class, property.getType(), getSession());
converter = (Converter) ConverterUtil.getConverter(String.class,
property.getType(), getSession());
}
Object value = property.getValue();
if (converter != null) {

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java View File

@@ -50,7 +50,7 @@ public interface TableFieldFactory extends Serializable {
* @return A field suitable for editing the specified data or null if the
* property should not be editable.
*/
Field<?> createField(Container container, Object itemId,
Object propertyId, Component uiContext);
Field<?> createField(Container container, Object itemId, Object propertyId,
Component uiContext);

}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/TextField.java View File

@@ -34,8 +34,8 @@ import com.vaadin.v7.data.Property;
* Since <code>TextField</code> extends <code>LegacyAbstractField</code> it
* implements the {@link com.vaadin.v7.data.Buffered} interface. A
* <code>TextField</code> is in write-through mode by default, so
* {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)}
* must be called to enable buffering.
* {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)} must be
* called to enable buffering.
* </p>
*
* @author Vaadin Ltd.

+ 5
- 5
compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java View File

@@ -23,11 +23,11 @@ import com.vaadin.event.dd.TargetDetailsImpl;
import com.vaadin.v7.ui.Calendar;

/**
* Drop details for {@link com.vaadin.v7.ui.addon.calendar.ui.Calendar Calendar}.
* When something is dropped on the Calendar, this class contains the specific
* details of the drop point. Specifically, this class gives access to the date
* where the drop happened. If the Calendar was in weekly mode, the date also
* includes the start time of the slot.
* Drop details for {@link com.vaadin.v7.ui.addon.calendar.ui.Calendar
* Calendar}. When something is dropped on the Calendar, this class contains the
* specific details of the drop point. Specifically, this class gives access to
* the date where the drop happened. If the Calendar was in weekly mode, the
* date also includes the start time of the slot.
*
* @since 7.1
* @author Vaadin Ltd.

+ 5
- 10
compatibility-server/src/test/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactoryTest.java View File

@@ -65,24 +65,21 @@ public class DefaultFieldGroupFieldFactoryTest {

@Test
public void testDateGenerationForPopupDateField() {
Field f = fieldFactory.createField(Date.class,
DateField.class);
Field f = fieldFactory.createField(Date.class, DateField.class);
Assert.assertNotNull(f);
Assert.assertEquals(PopupDateField.class, f.getClass());
}

@Test
public void testDateGenerationForInlineDateField() {
Field f = fieldFactory.createField(Date.class,
InlineDateField.class);
Field f = fieldFactory.createField(Date.class, InlineDateField.class);
Assert.assertNotNull(f);
Assert.assertEquals(InlineDateField.class, f.getClass());
}

@Test
public void testDateGenerationForTextField() {
Field f = fieldFactory.createField(Date.class,
TextField.class);
Field f = fieldFactory.createField(Date.class, TextField.class);
Assert.assertNotNull(f);
Assert.assertEquals(TextField.class, f.getClass());
}
@@ -100,8 +97,7 @@ public class DefaultFieldGroupFieldFactoryTest {

@Test
public void testEnumComboBox() {
Field f = fieldFactory.createField(SomeEnum.class,
ComboBox.class);
Field f = fieldFactory.createField(SomeEnum.class, ComboBox.class);
Assert.assertNotNull(f);
Assert.assertEquals(ComboBox.class, f.getClass());
}
@@ -116,8 +112,7 @@ public class DefaultFieldGroupFieldFactoryTest {

@Test
public void testEnumAnyField() {
Field f = fieldFactory.createField(SomeEnum.class,
Field.class);
Field f = fieldFactory.createField(SomeEnum.class, Field.class);
Assert.assertNotNull(f);
Assert.assertEquals(ListSelect.class, f.getClass());
}

+ 1
- 2
compatibility-server/src/test/java/com/vaadin/v7/data/util/TransactionalPropertyWrapperTest.java View File

@@ -65,8 +65,7 @@ public class TransactionalPropertyWrapperTest {

private final TextField nameField = new TextField("Name");
private final TextField ageField = new TextField("Age");
private final TextField unboundField = new TextField(
"No FieldGroup");
private final TextField unboundField = new TextField("No FieldGroup");
private final TestingProperty<String> unboundProp = new TestingProperty<String>(
"Hello World");
private final PropertysetItem item = new PropertysetItem();

+ 1
- 2
compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/AnyEnumToStringConverterTest.java View File

@@ -31,8 +31,7 @@ import com.vaadin.v7.ui.TextField;

public class AnyEnumToStringConverterTest {

public class AnyEnumToStringConverter
implements Converter<Enum, String> {
public class AnyEnumToStringConverter implements Converter<Enum, String> {

public AnyEnumToStringConverter() {
}

+ 2
- 4
compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/ConverterFactoryTest.java View File

@@ -28,8 +28,7 @@ import com.vaadin.v7.ui.TextField;

public class ConverterFactoryTest {

public static class ConvertTo42
implements Converter<String, Integer> {
public static class ConvertTo42 implements Converter<String, Integer> {

@Override
public Integer convertToModel(String value,
@@ -57,8 +56,7 @@ public class ConverterFactoryTest {

}

public static class ConverterFactory42
extends DefaultConverterFactory {
public static class ConverterFactory42 extends DefaultConverterFactory {
@Override
public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter(
Class<PRESENTATION> presentationType, Class<MODEL> modelType) {

+ 4
- 4
compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/CompositeValidatorTest.java View File

@@ -16,10 +16,10 @@ import com.vaadin.v7.data.validator.RegexpValidator;

public class CompositeValidatorTest {

CompositeValidator and = new CompositeValidator(
CombinationMode.AND, "One validator not valid");
CompositeValidator or = new CompositeValidator(
CombinationMode.OR, "No validators are valid");
CompositeValidator and = new CompositeValidator(CombinationMode.AND,
"One validator not valid");
CompositeValidator or = new CompositeValidator(CombinationMode.OR,
"No validators are valid");
EmailValidator email = new EmailValidator("Faulty email");
RegexpValidator regex = new RegexpValidator("@mail.com", false,
"Partial match validator error");

+ 7
- 9
compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/DateRangeValidatorTest.java View File

@@ -30,16 +30,14 @@ public class DateRangeValidatorTest {
startDate.set(2000, Calendar.JANUARY, 1, 12, 0, 0);
endDate.set(2000, Calendar.FEBRUARY, 20, 12, 0, 0);

cleanValidator = new DateRangeValidator(
"Given date outside range", null, null, Resolution.DAY);
minValidator = new DateRangeValidator(
"Given date before startDate", startDate.getTime(), null,
Resolution.DAY);
maxValidator = new DateRangeValidator("Given date after endDate",
null, endDate.getTime(), Resolution.DAY);
minMaxValidator = new DateRangeValidator(
"Given date outside range", startDate.getTime(),
cleanValidator = new DateRangeValidator("Given date outside range",
null, null, Resolution.DAY);
minValidator = new DateRangeValidator("Given date before startDate",
startDate.getTime(), null, Resolution.DAY);
maxValidator = new DateRangeValidator("Given date after endDate", null,
endDate.getTime(), Resolution.DAY);
minMaxValidator = new DateRangeValidator("Given date outside range",
startDate.getTime(), endDate.getTime(), Resolution.DAY);
}

@Test

+ 2
- 4
compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/NullValidatorTest.java View File

@@ -10,10 +10,8 @@ import com.vaadin.v7.data.validator.NullValidator;

public class NullValidatorTest {

NullValidator notNull = new NullValidator("Null not accepted",
false);
NullValidator onlyNull = new NullValidator("Only null accepted",
true);
NullValidator notNull = new NullValidator("Null not accepted", false);
NullValidator onlyNull = new NullValidator("Only null accepted", true);

@Test
public void testNullValue() {

+ 4
- 4
compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/RegexpValidatorTest.java View File

@@ -9,10 +9,10 @@ import com.vaadin.v7.data.validator.RegexpValidator;

public class RegexpValidatorTest {

private RegexpValidator completeValidator = new RegexpValidator(
"pattern", true, "Complete match validator error");
private RegexpValidator partialValidator = new RegexpValidator(
"pattern", false, "Partial match validator error");
private RegexpValidator completeValidator = new RegexpValidator("pattern",
true, "Complete match validator error");
private RegexpValidator partialValidator = new RegexpValidator("pattern",
false, "Partial match validator error");

@Test
public void testRegexpValidatorWithNull() {

+ 1
- 2
compatibility-server/src/test/java/com/vaadin/v7/tests/server/SerializationTest.java View File

@@ -22,8 +22,7 @@ public class SerializationTest {

@Test
public void testValidators() throws Exception {
RegexpValidator validator = new RegexpValidator(".*",
"Error");
RegexpValidator validator = new RegexpValidator(".*", "Error");
validator.validate("aaa");
RegexpValidator validator2 = serializeAndDeserialize(validator);
validator2.validate("aaa");

+ 2
- 2
compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java View File

@@ -18,8 +18,8 @@ import com.vaadin.v7.ui.AbstractField;
*
* Subclasses should implement {@link #setValue()} and call
* <code>super.setValue(LegacyAbstractField)</code>. Also, subclasses should
* typically override {@link #setValue(AbstractField)} to set the field
* value via <code>changeVariables()</code>.
* typically override {@link #setValue(AbstractField)} to set the field value
* via <code>changeVariables()</code>.
*/
public abstract class AbstractFieldValueChangeTestBase<T> {


+ 3
- 4
compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/fieldgroup/BeanFieldGroupTest.java View File

@@ -87,8 +87,7 @@ public class BeanFieldGroupTest {
BeanFieldGroup<MyBean> bindFields = BeanFieldGroup
.bindFieldsUnbuffered(myBean, viewStub);

Field<String> field = (Field<String>) bindFields
.getField("basicField");
Field<String> field = (Field<String>) bindFields.getField("basicField");
Assert.assertEquals(DEFAULT_FOR_BASIC_FIELD, myBean.basicField);
field.setValue("Foo");
Assert.assertEquals("Foo", myBean.basicField);
@@ -132,8 +131,8 @@ public class BeanFieldGroupTest {
BeanFieldGroup<MyBean> bfg = new BeanFieldGroup<MyBean>(MyBean.class);
bfg.setItemDataSource(bean);

com.vaadin.v7.ui.Field<?> helloField = bfg
.buildAndBind("Hello string", "nestedBean.hello");
com.vaadin.v7.ui.Field<?> helloField = bfg.buildAndBind("Hello string",
"nestedBean.hello");
assertEquals(bean.nestedBean.hello, helloField.getValue().toString());
}


+ 81
- 86
compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java View File

@@ -112,64 +112,60 @@ public class TablePropertyValueConverterTest {
}

});
customTable.setConverter("col2",
new Converter<String, BaseClass>() {
private static final long serialVersionUID = 1L;

@Override
public BaseClass convertToModel(String value,
Class<? extends BaseClass> targetType,
Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return new BaseClass("model");
}

@Override
public Class<BaseClass> getModelType() {
return BaseClass.class;
}

@Override
public Class<String> getPresentationType() {
return String.class;
}

@Override
public String convertToPresentation(BaseClass value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return null;
}
});
customTable.setConverter("col3",
new Converter<String, DerivedClass>() {
private static final long serialVersionUID = 1L;

@Override
public DerivedClass convertToModel(String value,
Class<? extends DerivedClass> targetType,
Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return new DerivedClass("derived" + 1001);
}

@Override
public Class<DerivedClass> getModelType() {
return DerivedClass.class;
}

@Override
public Class<String> getPresentationType() {
return String.class;
}

@Override
public String convertToPresentation(DerivedClass value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return null;
}
});
customTable.setConverter("col2", new Converter<String, BaseClass>() {
private static final long serialVersionUID = 1L;

@Override
public BaseClass convertToModel(String value,
Class<? extends BaseClass> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return new BaseClass("model");
}

@Override
public Class<BaseClass> getModelType() {
return BaseClass.class;
}

@Override
public Class<String> getPresentationType() {
return String.class;
}

@Override
public String convertToPresentation(BaseClass value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return null;
}
});
customTable.setConverter("col3", new Converter<String, DerivedClass>() {
private static final long serialVersionUID = 1L;

@Override
public DerivedClass convertToModel(String value,
Class<? extends DerivedClass> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return new DerivedClass("derived" + 1001);
}

@Override
public Class<DerivedClass> getModelType() {
return DerivedClass.class;
}

@Override
public Class<String> getPresentationType() {
return String.class;
}

@Override
public String convertToPresentation(DerivedClass value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return null;
}
});
customTable.setContainerDataSource(
createContainer(new String[] { "col1", "col2", "col3" },
new Class[] { DerivedClass.class, DerivedClass.class,
@@ -191,34 +187,33 @@ public class TablePropertyValueConverterTest {
createContainer(new String[] { "col1", "col2", "col3" },
new Class[] { int.class, BaseClass.class,
DerivedClass.class }));
customTable.setConverter("col1",
new Converter<String, Integer>() {
private static final long serialVersionUID = 1L;

@Override
public Integer convertToModel(String value,
Class<? extends Integer> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return 11;
}

@Override
public String convertToPresentation(Integer value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return "presentation";
}

@Override
public Class<Integer> getModelType() {
return Integer.class;
}

@Override
public Class<String> getPresentationType() {
return String.class;
}
});
customTable.setConverter("col1", new Converter<String, Integer>() {
private static final long serialVersionUID = 1L;

@Override
public Integer convertToModel(String value,
Class<? extends Integer> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return 11;
}

@Override
public String convertToPresentation(Integer value,
Class<? extends String> targetType, Locale locale)
throws com.vaadin.v7.data.util.converter.Converter.ConversionException {
return "presentation";
}

@Override
public Class<Integer> getModelType() {
return Integer.class;
}

@Override
public Class<String> getPresentationType() {
return String.class;
}
});
Set<Object> converters = customTable.getCurrentConverters();
assertTrue("Converter was not set.", converters.size() > 0);
}

+ 1
- 2
compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldTest.java View File

@@ -31,8 +31,7 @@ public class TextFieldTest {

@Test
public void emptyAfterClearUsingPDS() {
TextField tf = new TextField(
new ObjectProperty<String>("foo"));
TextField tf = new TextField(new ObjectProperty<String>("foo"));
Assert.assertFalse(tf.isEmpty());
tf.clear();
Assert.assertTrue(tf.isEmpty());

+ 2
- 2
compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldWithValidatorTest.java View File

@@ -152,8 +152,8 @@ public class TextFieldWithValidatorTest {

@Test
public void testRegexpValidator() {
field.addValidator(new RegexpValidator("pattern", true,
"Validation failed"));
field.addValidator(
new RegexpValidator("pattern", true, "Validation failed"));
field.setRequired(false);

// succeeds

+ 1
- 2
compatibility-server/src/test/java/com/vaadin/v7/tests/server/renderer/RendererTest.java View File

@@ -65,8 +65,7 @@ public class RendererTest {
}
}

private static class TestConverter
implements Converter<String, TestBean> {
private static class TestConverter implements Converter<String, TestBean> {

@Override
public TestBean convertToModel(String value,

+ 18
- 18
compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/BeanValidationTest.java View File

@@ -12,58 +12,58 @@ import com.vaadin.v7.ui.Field;
public class BeanValidationTest {
@Test(expected = InvalidValueException.class)
public void testBeanValidationNull() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "firstname");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"firstname");
validator.validate(null);
}

@Test(expected = InvalidValueException.class)
public void testBeanValidationStringTooShort() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "firstname");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"firstname");
validator.validate("aa");
}

@Test
public void testBeanValidationStringOk() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "firstname");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"firstname");
validator.validate("aaa");
}

@Test(expected = InvalidValueException.class)
public void testBeanValidationIntegerTooSmall() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "age");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"age");
validator.validate(17);
}

@Test
public void testBeanValidationIntegerOk() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "age");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"age");
validator.validate(18);
}

@Test(expected = InvalidValueException.class)
public void testBeanValidationTooManyDigits() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "decimals");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"decimals");
validator.validate("1234.567");
}

@Test
public void testBeanValidationDigitsOk() {
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "decimals");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"decimals");
validator.validate("123.45");
}

@Test
public void testBeanValidationException_OneValidationError() {
InvalidValueException[] causes = null;
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "lastname");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"lastname");
try {
validator.validate(null);
} catch (InvalidValueException e) {
@@ -76,8 +76,8 @@ public class BeanValidationTest {
@Test
public void testBeanValidationsException_TwoValidationErrors() {
InvalidValueException[] causes = null;
BeanValidator validator = new BeanValidator(
BeanToValidate.class, "nickname");
BeanValidator validator = new BeanValidator(BeanToValidate.class,
"nickname");
try {
validator.validate("A");
} catch (InvalidValueException e) {

+ 4
- 8
compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/RangeValidatorTest.java View File

@@ -14,8 +14,7 @@ public class RangeValidatorTest {
// RangeValidator
@Test
public void testMinValueNonInclusive() {
IntegerRangeValidator iv = new IntegerRangeValidator(
"Failed", 0, 10);
IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10);
iv.setMinValueIncluded(false);
assertFalse(iv.isValid(0));
assertTrue(iv.isValid(10));
@@ -25,8 +24,7 @@ public class RangeValidatorTest {

@Test
public void testMinMaxValuesInclusive() {
IntegerRangeValidator iv = new IntegerRangeValidator(
"Failed", 0, 10);
IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10);
assertTrue(iv.isValid(0));
assertTrue(iv.isValid(1));
assertTrue(iv.isValid(10));
@@ -36,8 +34,7 @@ public class RangeValidatorTest {

@Test
public void testMaxValueNonInclusive() {
IntegerRangeValidator iv = new IntegerRangeValidator(
"Failed", 0, 10);
IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10);
iv.setMaxValueIncluded(false);
assertTrue(iv.isValid(0));
assertTrue(iv.isValid(9));
@@ -48,8 +45,7 @@ public class RangeValidatorTest {

@Test
public void testMinMaxValuesNonInclusive() {
IntegerRangeValidator iv = new IntegerRangeValidator(
"Failed", 0, 10);
IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10);
iv.setMinValueIncluded(false);
iv.setMaxValueIncluded(false);


+ 8
- 9
server/src/main/java/com/vaadin/data/BeanBinder.java View File

@@ -56,8 +56,8 @@ public class BeanBinder<BEAN> extends Binder<BEAN> {
* @param <TARGET>
* the target property type
*/
public interface BeanBinding<BEAN, FIELDVALUE, TARGET> extends
Binding<BEAN, FIELDVALUE, TARGET> {
public interface BeanBinding<BEAN, FIELDVALUE, TARGET>
extends Binding<BEAN, FIELDVALUE, TARGET> {

@Override
public BeanBinding<BEAN, FIELDVALUE, TARGET> withValidator(
@@ -127,8 +127,8 @@ public class BeanBinder<BEAN> extends Binder<BEAN> {
* @param <TARGET>
* the target property type
*/
protected static class BeanBindingImpl<BEAN, FIELDVALUE, TARGET> extends
BindingImpl<BEAN, FIELDVALUE, TARGET>
protected static class BeanBindingImpl<BEAN, FIELDVALUE, TARGET>
extends BindingImpl<BEAN, FIELDVALUE, TARGET>
implements BeanBinding<BEAN, FIELDVALUE, TARGET> {

private Method getter;
@@ -218,7 +218,8 @@ public class BeanBinder<BEAN> extends Binder<BEAN> {
} catch (IntrospectionException ie) {
throw new IllegalArgumentException(
"Could not resolve bean property name (see the cause): "
+ beanType.getName() + "." + propertyName, ie);
+ beanType.getName() + "." + propertyName,
ie);
}
if (descriptor == null) {
throw new IllegalArgumentException(
@@ -237,8 +238,7 @@ public class BeanBinder<BEAN> extends Binder<BEAN> {
private Converter<TARGET, Object> createConverter() {
return Converter.from(
fieldValue -> getter.getReturnType().cast(fieldValue),
propertyValue -> (TARGET) propertyValue,
exception -> {
propertyValue -> (TARGET) propertyValue, exception -> {
throw new RuntimeException(exception);
});
}
@@ -312,8 +312,7 @@ public class BeanBinder<BEAN> extends Binder<BEAN> {

@Override
protected <FIELDVALUE, TARGET> BeanBindingImpl<BEAN, FIELDVALUE, TARGET> createBinding(
HasValue<FIELDVALUE> field,
Converter<FIELDVALUE, TARGET> converter,
HasValue<FIELDVALUE> field, Converter<FIELDVALUE, TARGET> converter,
StatusChangeHandler handler) {
Objects.requireNonNull(field, "field cannot be null");
Objects.requireNonNull(converter, "converter cannot be null");

+ 3
- 3
server/src/main/java/com/vaadin/data/HasValue.java View File

@@ -28,10 +28,10 @@ import com.vaadin.shared.Registration;
* changed, either by the user or programmatically.
*
* @author Vaadin Ltd.
*
*
* @param <V>
* the value type
*
*
* @since
*/
public interface HasValue<V> extends Serializable {
@@ -67,7 +67,7 @@ public interface HasValue<V> extends Serializable {
/**
* Creates a new {@code ValueChange} event containing the given value,
* originating from the given source connector.
*
*
* @param source
* the source connector, not null
* @param value

+ 11
- 11
server/src/main/java/com/vaadin/data/Listing.java View File

@@ -32,8 +32,8 @@ import com.vaadin.shared.data.selection.SelectionModel;
* the selection logic supported by this listing
* @since
*/
public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends
Serializable {
public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>>
extends Serializable {

/**
* Returns the source of data items used by this listing.
@@ -53,7 +53,7 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends

/**
* Returns the selection model for this listing.
*
*
* @return the selection model, not null
*/
SELECTIONMODEL getSelectionModel();
@@ -63,7 +63,7 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends
*
* @param items
* the data items to display
*
*
*/
default void setItems(Collection<T> items) {
setDataSource(DataSource.create(items));
@@ -85,9 +85,9 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends
* Returns an immutable set of the currently selected items. The iteration
* order of the items in the returned set is specified by the
* {@linkplain #getSelectionModel() selection model} used.
*
*
* @return the current selection
*
*
* @see SelectionModel#getSelectedItems
*/
default Set<T> getSelectedItems() {
@@ -96,10 +96,10 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends

/**
* Selects the given item. If the item is already selected, does nothing.
*
*
* @param item
* the item to select, not null
*
*
* @see SelectionModel#select
*/
default void select(T item) {
@@ -109,10 +109,10 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends
/**
* Deselects the given item. If the item is not currently selected, does
* nothing.
*
*
* @param item
* the item to deselect, not null
*
*
* @see SelectionModel#deselect
*/
default void deselect(T item) {
@@ -121,7 +121,7 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends

/**
* Returns whether the given item is currently selected.
*
*
* @param item
* the item to check, not null
* @return {@code true} if the item is selected, {@code false} otherwise

+ 6
- 6
server/src/main/java/com/vaadin/data/selection/AbstractSelectionModel.java View File

@@ -1,12 +1,12 @@
/*
* Copyright 2000-2016 Vaadin Ltd.
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -23,12 +23,12 @@ import elemental.json.JsonObject;

/**
* An astract base class for {@code SelectionModel}s.
*
*
* @author Vaadin Ltd.
*
*
* @param <T>
* type of selected data
*
*
* @since
*/
public abstract class AbstractSelectionModel<T> extends

+ 12
- 12
server/src/main/java/com/vaadin/data/selection/SingleSelection.java View File

@@ -1,12 +1,12 @@
/*
* Copyright 2000-2016 Vaadin Ltd.
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -31,12 +31,12 @@ import com.vaadin.util.ReflectTools;
* A {@code SelectionModel} for selecting a single value. Implements
* {@code Extension} to provide the communication logic for single selection for
* the listing it extends.
*
*
* @author Vaadin Ltd.
*
*
* @param <T>
* the type of the items to select
*
*
* @since
*/
public class SingleSelection<T> extends AbstractSelectionModel<T>
@@ -52,7 +52,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T>

/**
* Creates a new selection change event.
*
*
* @param source
* the listing that fired the event
* @param selectedItem
@@ -69,7 +69,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T>
/**
* Returns an optional of the item that was selected, or an empty
* optional if a previously selected item was deselected.
*
*
* @return the selected item or an empty optional if deselected
*
* @see SelectionModel.Single#getSelectedItem()
@@ -81,10 +81,10 @@ public class SingleSelection<T> extends AbstractSelectionModel<T>

/**
* A listener for selection events.
*
*
* @param <T>
* the type of the selected item
*
*
* @see SingleSelectionChange
*/
@FunctionalInterface
@@ -102,7 +102,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T>

/**
* Creates a new {@code SingleSelection} extending the given parent listing.
*
*
* @param parent
* the parent listing
*/
@@ -170,7 +170,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T>
/**
* Selects the given item or deselects the current one if given
* {@code null}.
*
*
* @param value
* the item to select or {@code null} to deselect
* @param userOriginated

+ 1
- 2
server/src/main/java/com/vaadin/data/util/BeanUtil.java View File

@@ -96,8 +96,7 @@ public final class BeanUtil implements Serializable {
* if the introspection fails
*/
public static Class<?> getPropertyType(Class<?> beanType,
String propertyName)
throws IntrospectionException {
String propertyName) throws IntrospectionException {
PropertyDescriptor descriptor = getPropertyDescriptor(beanType,
propertyName);
if (descriptor != null) {

+ 2
- 2
server/src/main/java/com/vaadin/data/validator/BeanValidator.java View File

@@ -73,8 +73,8 @@ public class BeanValidator implements Validator<Object> {
Class.forName(Validation.class.getName());
beanValidationAvailable = true;
} catch (ClassNotFoundException e) {
Logger.getLogger(BeanValidator.class.getName()).fine(
"A JSR-303 bean validation implementation not found on the classpath. "
Logger.getLogger(BeanValidator.class.getName())
.fine("A JSR-303 bean validation implementation not found on the classpath. "
+ BeanValidator.class.getSimpleName()
+ " cannot be used.");
beanValidationAvailable = false;

+ 5
- 5
server/src/main/java/com/vaadin/event/EventListener.java View File

@@ -1,12 +1,12 @@
/*
* Copyright 2000-2016 Vaadin Ltd.
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -19,12 +19,12 @@ import java.util.function.Consumer;

/**
* A generic interface for connector event listeners.
*
*
* @author Vaadin Ltd.
*
* @param <EVENT>
* the event type
*
*
* @since 8.0
*/
@FunctionalInterface

+ 2
- 2
server/src/main/java/com/vaadin/server/data/DataGenerator.java View File

@@ -24,10 +24,10 @@ import elemental.json.JsonObject;
* data items sent to the client for extension purposes.
*
* @author Vaadin Ltd.
*
*
* @param <T>
* the data type
*
*
* @since
*/
@FunctionalInterface

+ 6
- 6
server/src/main/java/com/vaadin/ui/AbstractListing.java View File

@@ -27,14 +27,14 @@ import com.vaadin.shared.data.selection.SelectionModel;
/**
* A base class for listing components. Provides common handling for fetching
* backend data items, selection logic, and server-client communication.
*
*
* @author Vaadin Ltd.
*
*
* @param <T>
* the item data type
* @param <SELECTIONMODEL>
* the selection logic supported by this listing
*
*
* @since
*/
public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T>>
@@ -53,7 +53,7 @@ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T

/**
* Adds this extension to the given parent listing.
*
*
* @param listing
* the parent component to add to
*/
@@ -124,7 +124,7 @@ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T
* <strong>Note:</strong> This constructor does not set a selection model
* for the new listing. The invoking constructor must explicitly call
* {@link #setSelectionModel(SelectionModel)}.
*
*
* @param dataCommunicator
* the data communicator to use, not null
*/
@@ -155,7 +155,7 @@ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T

/**
* Sets the selection model for this listing.
*
*
* @param model
* the selection model to use, not null
*/

+ 4
- 4
server/src/test/java/com/vaadin/data/BeanBinderTest.java View File

@@ -146,8 +146,8 @@ public class BeanBinderTest {

@Test
public void fieldWithConverterBound_bindBean_fieldValueUpdated() {
binder.forField(ageField).withConverter(Integer::valueOf,
String::valueOf).bind("age");
binder.forField(ageField)
.withConverter(Integer::valueOf, String::valueOf).bind("age");
binder.bind(p);

assertEquals("32", ageField.getValue());
@@ -155,8 +155,8 @@ public class BeanBinderTest {

@Test(expected = ClassCastException.class)
public void fieldWithInvalidConverterBound_bindBean_fieldValueUpdated() {
binder.forField(ageField).withConverter(Float::valueOf,
String::valueOf).bind("age");
binder.forField(ageField).withConverter(Float::valueOf, String::valueOf)
.bind("age");
binder.bind(p);

assertEquals("32", ageField.getValue());

+ 1
- 2
uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/SelectElement.java View File

@@ -3,7 +3,6 @@ package com.vaadin.v7.testbench.customelements;
import com.vaadin.testbench.elementsbase.ServerClass;

@ServerClass("com.vaadin.v7.ui.Select")
public class SelectElement
extends com.vaadin.testbench.elements.SelectElement {
public class SelectElement extends com.vaadin.testbench.elements.SelectElement {

}

+ 1
- 2
uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/TreeElement.java View File

@@ -3,7 +3,6 @@ package com.vaadin.v7.testbench.customelements;
import com.vaadin.testbench.elementsbase.ServerClass;

@ServerClass("com.vaadin.v7.ui.Tree")
public class TreeElement
extends com.vaadin.testbench.elements.TreeElement {
public class TreeElement extends com.vaadin.testbench.elements.TreeElement {

}

+ 2
- 4
uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java View File

@@ -228,13 +228,11 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog {
hl.setSpacing(true);
hl.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
Label l1 = new Label("Respond to " + type + " requests with code");
final TextField responseCode = new TextField(null,
"" + response.code);
final TextField responseCode = new TextField(null, "" + response.code);
responseCode.setConverter(Integer.class);
responseCode.setWidth("5em");
Label l2 = new Label("for the following");
final TextField timeField = new TextField(null,
"" + response.time);
final TextField timeField = new TextField(null, "" + response.time);
timeField.setConverter(Integer.class);
timeField.setWidth("5em");
Label l3 = new Label("seconds");

+ 1
- 2
uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java View File

@@ -36,8 +36,7 @@ public class DisableEnableCascadeStyles extends TestBase {

button = new Button("Button, enabled");
nativeButton = new NativeButton("NativeButton, enabled");
textField = new TextField(
"TextField with caption and value, enabled");
textField = new TextField("TextField with caption and value, enabled");
textField.setValue("Text");
textArea = new TextArea("TextArea with caption and value, enabled");
textArea.setValue("Text");

+ 1
- 2
uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java View File

@@ -20,8 +20,7 @@ public class ErrorMessages extends TestBase {
bb.setComponentError(new CompositeErrorMessage(errors));
addComponent(bb);

TextField tf = new TextField("",
"Textfield with UserError");
TextField tf = new TextField("", "Textfield with UserError");
tf.setComponentError(new UserError("This is a failure"));
addComponent(tf);


+ 2
- 4
uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java View File

@@ -15,14 +15,12 @@ public class DoubleInTextField extends AbstractComponentDataBindingTest {
new Address("Dovestreet 12", 12233, "Johnston",
Country.SOUTH_AFRICA));

TextField salary = new TextField(
"Vaadin 7 - TextField with Double");
TextField salary = new TextField("Vaadin 7 - TextField with Double");
addComponent(salary);
salary.setPropertyDataSource(
new MethodProperty<Double>(person, "salaryDouble"));

TextField salary6 = new TextField(
"Vaadin 6 - TextField with Double");
TextField salary6 = new TextField("Vaadin 6 - TextField with Double");
addComponent(salary6);
salary6.setPropertyDataSource(
new MethodProperty<Double>(person, "salaryDouble"));

+ 2
- 1
uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java View File

@@ -141,7 +141,8 @@ public abstract class LegacyAbstractFieldTest<T extends AbstractField>
};

@Override
public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event) {
public void valueChange(
com.vaadin.v7.data.Property.ValueChangeEvent event) {
log(event.getClass().getSimpleName() + ", new value: "
+ getValue(event.getProperty()));
}

+ 1
- 2
uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java View File

@@ -26,8 +26,7 @@ public class ButtonTabIndex extends TestBase {
protected void setup() {
TextField tf1 = new TextField("Tab index 0");
tf1.setTabIndex(0);
TextField tf2 = new TextField(
"Tab index -1, focused initially");
TextField tf2 = new TextField("Tab index -1, focused initially");
tf2.setTabIndex(-1);
tf2.focus();
addComponent(tf1);

+ 0
- 0
uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save