summaryrefslogtreecommitdiffstats
path: root/compatibility-client
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-client
parent9f9efe0058397992fda43e104c90b79039d41c0f (diff)
downloadvaadin-framework-9e6490d32a024333032b080efc7ba2d815c6eeed.tar.gz
vaadin-framework-9e6490d32a024333032b080efc7ba2d815c6eeed.zip
Fix typos (#10095)
Diffstat (limited to 'compatibility-client')
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java22
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java58
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java9
3 files changed, 56 insertions, 33 deletions
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(