aboutsummaryrefslogtreecommitdiffstats
path: root/compatibility-server
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-27 12:44:25 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-27 13:44:25 +0300
commit9e6490d32a024333032b080efc7ba2d815c6eeed (patch)
tree39c3727bd3e5349d3a5967c4a645e8f395e5e69e /compatibility-server
parent9f9efe0058397992fda43e104c90b79039d41c0f (diff)
downloadvaadin-framework-9e6490d32a024333032b080efc7ba2d815c6eeed.tar.gz
vaadin-framework-9e6490d32a024333032b080efc7ba2d815c6eeed.zip
Fix typos (#10095)
Diffstat (limited to 'compatibility-server')
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java4
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java12
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java9
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java7
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java49
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java29
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java2
7 files changed, 61 insertions, 51 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java
index 9ce4947586..69f51fc884 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java
@@ -57,7 +57,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
private final Container container;
/**
- * Ordering information, ie. the mapping from Item ID to the next item ID.
+ * Ordering information, i.e. the mapping from Item ID to the next item ID.
* The last item id should not be present
*/
private Hashtable<Object, Object> next;
@@ -79,7 +79,7 @@ public class ContainerOrderedWrapper implements Container.Ordered,
private Object last;
/**
- * Is the wrapped container ordered by itself, ie. does it implement the
+ * Is the wrapped container ordered by itself, i.e. does it implement the
* Container.Ordered interface by itself? If it does, this class will use
* the methods of the underlying container directly.
*/
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java
index 2c7fbcb200..d5ad5f4aef 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java
@@ -38,9 +38,11 @@ import com.vaadin.v7.data.Property;
* @author Vaadin Ltd.
* @since 3.0
*
- * @deprecated As of 8.0, no direct replacement available. You can use {@link Map} directly as an item for {@link Binder}
- * or {@link DataProvider} and access item properties with lambdas like {@code binder.forField(component).bind(...)} or
- * {@code new Grid<Map<...>>(dataProvider).addColumn(map->map.get(...))}.
+ * @deprecated As of 8.0, no direct replacement available. You can use
+ * {@link Map} directly as an item for {@link Binder} or
+ * {@link DataProvider} and access item properties with lambdas like
+ * {@code binder.forField(component).bind(...)} or
+ * {@code new Grid<Map<...>>(dataProvider).addColumn(map->map.get(...))}.
*/
@Deprecated
@SuppressWarnings("serial")
@@ -106,7 +108,7 @@ public class PropertysetItem
@Override
public boolean removeItemProperty(Object id) {
- // Cant remove missing properties
+ // Can't remove missing properties
if (map.remove(id) == null) {
return false;
}
@@ -136,7 +138,7 @@ public class PropertysetItem
throw new NullPointerException("Item property id can not be null");
}
- // Cant add a property twice
+ // Can't add a property twice
if (map.containsKey(id)) {
return false;
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java
index 97d5b31178..1c40ea26d2 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java
@@ -29,15 +29,16 @@ import com.vaadin.v7.data.Validator;
* The <code>CompositeValidator</code> allows you to chain (compose) many
* validators to validate one field. The contained validators may be required to
* all validate the value to validate or it may be enough that one contained
- * validator validates the value. This behaviour is controlled by the modes
+ * validator validates the value. This behavior is controlled by the modes
* <code>AND</code> and <code>OR</code>.
*
* @author Vaadin Ltd.
* @since 3.0
*
- * @deprecated As of 8.0, no direct replacement available. See {@link Binder#forField(HasValue)} and various methods for
- * validation and conversion chaining: {@code withValidator(...)}, {@code withConverter(...)},
- * {@code withNullRepresentation(...)}
+ * @deprecated As of 8.0, no direct replacement available. See
+ * {@link Binder#forField(HasValue)} and various methods for
+ * validation and conversion chaining: {@code withValidator(...)},
+ * {@code withConverter(...)}, {@code withNullRepresentation(...)}
*/
@SuppressWarnings("serial")
@Deprecated
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java
index 4fc9a63789..b88ee7f5df 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Form.java
@@ -286,7 +286,7 @@ public class Form extends AbstractField<Object>
* Controls the making validation visible implicitly on commit.
*
* Having commit() call setValidationVisible(true) implicitly is the default
- * behaviour. You can disable the implicit setting by setting this property
+ * behavior. You can disable the implicit setting by setting this property
* as false.
*
* It is useful, because you usually want to start with the form free of
@@ -695,8 +695,9 @@ public class Form extends AbstractField<Object>
*/
@Override
public void setItemDataSource(Item newDataSource) {
- setItemDataSource(newDataSource, newDataSource != null
- ? newDataSource.getItemPropertyIds() : null);
+ setItemDataSource(newDataSource,
+ newDataSource != null ? newDataSource.getItemPropertyIds()
+ : null);
}
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
index 6cd7323cd9..387c4eebf4 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
@@ -397,10 +397,10 @@ public class Grid extends AbstractComponent
if (details != null) {
if (details.getParent() != null) {
String name = detailsGenerator.getClass().getName();
- throw new IllegalStateException(
- name + " generated a details component that already "
- + "was attached. (itemId: " + itemId
- + ", component: " + details + ")");
+ throw new IllegalStateException(name
+ + " generated a details component that already "
+ + "was attached. (itemId: " + itemId
+ + ", component: " + details + ")");
}
itemIdToDetailsComponent.put(itemId, details);
@@ -486,7 +486,8 @@ public class Grid extends AbstractComponent
.get(itemId);
rowData.put(GridState.JSONKEY_DETAILS_VISIBLE,
(detailsComponent != null
- ? detailsComponent.getConnectorId() : ""));
+ ? detailsComponent.getConnectorId()
+ : ""));
}
}
@@ -1522,7 +1523,8 @@ public class Grid extends AbstractComponent
/**
* A default implementation of a
- * {@link com.vaadin.v7.ui.Grid.SelectionModel.Single SelectionModel.Single}.
+ * {@link com.vaadin.v7.ui.Grid.SelectionModel.Single
+ * SelectionModel.Single}.
*/
@Deprecated
public static class SingleSelectionModel extends AbstractSelectionModel
@@ -3834,10 +3836,10 @@ public class Grid extends AbstractComponent
} else if (!((Sortable) grid.datasource)
.getSortableContainerPropertyIds()
.contains(propertyId)) {
- throw new IllegalStateException(
- "Can't set column " + toString()
- + " sortable. Container doesn't support sorting by property "
- + propertyId);
+ throw new IllegalStateException("Can't set column "
+ + toString()
+ + " sortable. Container doesn't support sorting by property "
+ + propertyId);
}
}
@@ -4125,8 +4127,8 @@ public class Grid extends AbstractComponent
*
* @since 7.5.0
* @param hidable
- * <code>true</code> if the column may be hidable by the
- * user via UI interaction
+ * <code>true</code> if the column may be hidable by the user
+ * via UI interaction
* @return this column
*/
public Column setHidable(boolean hidable) {
@@ -5063,7 +5065,7 @@ public class Grid extends AbstractComponent
* reinitialized automatically if the container is changed, and if the same
* properties are present after container change, the columns are reused.
* Properties with same names, but different data types will lead to
- * unpredictable behaviour.
+ * unpredictable behavior.
*
* @param container
* The container data source. Cannot be null.
@@ -5887,7 +5889,8 @@ public class Grid extends AbstractComponent
* <p>
* This method is a shorthand that delegates to the
* {@link #getSelectionModel() selection model}. Only
- * {@link com.vaadin.v7.ui.Grid.SelectionModel.Single SelectionModel.Single} is supported.
+ * {@link com.vaadin.v7.ui.Grid.SelectionModel.Single SelectionModel.Single}
+ * is supported.
*
* @return the item id of the currently selected item, or <code>null</code>
* if nothing is selected
@@ -5925,8 +5928,8 @@ public class Grid extends AbstractComponent
* This method is a shorthand that delegates to the
* {@link #getSelectionModel() selection model}. Only
* {@link com.vaadin.v7.ui.Grid.SelectionModel.Single SelectionModel.Single}
- * and {@link com.vaadin.v7.ui.Grid.SelectionModel.Multi SelectionModel.Multi}
- * are supported.
+ * and {@link com.vaadin.v7.ui.Grid.SelectionModel.Multi
+ * SelectionModel.Multi} are supported.
*
* @param itemId
* the itemId to mark as selected
@@ -5972,8 +5975,8 @@ public class Grid extends AbstractComponent
* This method is a shorthand that delegates to the
* {@link #getSelectionModel() selection model}. Only
* {@link com.vaadin.v7.ui.Grid.SelectionModel.Single SelectionModel.Single}
- * and {@link com.vaadin.v7.ui.Grid.SelectionModel.Multi SelectionModel.Multi}
- * are supported.
+ * and {@link com.vaadin.v7.ui.Grid.SelectionModel.Multi
+ * SelectionModel.Multi} are supported.
*
* @param itemId
* the itemId to remove from being selected
@@ -6020,8 +6023,8 @@ public class Grid extends AbstractComponent
* This method is a shorthand that delegates to the
* {@link #getSelectionModel() selection model}. Only
* {@link com.vaadin.v7.ui.Grid.SelectionModel.Single SelectionModel.Single}
- * and {@link com.vaadin.v7.ui.Grid.SelectionModel.Multi SelectionModel.Multi}
- * are supported.
+ * and {@link com.vaadin.v7.ui.Grid.SelectionModel.Multi
+ * SelectionModel.Multi} are supported.
*
* @return <code>true</code> if the selection state changed,
* <code>false</code> if the itemId was already selected
@@ -7622,8 +7625,10 @@ public class Grid extends AbstractComponent
Object value = datasource.getItem(itemId)
.getItemProperty(c.getPropertyId()).getValue();
tableRow.appendElement("td")
- .append((value != null ? DesignFormatter
- .encodeForTextNode(value.toString()) : ""));
+ .append((value != null
+ ? DesignFormatter
+ .encodeForTextNode(value.toString())
+ : ""));
}
}
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java
index dac43ba923..82dc65774c 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java
@@ -151,7 +151,7 @@ public class Table extends AbstractSelect implements Action.Container,
@Deprecated
public enum Align {
/**
- * Left column alignment. <b>This is the default behaviour. </b>
+ * Left column alignment. <b>This is the default behavior. </b>
*/
LEFT("b"),
@@ -2282,7 +2282,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
GeneratedRow generatedRow = rowGenerator != null
- ? rowGenerator.generateRow(this, id) : null;
+ ? rowGenerator.generateRow(this, id)
+ : null;
cells[CELL_GENERATED_ROW][i] = generatedRow;
for (int j = 0; j < cols; j++) {
@@ -2929,12 +2930,11 @@ public class Table extends AbstractSelect implements Action.Container,
variables = new HashMap<String, Object>(variables);
variables.remove("selected");
} else if (
- /*
- * The AbstractSelect cannot handle the multiselection properly, instead
- * we handle it ourself
- */
- isSelectable() && isMultiSelect()
- && variables.containsKey("selected")
+ /*
+ * The AbstractSelect cannot handle the multiselection properly, instead
+ * we handle it ourself
+ */
+ isSelectable() && isMultiSelect() && variables.containsKey("selected")
&& multiSelectMode == MultiSelectMode.DEFAULT) {
handleSelectedItems(variables);
variables = new HashMap<String, Object>(variables);
@@ -3128,8 +3128,8 @@ public class Table extends AbstractSelect implements Action.Container,
evt));
}
} else if (
- // Header click event
- variables.containsKey("headerClickEvent")) {
+ // Header click event
+ variables.containsKey("headerClickEvent")) {
MouseEventDetails details = MouseEventDetails
.deSerialize((String) variables.get("headerClickEvent"));
@@ -3141,8 +3141,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
fireEvent(new HeaderClickEvent(this, propertyId, details));
} else if (
- // Footer click event
- variables.containsKey("footerClickEvent")) {
+ // Footer click event
+ variables.containsKey("footerClickEvent")) {
MouseEventDetails details = MouseEventDetails
.deSerialize((String) variables.get("footerClickEvent"));
@@ -3516,8 +3516,9 @@ public class Table extends AbstractSelect implements Action.Container,
target.addAttribute("cols", getVisibleColumns().length);
target.addAttribute("rows", rows);
- target.addAttribute("firstrow", (reqFirstRowToPaint >= 0
- ? reqFirstRowToPaint : firstToBeRenderedInClient));
+ target.addAttribute("firstrow",
+ (reqFirstRowToPaint >= 0 ? reqFirstRowToPaint
+ : firstToBeRenderedInClient));
target.addAttribute("totalrows", total);
if (getPageLength() != 0) {
target.addAttribute("pagelength", getPageLength());
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java
index 8939dc91c8..207d50f8aa 100644
--- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/calendar/CalendarBasicsTest.java
@@ -160,7 +160,7 @@ public class CalendarBasicsTest {
assertEquals(calendar.getInternalCalendar().getTimeZone(),
calendar.getTimeZone());
- // One can override the default behaviour by specifying a timezone
+ // One can override the default behavior by specifying a timezone
TimeZone customTimeZone = TimeZone.getTimeZone("Europe/Helsinki");
calendar.setTimeZone(customTimeZone);
assertEquals(customTimeZone, calendar.getTimeZone());