diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-27 12:44:25 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-27 13:44:25 +0300 |
commit | 9e6490d32a024333032b080efc7ba2d815c6eeed (patch) | |
tree | 39c3727bd3e5349d3a5967c4a645e8f395e5e69e | |
parent | 9f9efe0058397992fda43e104c90b79039d41c0f (diff) | |
download | vaadin-framework-9e6490d32a024333032b080efc7ba2d815c6eeed.tar.gz vaadin-framework-9e6490d32a024333032b080efc7ba2d815c6eeed.zip |
Fix typos (#10095)
24 files changed, 152 insertions, 114 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java index d3b595b55a..14aa93893a 100644 --- a/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/AbstractComponentConnector.java @@ -142,11 +142,11 @@ public abstract class AbstractComponentConnector extends AbstractConnector } /** - * The new default behaviour is for long taps to fire a contextclick event - * if there's a contextclick listener attached to the component. + * The new default behavior is for long taps to fire a contextclick event if + * there's a contextclick listener attached to the component. * * If you do not want this in your component, override this with a blank - * method to get rid of said behaviour. + * method to get rid of said behavior. * * @since 7.6 */ @@ -166,11 +166,11 @@ public abstract class AbstractComponentConnector extends AbstractConnector } /** - * The new default behaviour is for long taps to fire a contextclick event - * if there's a contextclick listener attached to the component. + * The new default behavior is for long taps to fire a contextclick event if + * there's a contextclick listener attached to the component. * * If you do not want this in your component, override this with a blank - * method to get rid of said behaviour. + * method to get rid of said behavior. * * Some Vaadin Components already handle the long tap as a context menu. * This method is unnecessary for those. diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java index c872026ac7..9ae8115d8b 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -236,8 +236,10 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, int result = 1; result = prime * result + VComboBox.this.hashCode(); result = prime * result + ((key == null) ? 0 : key.hashCode()); - result = prime * result + ((caption == null) ? 0 : caption.hashCode()); - result = prime * result + ((untranslatedIconUri == null) ? 0 : untranslatedIconUri.hashCode()); + result = prime * result + + ((caption == null) ? 0 : caption.hashCode()); + result = prime * result + ((untranslatedIconUri == null) ? 0 + : untranslatedIconUri.hashCode()); result = prime * result + ((style == null) ? 0 : style.hashCode()); return result; } @@ -678,7 +680,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, /* * Prevent the keyboard focus from leaving the textfield by - * preventing the default behaviour of the browser. Fixes #4285. + * preventing the default behavior of the browser. Fixes #4285. */ handleMouseDownEvent(event); } @@ -1262,7 +1264,8 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, int getItemOffsetHeight() { List<MenuItem> items = getItems(); return items != null && items.size() > 0 - ? items.get(0).getOffsetHeight() : 0; + ? items.get(0).getOffsetHeight() + : 0; } /* @@ -1271,7 +1274,8 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, int getItemOffsetWidth() { List<MenuItem> items = getItems(); return items != null && items.size() > 0 - ? items.get(0).getOffsetWidth() : 0; + ? items.get(0).getOffsetWidth() + : 0; } /** @@ -1300,7 +1304,8 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, // first check if there is a key match to handle items with // identical captions String currentKey = currentSuggestion != null - ? currentSuggestion.getOptionKey() : ""; + ? currentSuggestion.getOptionKey() + : ""; for (int i = 0; i < p; i++) { final MenuItem potentialExactMatch = getItems().get(i); if (currentKey.equals(getSuggestionKey(potentialExactMatch)) @@ -1381,7 +1386,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, } else { /* * Setting the selectionrange for an uneditable textbox leads to - * unwanted behaviour when the width of the textbox is narrower + * unwanted behavior when the width of the textbox is narrower * than the width of the entry: the end of the entry is shown * instead of the beginning. (see #13477) * @@ -2671,7 +2676,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, private void handleMouseDownEvent(Event event) { /* * Prevent the keyboard focus from leaving the textfield by preventing - * the default behaviour of the browser. Fixes #4285. + * the default behavior of the browser. Fixes #4285. */ if (event.getTypeInt() == Event.ONMOUSEDOWN) { debug("VComboBox: blocking mouseDown event to avoid blur"); diff --git a/client/src/main/java/com/vaadin/client/ui/VPanel.java b/client/src/main/java/com/vaadin/client/ui/VPanel.java index bf41ef1f9e..b930d54336 100644 --- a/client/src/main/java/com/vaadin/client/ui/VPanel.java +++ b/client/src/main/java/com/vaadin/client/ui/VPanel.java @@ -80,7 +80,7 @@ public class VPanel extends SimplePanel implements ShortcutActionHandlerOwner, /* * Make contentNode focusable only by using the setFocus() method. This - * behaviour can be changed by invoking setTabIndex() in the serverside + * behavior can be changed by invoking setTabIndex() in the serverside * implementation */ contentNode.setTabIndex(-1); diff --git a/client/src/main/java/com/vaadin/client/widgets/Overlay.java b/client/src/main/java/com/vaadin/client/widgets/Overlay.java index 78d73dd398..073b5c24d2 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Overlay.java +++ b/client/src/main/java/com/vaadin/client/widgets/Overlay.java @@ -509,7 +509,7 @@ public class Overlay extends PopupPanel { // Calculate proper z-index int zIndex = -1; try { - // Odd behaviour with Windows Hosted Mode forces us to use + // Odd behavior with Windows Hosted Mode forces us to use // this redundant try/catch block (See dev.vaadin.com #2011) zIndex = Integer.parseInt(getElement().getStyle().getZIndex()); } catch (Exception ignore) { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java index 74c88d9c52..3bc66e8390 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java @@ -117,7 +117,7 @@ public class VFilterSelect extends Composite * Constructor * * @param uidl - * The UIDL recieved from the server + * The UIDL received from the server */ public FilterSelectSuggestion(UIDL uidl) { key = uidl.getStringAttribute("key"); @@ -234,8 +234,10 @@ public class VFilterSelect extends Composite int result = 1; result = prime * result + VFilterSelect.this.hashCode(); result = prime * result + ((key == null) ? 0 : key.hashCode()); - result = prime * result + ((caption == null) ? 0 : caption.hashCode()); - result = prime * result + ((untranslatedIconUri == null) ? 0 : untranslatedIconUri.hashCode()); + result = prime * result + + ((caption == null) ? 0 : caption.hashCode()); + result = prime * result + ((untranslatedIconUri == null) ? 0 + : untranslatedIconUri.hashCode()); result = prime * result + ((style == null) ? 0 : style.hashCode()); return result; } @@ -675,7 +677,7 @@ public class VFilterSelect extends Composite /* * Prevent the keyboard focus from leaving the textfield by - * preventing the default behaviour of the browser. Fixes #4285. + * preventing the default behavior of the browser. Fixes #4285. */ handleMouseDownEvent(event); } @@ -1300,7 +1302,8 @@ public class VFilterSelect extends Composite int getItemOffsetHeight() { List<MenuItem> items = getItems(); return items != null && items.size() > 0 - ? items.get(0).getOffsetHeight() : 0; + ? items.get(0).getOffsetHeight() + : 0; } /* @@ -1309,7 +1312,8 @@ public class VFilterSelect extends Composite int getItemOffsetWidth() { List<MenuItem> items = getItems(); return items != null && items.size() > 0 - ? items.get(0).getOffsetWidth() : 0; + ? items.get(0).getOffsetWidth() + : 0; } /** @@ -1382,7 +1386,7 @@ public class VFilterSelect extends Composite } else { /* * Setting the selectionrange for an uneditable textbox leads to - * unwanted behaviour when the width of the textbox is narrower + * unwanted behavior when the width of the textbox is narrower * than the width of the entry: the end of the entry is shown * instead of the beginning. (see #13477) * @@ -1441,7 +1445,7 @@ public class VFilterSelect extends Composite /* * Prevent the keyboard focus from leaving the textfield by - * preventing the default behaviour of the browser. Fixes #4285. + * preventing the default behavior of the browser. Fixes #4285. */ handleMouseDownEvent(event); } @@ -2548,7 +2552,7 @@ public class VFilterSelect extends Composite private void handleMouseDownEvent(Event event) { /* * Prevent the keyboard focus from leaving the textfield by preventing - * the default behaviour of the browser. Fixes #4285. + * the default behavior of the browser. Fixes #4285. */ if (event.getTypeInt() == Event.ONMOUSEDOWN) { event.preventDefault(); diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java index f0f05ff476..eeeb3f6c6c 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java @@ -1433,9 +1433,11 @@ public class VScrollTable extends FlowPanel /** For internal use only. May be removed or replaced in the future. */ public void updateFirstVisibleAndScrollIfNeeded(UIDL uidl) { firstvisible = uidl.hasVariable("firstvisible") - ? uidl.getIntVariable("firstvisible") : 0; + ? uidl.getIntVariable("firstvisible") + : 0; firstvisibleOnLastPage = uidl.hasVariable("firstvisibleonlastpage") - ? uidl.getIntVariable("firstvisibleonlastpage") : -1; + ? uidl.getIntVariable("firstvisibleonlastpage") + : -1; if (firstvisible != lastRequestedFirstvisible && scrollBody != null) { // Update lastRequestedFirstvisible right away here @@ -1477,7 +1479,8 @@ public class VScrollTable extends FlowPanel : MULTISELECT_MODE_DEFAULT); nullSelectionAllowed = uidl.hasAttribute("nsa") - ? uidl.getBooleanAttribute("nsa") : true; + ? uidl.getBooleanAttribute("nsa") + : true; if (uidl.hasAttribute("selectmode")) { if (readOnly) { @@ -1495,7 +1498,8 @@ public class VScrollTable extends FlowPanel /** For internal use only. May be removed or replaced in the future. */ public void updateDragMode(UIDL uidl) { dragmode = uidl.hasAttribute("dragmode") - ? uidl.getIntAttribute("dragmode") : 0; + ? uidl.getIntAttribute("dragmode") + : 0; if (BrowserInfo.get().isIE()) { if (dragmode > 0) { getElement().setPropertyJSO("onselectstart", @@ -2218,7 +2222,8 @@ public class VScrollTable extends FlowPanel tFoot.enableBrowserIntelligence(); int hierarchyColumnIndent = scrollBody != null - ? scrollBody.getMaxIndent() : 0; + ? scrollBody.getMaxIndent() + : 0; HeaderCell hierarchyHeaderWithExpandRatio = null; // first loop: collect natural widths @@ -3472,7 +3477,8 @@ public class VScrollTable extends FlowPanel */ public int getNaturalColumnWidth(int columnIndex) { final int iw = columnIndex == getHierarchyColumnIndex() - ? scrollBody.getMaxIndent() : 0; + ? scrollBody.getMaxIndent() + : 0; saveNaturalColumnWidthIfNotSaved(columnIndex); if (isDefinedWidth()) { if (iw > width) { @@ -4424,7 +4430,8 @@ public class VScrollTable extends FlowPanel */ public int getNaturalColumnWidth(int columnIndex) { final int iw = columnIndex == getHierarchyColumnIndex() - ? scrollBody.getMaxIndent() : 0; + ? scrollBody.getMaxIndent() + : 0; saveNaturalColumnWidthIfNotSaved(columnIndex); if (isDefinedWidth()) { if (iw > width) { @@ -4587,7 +4594,8 @@ public class VScrollTable extends FlowPanel updated.add(cid); String caption = col.hasAttribute("fcaption") - ? col.getStringAttribute("fcaption") : ""; + ? col.getStringAttribute("fcaption") + : ""; FooterCell c = getFooterCell(cid); if (c == null) { c = new FooterCell(cid, caption); @@ -5350,8 +5358,10 @@ public class VScrollTable extends FlowPanel * To get this work properly crossplatform, we will also set the width * of td. * - * @param colIndex The column Index - * @param w The content width + * @param colIndex + * The column Index + * @param w + * The content width */ public void setColWidth(int colIndex, int w) { for (Widget row : renderedRows) { @@ -5415,7 +5425,8 @@ public class VScrollTable extends FlowPanel noCells = true; VScrollTableRow next = (VScrollTableRow) iterator().next(); boolean sorted = tHead.getHeaderCell(0) != null - ? tHead.getHeaderCell(0).isSorted() : false; + ? tHead.getHeaderCell(0).isSorted() + : false; next.addCell(null, "", ALIGN_LEFT, "", true, sorted); firstTD = item.getCells().getItem(0); } @@ -6443,7 +6454,8 @@ public class VScrollTable extends FlowPanel for (Widget next : scrollBody) { Element child = (Element) dragImage.getChild(i++); - if (!rowKeyIsSelected(((VScrollTableRow) next).rowKey)) { + if (!rowKeyIsSelected( + ((VScrollTableRow) next).rowKey)) { child.getStyle().setVisibility(Visibility.HIDDEN); } } @@ -7307,7 +7319,8 @@ public class VScrollTable extends FlowPanel */ protected String buildCaptionHtmlSnippet(UIDL uidl) { String s = uidl.hasAttribute("caption") - ? uidl.getStringAttribute("caption") : ""; + ? uidl.getStringAttribute("caption") + : ""; if (uidl.hasAttribute("icon")) { Icon icon = client.getIcon(uidl.getStringAttribute("icon")); icon.setAlternateText("icon"); @@ -7364,7 +7377,8 @@ public class VScrollTable extends FlowPanel rowRequestHandler.cancel(); - if (BrowserInfo.get().isSafariOrIOS() && event != null && scrollTop == 0) { + if (BrowserInfo.get().isSafariOrIOS() && event != null + && scrollTop == 0) { // due to the webkitoverflowworkaround, top may sometimes report 0 // for webkit, although it really is not. Expecting to have the // correct value available soon. @@ -7491,9 +7505,11 @@ public class VScrollTable extends FlowPanel public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((dropLocation == null) ? 0 : dropLocation.hashCode()); + result = prime * result + + ((dropLocation == null) ? 0 : dropLocation.hashCode()); result = prime * result + overkey; - result = prime * result + ((colkey == null) ? 0 : colkey.hashCode()); + result = prime * result + + ((colkey == null) ? 0 : colkey.hashCode()); return result; } } @@ -7534,8 +7550,10 @@ public class VScrollTable extends FlowPanel } drag.getDropDetails().put("itemIdOver", dropDetails.overkey + ""); - drag.getDropDetails().put("detail", dropDetails.dropLocation != null - ? dropDetails.dropLocation.toString() : null); + drag.getDropDetails().put("detail", + dropDetails.dropLocation != null + ? dropDetails.dropLocation.toString() + : null); } @@ -7793,7 +7811,7 @@ public class VScrollTable extends FlowPanel if (keycode == getNavigationPageDownKey()) { if (isSelectable()) { /* - * If selectable we plagiate MSW behaviour: first scroll to the + * If selectable we plagiate MSW behavior: first scroll to the * end of current view. If at the end, scroll down one page * length and keep the selected row in the bottom part of * visible area. @@ -7847,7 +7865,7 @@ public class VScrollTable extends FlowPanel if (keycode == getNavigationPageUpKey()) { if (isSelectable()) { /* - * If selectable we plagiate MSW behaviour: first scroll to the + * If selectable we plagiate MSW behavior: first scroll to the * end of current view. If at the end, scroll down one page * length and keep the selected row in the bottom part of * visible area. diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java index a550272f61..e9ddb02487 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java @@ -730,8 +730,9 @@ public class VTree extends FocusElementPanel } final boolean inCaption = isCaptionElement(target); - if (inCaption && client.hasEventListeners(VTree.this, - TreeConstants.ITEM_CLICK_EVENT_ID) + if (inCaption + && client.hasEventListeners(VTree.this, + TreeConstants.ITEM_CLICK_EVENT_ID) && (type == Event.ONDBLCLICK || type == Event.ONMOUSEUP)) { fireClick(event); @@ -1592,8 +1593,8 @@ public class VTree extends FocusElementPanel * problem, that the newly selected item is announced too often with * a screen reader. * - * Behaviour is different when using the Tree with and without - * screen reader. + * Behavior is different when using the Tree with and without screen + * reader. */ if (node.key.equals(lastNodeKey)) { Roles.getTreeRole().setAriaActivedescendantProperty( 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()); diff --git a/server/src/main/java/com/vaadin/annotations/DesignRoot.java b/server/src/main/java/com/vaadin/annotations/DesignRoot.java index c3d25b78b6..694ca8c35b 100644 --- a/server/src/main/java/com/vaadin/annotations/DesignRoot.java +++ b/server/src/main/java/com/vaadin/annotations/DesignRoot.java @@ -26,11 +26,11 @@ import com.vaadin.ui.declarative.Design; * Marks the component as the root of a design (html) file. * <p> * Used together with {@link Design#read(com.vaadin.ui.Component)} to be able - * the load the design without further configuration. By default, the design - * is loaded from the same package as the annotated class and the design - * filename is derived from the class name. You can override the default - * behaviour by using the {@link #value()} parameter in order to load the - * design from a different package or with a non-default filename. + * the load the design without further configuration. By default, the design is + * loaded from the same package as the annotated class and the design filename + * is derived from the class name. You can override the default behavior by + * using the {@link #value()} parameter in order to load the design from a + * different package or with a non-default filename. * * @since 7.4 * @author Vaadin Ltd diff --git a/server/src/main/java/com/vaadin/server/WebBrowser.java b/server/src/main/java/com/vaadin/server/WebBrowser.java index f9304e5281..b221d3ff6d 100644 --- a/server/src/main/java/com/vaadin/server/WebBrowser.java +++ b/server/src/main/java/com/vaadin/server/WebBrowser.java @@ -527,7 +527,7 @@ public class WebBrowser implements Serializable { locale = request.getLocale(); address = request.getRemoteAddr(); secureConnection = request.isSecure(); - // Headers are case insensitive according to the specifiation but are + // Headers are case insensitive according to the specification but are // case sensitive in Weblogic portal... String agent = request.getHeader("User-Agent"); diff --git a/server/src/main/java/com/vaadin/ui/Embedded.java b/server/src/main/java/com/vaadin/ui/Embedded.java index 92099b9e68..7fb9a7aa06 100644 --- a/server/src/main/java/com/vaadin/ui/Embedded.java +++ b/server/src/main/java/com/vaadin/ui/Embedded.java @@ -265,7 +265,7 @@ public class Embedded extends AbstractComponent { * Automatically add wmode transparent as we use lots of * floating layers in Vaadin. If developers need better flash * performance, they can override this value programmatically - * back to "window" (the defautl). + * back to "window" (the default). */ if (getParameter("wmode") == null) { setParameter("wmode", "transparent"); diff --git a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java index d878c19aa8..91d62a9b83 100644 --- a/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java +++ b/uitest/src/main/java/com/vaadin/tests/OrderedLayoutSwapComponents.java @@ -29,7 +29,7 @@ import com.vaadin.ui.VerticalLayout; /** * * This Component contains some simple test to see that component updates its - * contents propertly. + * contents properly. * * @author Vaadin Ltd. */ diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java index 8432605b09..b352170846 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java +++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java @@ -17,7 +17,7 @@ public class GridLayoutComboBoxZoomOut extends AbstractTestCase { Label description = new Label( "Open this application in Chrome, zoom out (cmd + \"-\") and " - + "open the ComboBox for weird behaviour."); + + "open the ComboBox for weird behavior."); mainWindow.addComponent(description); Layout formLayout = new GridLayout(2, 1); diff --git a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java index c39e30be48..9f393d9398 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java +++ b/uitest/src/main/java/com/vaadin/tests/components/embedded/EmbeddedThemeResource.java @@ -27,7 +27,7 @@ import com.vaadin.v7.ui.themes.Reindeer; /** * Tests that {@link Embedded} uses correct theme when the theme is set with * {@link #setTheme(String)}, and also updates correctly if theme is changed - * later. {@link Image} is used as the baseline for correct behaviour. + * later. {@link Image} is used as the baseline for correct behavior. * * @author Vaadin Ltd */ diff --git a/uitest/src/main/resources/html-tests/BottomComponentScrollsUp.html b/uitest/src/main/resources/html-tests/BottomComponentScrollsUp.html index a264b38ba8..f9d1a08182 100644 --- a/uitest/src/main/resources/html-tests/BottomComponentScrollsUp.html +++ b/uitest/src/main/resources/html-tests/BottomComponentScrollsUp.html @@ -1,7 +1,7 @@ <html> <head> -<title>Bottom component scroll when focus - test with plain html to see the default behaviour</title> +<title>Bottom component scroll when focus - test with plain html to see the default behavior</title> <link rel="stylesheet" type="text/css" href="./../VAADIN/themes/reindeer/styles.css"> <script> diff --git a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java index 56ef8ebcae..bf7a663971 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java @@ -41,7 +41,7 @@ import com.vaadin.ui.Image; /** * Tests that {@link Embedded} uses correct theme when the theme is set with * {@link #setTheme(String)}, and also updates correctly if theme is changed - * later. {@link Image} is used as the baseline for correct behaviour. + * later. {@link Image} is used as the baseline for correct behavior. * * @author Vaadin Ltd */ diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java index ac62ffe6d6..073fbf4abe 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/ui/ComboboxSelectedItemTextTest.java @@ -95,7 +95,7 @@ public class ComboboxSelectedItemTextTest extends MultiBrowserTest { clickElement(comboBoxPopup.findElements(By.tagName("td")).get(2)); // click the button of the first combobox. This would reveal the - // unwanted behaviour. + // unwanted behavior. clickElement( comboBox.findElement(By.className("v-filterselect-button"))); diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java index 1193ba9334..615bc7e0eb 100644 --- a/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java +++ b/uitest/src/test/java/com/vaadin/tests/tb3/MultiBrowserTest.java @@ -80,7 +80,7 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration { protected List<DesiredCapabilities> getBrowsersSupportingTooltip() { // With IEDriver, the cursor seems to jump to default position after the - // mouse move, so we are not able to test the tooltip behaviour properly + // mouse move, so we are not able to test the tooltip behavior properly // unless using requireWindowFocusForIE() { return true; } . // See #13854. // On Firefox, the driver causes additional mouseOut events causing the |