aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-08-16 04:36:37 +0000
committerArtur Signell <artur.signell@itmill.com>2010-08-16 04:36:37 +0000
commit789c80e2537d800f029734184975c13464f116a8 (patch)
tree4096a6d40c24c10deef335564677ff7c957243e7 /src
parent2ec9d85a5c82edd781eb3585209e6b4405d345e3 (diff)
downloadvaadin-framework-789c80e2537d800f029734184975c13464f116a8.tar.gz
vaadin-framework-789c80e2537d800f029734184975c13464f116a8.zip
Formatted using Eclipse Helios / Windows XP
svn changeset:14496/svn branch:6.4
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/data/Buffered.java3
-rw-r--r--src/com/vaadin/data/Validator.java1
-rw-r--r--src/com/vaadin/data/util/DefaultItemSorter.java6
-rw-r--r--src/com/vaadin/data/util/Filter.java4
-rw-r--r--src/com/vaadin/data/util/IndexedContainer.java15
-rw-r--r--src/com/vaadin/data/util/PropertysetItem.java3
-rw-r--r--src/com/vaadin/data/util/QueryContainer.java4
-rw-r--r--src/com/vaadin/event/MouseEvents.java1
-rw-r--r--src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java4
-rw-r--r--src/com/vaadin/launcher/util/BrowserLauncher.java4
-rw-r--r--src/com/vaadin/terminal/ClassResource.java6
-rwxr-xr-xsrc/com/vaadin/terminal/gwt/client/ApplicationConnection.java63
-rw-r--r--src/com/vaadin/terminal/gwt/client/ClientExceptionHandler.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ComponentLocator.java8
-rw-r--r--src/com/vaadin/terminal/gwt/client/DateTimeService.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/RenderInformation.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/Util.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/VCaption.java3
-rwxr-xr-xsrc/com/vaadin/terminal/gwt/client/VDebugConsole.java8
-rw-r--r--src/com/vaadin/terminal/gwt/client/VErrorMessage.java8
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java22
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/MenuBar.java10
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAccordion.java12
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java28
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java12
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java12
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java8
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VForm.java10
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java16
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java12
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VListSelect.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java33
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VOptionGroupBase.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java134
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VOverlay.java18
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VPanel.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VPopupView.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java124
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VSlider.java29
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTablePaging.java27
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java14
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java5
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java10
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VUpload.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VView.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VWindow.java32
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/dd/VDragEvent.java2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/layout/CellBasedLayout.java9
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java15
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextToolbar.java24
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java57
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java98
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java33
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java26
-rw-r--r--src/com/vaadin/terminal/gwt/server/ApplicationPortlet.java58
-rw-r--r--src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java4
-rw-r--r--src/com/vaadin/terminal/gwt/server/ChangeVariablesErrorEvent.java2
-rw-r--r--src/com/vaadin/terminal/gwt/server/CommunicationManager.java7
-rw-r--r--src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java5
-rw-r--r--src/com/vaadin/terminal/gwt/server/GAEApplicationServlet.java18
-rw-r--r--src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java6
-rw-r--r--src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java4
-rw-r--r--src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java7
-rw-r--r--src/com/vaadin/terminal/gwt/server/RestrictedRenderResponse.java38
-rw-r--r--src/com/vaadin/terminal/gwt/server/WebApplicationContext.java4
-rw-r--r--src/com/vaadin/terminal/gwt/widgetsetutils/AcceptCriteriaFactoryGenerator.java14
-rw-r--r--src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java16
-rw-r--r--src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java17
-rw-r--r--src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java3
-rw-r--r--src/com/vaadin/tools/WidgetsetCompiler.java18
-rw-r--r--src/com/vaadin/ui/AbstractComponent.java6
-rw-r--r--src/com/vaadin/ui/AbstractLayout.java4
-rw-r--r--src/com/vaadin/ui/Component.java16
-rw-r--r--src/com/vaadin/ui/CssLayout.java2
-rw-r--r--src/com/vaadin/ui/DragAndDropWrapper.java4
-rw-r--r--src/com/vaadin/ui/Form.java12
-rw-r--r--src/com/vaadin/ui/FormLayout.java2
-rw-r--r--src/com/vaadin/ui/GridLayout.java6
-rw-r--r--src/com/vaadin/ui/Layout.java2
-rw-r--r--src/com/vaadin/ui/Panel.java8
-rw-r--r--src/com/vaadin/ui/PopupView.java3
-rw-r--r--src/com/vaadin/ui/Select.java3
-rw-r--r--src/com/vaadin/ui/Slider.java6
-rw-r--r--src/com/vaadin/ui/TabSheet.java2
-rw-r--r--src/com/vaadin/ui/Table.java49
-rw-r--r--src/com/vaadin/ui/Tree.java14
-rw-r--r--src/com/vaadin/ui/Window.java30
94 files changed, 694 insertions, 741 deletions
diff --git a/src/com/vaadin/data/Buffered.java b/src/com/vaadin/data/Buffered.java
index 9bf3bba317..13844c1101 100644
--- a/src/com/vaadin/data/Buffered.java
+++ b/src/com/vaadin/data/Buffered.java
@@ -247,8 +247,7 @@ public interface Buffered extends Serializable {
for (int i = 0; i < causes.length; i++) {
final int causeLevel = (causes[i] instanceof ErrorMessage) ? ((ErrorMessage) causes[i])
- .getErrorLevel()
- : ErrorMessage.ERROR;
+ .getErrorLevel() : ErrorMessage.ERROR;
if (causeLevel > level) {
level = causeLevel;
}
diff --git a/src/com/vaadin/data/Validator.java b/src/com/vaadin/data/Validator.java
index 21a9da9f97..8c96bcba49 100644
--- a/src/com/vaadin/data/Validator.java
+++ b/src/com/vaadin/data/Validator.java
@@ -6,6 +6,7 @@ package com.vaadin.data;
import java.io.Serializable;
+import com.vaadin.data.Validator.InvalidValueException;
import com.vaadin.terminal.ErrorMessage;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
diff --git a/src/com/vaadin/data/util/DefaultItemSorter.java b/src/com/vaadin/data/util/DefaultItemSorter.java
index a2ecd38ef8..372e94a5f9 100644
--- a/src/com/vaadin/data/util/DefaultItemSorter.java
+++ b/src/com/vaadin/data/util/DefaultItemSorter.java
@@ -10,9 +10,9 @@ import java.util.Comparator;
import java.util.List;
import com.vaadin.data.Container;
+import com.vaadin.data.Container.Sortable;
import com.vaadin.data.Item;
import com.vaadin.data.Property;
-import com.vaadin.data.Container.Sortable;
/**
* Provides a default implementation of an ItemSorter. The
@@ -115,8 +115,8 @@ public class DefaultItemSorter implements ItemSorter {
* The second item to compare.
* @return a negative, zero, or positive integer if the property value in
* the first item is less than, equal to, or greater than the
- * property value in the second item. Negated if {@code
- * sortDirection} is false.
+ * property value in the second item. Negated if
+ * {@code sortDirection} is false.
*/
protected int compareProperty(Object propertyId, boolean sortDirection,
Item item1, Item item2) {
diff --git a/src/com/vaadin/data/util/Filter.java b/src/com/vaadin/data/util/Filter.java
index 0fad1a6e1b..433fce5ea9 100644
--- a/src/com/vaadin/data/util/Filter.java
+++ b/src/com/vaadin/data/util/Filter.java
@@ -59,13 +59,13 @@ public class Filter implements Serializable {
@Override
public boolean equals(Object obj) {
- // Only ones of the objects of the same class can be equal
+ // Only ones of the objects of the same class can be equal
if (!(obj instanceof Filter)) {
return false;
}
final Filter o = (Filter) obj;
- // Checks the properties one by one
+ // Checks the properties one by one
if (propertyId != o.propertyId && o.propertyId != null
&& !o.propertyId.equals(propertyId)) {
return false;
diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java
index 2f6bae9851..6d1d3cdad8 100644
--- a/src/com/vaadin/data/util/IndexedContainer.java
+++ b/src/com/vaadin/data/util/IndexedContainer.java
@@ -1472,22 +1472,17 @@ public class IndexedContainer implements Container.Indexed,
// Clone the shallow properties
nc.itemIds = itemIds != null ? (ArrayList) itemIds.clone() : null;
nc.itemSetChangeListeners = itemSetChangeListeners != null ? (LinkedList) itemSetChangeListeners
- .clone()
- : null;
+ .clone() : null;
nc.propertyIds = propertyIds != null ? (ArrayList) propertyIds.clone()
: null;
nc.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList) propertySetChangeListeners
- .clone()
- : null;
+ .clone() : null;
nc.propertyValueChangeListeners = propertyValueChangeListeners != null ? (LinkedList) propertyValueChangeListeners
- .clone()
- : null;
+ .clone() : null;
nc.readOnlyProperties = readOnlyProperties != null ? (HashSet) readOnlyProperties
- .clone()
- : null;
+ .clone() : null;
nc.singlePropertyValueChangeListeners = singlePropertyValueChangeListeners != null ? (Hashtable) singlePropertyValueChangeListeners
- .clone()
- : null;
+ .clone() : null;
nc.types = types != null ? (Hashtable) types.clone() : null;
diff --git a/src/com/vaadin/data/util/PropertysetItem.java b/src/com/vaadin/data/util/PropertysetItem.java
index 83eb15b6ad..1f1398983c 100644
--- a/src/com/vaadin/data/util/PropertysetItem.java
+++ b/src/com/vaadin/data/util/PropertysetItem.java
@@ -248,8 +248,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier,
npsi.list = list != null ? (LinkedList) list.clone() : null;
npsi.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList) propertySetChangeListeners
- .clone()
- : null;
+ .clone() : null;
npsi.map = (HashMap) map.clone();
return npsi;
diff --git a/src/com/vaadin/data/util/QueryContainer.java b/src/com/vaadin/data/util/QueryContainer.java
index 96788947a9..21aef731b0 100644
--- a/src/com/vaadin/data/util/QueryContainer.java
+++ b/src/com/vaadin/data/util/QueryContainer.java
@@ -134,8 +134,8 @@ public class QueryContainer implements Container, Container.Ordered,
final String columnName = metadata.getColumnName(i);
list.add(columnName);
final Property p = getContainerProperty(new Integer(1), columnName);
- propertyTypes.put(columnName, p == null ? Object.class : p
- .getType());
+ propertyTypes.put(columnName,
+ p == null ? Object.class : p.getType());
}
propertyIds = Collections.unmodifiableCollection(list);
}
diff --git a/src/com/vaadin/event/MouseEvents.java b/src/com/vaadin/event/MouseEvents.java
index 547a56a9ea..0825961a9c 100644
--- a/src/com/vaadin/event/MouseEvents.java
+++ b/src/com/vaadin/event/MouseEvents.java
@@ -6,6 +6,7 @@ package com.vaadin.event;
import java.lang.reflect.Method;
+import com.vaadin.event.MouseEvents.ClickListener;
import com.vaadin.terminal.gwt.client.MouseEventDetails;
import com.vaadin.tools.ReflectTools;
import com.vaadin.ui.Component;
diff --git a/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java b/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java
index 69aa033262..c35baf059b 100644
--- a/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java
+++ b/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java
@@ -42,8 +42,8 @@ public class ContainsDataFlavor extends ClientSideCriterion {
}
public boolean accept(DragAndDropEvent dragEvent) {
- return dragEvent.getTransferable().getDataFlavors().contains(
- dataFlavorId);
+ return dragEvent.getTransferable().getDataFlavors()
+ .contains(dataFlavorId);
}
@Override
diff --git a/src/com/vaadin/launcher/util/BrowserLauncher.java b/src/com/vaadin/launcher/util/BrowserLauncher.java
index f30a717cf6..9b7448c9ca 100644
--- a/src/com/vaadin/launcher/util/BrowserLauncher.java
+++ b/src/com/vaadin/launcher/util/BrowserLauncher.java
@@ -37,8 +37,8 @@ public class BrowserLauncher {
try {
// Find out the location of the x-www-browser link from path.
Process process = runtime.exec("which x-www-browser");
- BufferedInputStream ins = new BufferedInputStream(process
- .getInputStream());
+ BufferedInputStream ins = new BufferedInputStream(
+ process.getInputStream());
BufferedReader bufreader = new BufferedReader(
new InputStreamReader(ins));
String defaultLinkPath = bufreader.readLine();
diff --git a/src/com/vaadin/terminal/ClassResource.java b/src/com/vaadin/terminal/ClassResource.java
index 6d604aeea2..740660933c 100644
--- a/src/com/vaadin/terminal/ClassResource.java
+++ b/src/com/vaadin/terminal/ClassResource.java
@@ -130,9 +130,9 @@ public class ClassResource implements ApplicationResource, Serializable {
* @see com.vaadin.terminal.ApplicationResource#getStream()
*/
public DownloadStream getStream() {
- final DownloadStream ds = new DownloadStream(associatedClass
- .getResourceAsStream(resourceName), getMIMEType(),
- getFilename());
+ final DownloadStream ds = new DownloadStream(
+ associatedClass.getResourceAsStream(resourceName),
+ getMIMEType(), getFilename());
ds.setBufferSize(getBufferSize());
ds.setCacheTime(cacheTime);
return ds;
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
index 7bf0a4c5ea..1ddbd9bdd0 100755
--- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
+++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
@@ -36,8 +36,8 @@ import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.ui.Field;
import com.vaadin.terminal.gwt.client.ui.VContextMenu;
import com.vaadin.terminal.gwt.client.ui.VNotification;
-import com.vaadin.terminal.gwt.client.ui.VView;
import com.vaadin.terminal.gwt.client.ui.VNotification.HideEvent;
+import com.vaadin.terminal.gwt.client.ui.VView;
import com.vaadin.terminal.gwt.client.ui.dd.VDragAndDropManager;
import com.vaadin.terminal.gwt.server.AbstractCommunicationManager;
@@ -481,16 +481,14 @@ public class ApplicationConnection {
handleWhenCSSLoaded(response);
}
}).schedule(50);
- console
- .log("Assuming CSS loading is not complete, "
- + "postponing render phase. "
- + "(.v-loading-indicator height == 0)");
+ console.log("Assuming CSS loading is not complete, "
+ + "postponing render phase. "
+ + "(.v-loading-indicator height == 0)");
cssWaits++;
} else {
handleReceivedJSONMessage(response);
if (cssWaits >= MAX_CSS_WAITS) {
- console
- .error("CSS files may have not loaded properly.");
+ console.error("CSS files may have not loaded properly.");
}
}
}
@@ -522,8 +520,8 @@ public class ApplicationConnection {
private void showCommunicationError(String details) {
console.error("Communication error: " + details);
showError(details, configuration.getCommunicationErrorCaption(),
- configuration.getCommunicationErrorMessage(), configuration
- .getCommunicationErrorUrl());
+ configuration.getCommunicationErrorMessage(),
+ configuration.getCommunicationErrorUrl());
}
/**
@@ -535,8 +533,8 @@ public class ApplicationConnection {
private void showAuthenticationError(String details) {
console.error("Authentication error: " + details);
showError(details, configuration.getAuthorizationErrorCaption(),
- configuration.getAuthorizationErrorMessage(), configuration
- .getAuthorizationErrorUrl());
+ configuration.getAuthorizationErrorMessage(),
+ configuration.getAuthorizationErrorUrl());
}
/**
@@ -925,8 +923,8 @@ public class ApplicationConnection {
.get(getPid(paintable));
Widget widget = (Widget) paintable;
Size oldSize = detail.getOffsetSize();
- Size newSize = new Size(widget.getOffsetWidth(), widget
- .getOffsetHeight());
+ Size newSize = new Size(widget.getOffsetWidth(),
+ widget.getOffsetHeight());
if (oldSize == null || !oldSize.equals(newSize)) {
sizeUpdatedWidgets.add(paintable);
@@ -1864,8 +1862,8 @@ public class ApplicationConnection {
// Parent-less components (like sub-windows) are relative to browser
// window.
if (parent == null) {
- renderSpace = new RenderSpace(Window.getClientWidth(), Window
- .getClientHeight());
+ renderSpace = new RenderSpace(Window.getClientWidth(),
+ Window.getClientHeight());
} else {
renderSpace = parent.getAllocatedSpace(widget);
}
@@ -1902,22 +1900,20 @@ public class ApplicationConnection {
if (debugSizes) {
getConsole()
- .log(
- "Widget "
- + Util.getSimpleName(widget)
- + "/"
- + getPid(widget.getElement())
- + " relative height "
- + relativeSize.getHeight()
- + "% of "
- + renderSpace.getHeight()
- + "px (reported by "
-
- + Util.getSimpleName(parent)
- + "/"
- + (parent == null ? "?" : parent
- .hashCode()) + ") : "
- + height + "px");
+ .log("Widget "
+ + Util.getSimpleName(widget)
+ + "/"
+ + getPid(widget.getElement())
+ + " relative height "
+ + relativeSize.getHeight()
+ + "% of "
+ + renderSpace.getHeight()
+ + "px (reported by "
+
+ + Util.getSimpleName(parent)
+ + "/"
+ + (parent == null ? "?" : parent.hashCode())
+ + ") : " + height + "px");
}
widget.setHeight(height + "px");
} else {
@@ -2085,9 +2081,8 @@ public class ApplicationConnection {
if (uidlUri.startsWith("theme://")) {
final String themeUri = configuration.getThemeUri();
if (themeUri == null) {
- console
- .error("Theme not set: ThemeResource will not be found. ("
- + uidlUri + ")");
+ console.error("Theme not set: ThemeResource will not be found. ("
+ + uidlUri + ")");
}
uidlUri = themeUri + uidlUri.substring(7);
}
diff --git a/src/com/vaadin/terminal/gwt/client/ClientExceptionHandler.java b/src/com/vaadin/terminal/gwt/client/ClientExceptionHandler.java
index 955deb4d8f..0f97e47d13 100644
--- a/src/com/vaadin/terminal/gwt/client/ClientExceptionHandler.java
+++ b/src/com/vaadin/terminal/gwt/client/ClientExceptionHandler.java
@@ -16,8 +16,8 @@ public class ClientExceptionHandler {
if (console != null) {
console.error(msg);
- // } else {
- // System.err.println(msg);
+ // } else {
+ // System.err.println(msg);
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java
index e25dabbbe4..0c11064707 100644
--- a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java
+++ b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java
@@ -59,12 +59,12 @@ public class ComponentLocator {
* The {@link #getElementByPath(String)} method can be used for the inverse
* operation, i.e. locating an element based on the return value from this
* method.
- *<p>
+ * <p>
* Note that getElementByPath(getPathForElement(element)) == element is not
* always true as {@link #getPathForElement(Element)} can return a path to
* another element if the widget determines an action on the other element
* will give the same result as the action on the target element.
- *</p>
+ * </p>
*
* @since 5.4
* @param targetElement
@@ -153,8 +153,8 @@ public class ComponentLocator {
*
* @param targetElement
* @param ancestorWidget
- * @return The widget whose root element is a parent of {@code
- * targetElement}.
+ * @return The widget whose root element is a parent of
+ * {@code targetElement}.
*/
private Widget findParentWidget(Element targetElement, Widget ancestorWidget) {
/*
diff --git a/src/com/vaadin/terminal/gwt/client/DateTimeService.java b/src/com/vaadin/terminal/gwt/client/DateTimeService.java
index e7b93475bc..f572411a83 100644
--- a/src/com/vaadin/terminal/gwt/client/DateTimeService.java
+++ b/src/com/vaadin/terminal/gwt/client/DateTimeService.java
@@ -129,8 +129,8 @@ public class DateTimeService {
}
public int getStartWeekDay(Date date) {
- final Date dateForFirstOfThisMonth = new Date(date.getYear(), date
- .getMonth(), 1);
+ final Date dateForFirstOfThisMonth = new Date(date.getYear(),
+ date.getMonth(), 1);
int firstDay;
try {
firstDay = LocaleService.getFirstDayOfWeek(currentLocale);
@@ -153,7 +153,7 @@ public class DateTimeService {
if (date == null) {
return 0;
}
-
+
return (int) (date.getTime() - date.getTime() / 1000 * 1000);
}
diff --git a/src/com/vaadin/terminal/gwt/client/RenderInformation.java b/src/com/vaadin/terminal/gwt/client/RenderInformation.java
index f9195c8bf8..a1dd1f32ad 100644
--- a/src/com/vaadin/terminal/gwt/client/RenderInformation.java
+++ b/src/com/vaadin/terminal/gwt/client/RenderInformation.java
@@ -41,8 +41,8 @@ public class RenderInformation {
* @return true if the size has changed since last update
*/
public boolean updateSize(Element element) {
- Size newSize = new Size(element.getOffsetWidth(), element
- .getOffsetHeight());
+ Size newSize = new Size(element.getOffsetWidth(),
+ element.getOffsetHeight());
if (newSize.equals(renderedSize)) {
return false;
} else {
diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java
index 13cb3b0955..19ba535bef 100644
--- a/src/com/vaadin/terminal/gwt/client/Util.java
+++ b/src/com/vaadin/terminal/gwt/client/Util.java
@@ -406,8 +406,8 @@ public class Util {
setHeight(widget, "");
return paddingBorderGuess;
} else if (height.endsWith("px")) {
- int pixelHeight = Integer.parseInt(height.substring(0, height
- .length() - 2));
+ int pixelHeight = Integer.parseInt(height.substring(0,
+ height.length() - 2));
return setHeightExcludingPaddingAndBorder(widget.getElement(),
pixelHeight, paddingBorderGuess, false);
} else {
diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java
index af0cdecfea..25c1d34ea4 100644
--- a/src/com/vaadin/terminal/gwt/client/VCaption.java
+++ b/src/com/vaadin/terminal/gwt/client/VCaption.java
@@ -277,8 +277,7 @@ public class VCaption extends HTML {
} else {
ApplicationConnection
.getConsole()
- .log(
- "Warning: Icon load event was not propagated because VCaption owner is unknown.");
+ .log("Warning: Icon load event was not propagated because VCaption owner is unknown.");
}
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
index 427cd097b1..4ded0f69a2 100755
--- a/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
+++ b/src/com/vaadin/terminal/gwt/client/VDebugConsole.java
@@ -289,8 +289,8 @@ public final class VDebugConsole extends VOverlay implements Console {
private void minimize() {
setPixelSize(400, 150);
- setPopupPosition(Window.getClientWidth() - 410, Window
- .getClientHeight() - 160);
+ setPopupPosition(Window.getClientWidth() - 410,
+ Window.getClientHeight() - 160);
}
@Override
@@ -500,8 +500,8 @@ public final class VDebugConsole extends VOverlay implements Console {
public void onClick(ClickEvent event) {
if (paintable != null) {
Element element2 = ((Widget) paintable).getElement();
- Widget.setStyleName(element2, "invalidlayout", emphasisInUi
- .getValue());
+ Widget.setStyleName(element2, "invalidlayout",
+ emphasisInUi.getValue());
}
}
});
diff --git a/src/com/vaadin/terminal/gwt/client/VErrorMessage.java b/src/com/vaadin/terminal/gwt/client/VErrorMessage.java
index ba5d5a9d24..d7ab581092 100644
--- a/src/com/vaadin/terminal/gwt/client/VErrorMessage.java
+++ b/src/com/vaadin/terminal/gwt/client/VErrorMessage.java
@@ -58,9 +58,11 @@ public class VErrorMessage extends FlowPanel {
errorContainer = new VOverlay();
errorContainer.setWidget(this);
}
- errorContainer.setPopupPosition(DOM.getAbsoluteLeft(indicatorElement)
- + 2
- * DOM.getElementPropertyInt(indicatorElement, "offsetHeight"),
+ errorContainer.setPopupPosition(
+ DOM.getAbsoluteLeft(indicatorElement)
+ + 2
+ * DOM.getElementPropertyInt(indicatorElement,
+ "offsetHeight"),
DOM.getAbsoluteTop(indicatorElement)
+ 2
* DOM.getElementPropertyInt(indicatorElement,
diff --git a/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java b/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java
index 1c6c11ec95..cbc3467d09 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/ClickEventHandler.java
@@ -40,12 +40,12 @@ public abstract class ClickEventHandler implements DoubleClickHandler,
public void handleEventHandlerRegistration(ApplicationConnection client) {
this.client = client;
- // Handle registering/unregistering of click handler depending on if
- // server side listeners have been added or removed.
+ // Handle registering/unregistering of click handler depending on if
+ // server side listeners have been added or removed.
if (hasEventListener()) {
if (mouseUpHandlerRegistration == null) {
- mouseUpHandlerRegistration = registerHandler(this, MouseUpEvent
- .getType());
+ mouseUpHandlerRegistration = registerHandler(this,
+ MouseUpEvent.getType());
contextMenuHandlerRegistration = registerHandler(this,
ContextMenuEvent.getType());
doubleClickHandlerRegistration = registerHandler(this,
@@ -53,7 +53,7 @@ public abstract class ClickEventHandler implements DoubleClickHandler,
}
} else {
if (mouseUpHandlerRegistration != null) {
- // Remove existing handlers
+ // Remove existing handlers
doubleClickHandlerRegistration.removeHandler();
mouseUpHandlerRegistration.removeHandler();
contextMenuHandlerRegistration.removeHandler();
@@ -94,19 +94,19 @@ public abstract class ClickEventHandler implements DoubleClickHandler,
public void onContextMenu(ContextMenuEvent event) {
if (hasEventListener()) {
- // Prevent showing the browser's context menu when there is a right
- // click listener.
+ // Prevent showing the browser's context menu when there is a right
+ // click listener.
event.preventDefault();
}
}
public void onMouseUp(MouseUpEvent event) {
- // TODO For perfect accuracy we should check that a mousedown has
- // occured on this element before this mouseup and that no mouseup
- // has occured anywhere after that.
+ // TODO For perfect accuracy we should check that a mousedown has
+ // occured on this element before this mouseup and that no mouseup
+ // has occured anywhere after that.
if (hasEventListener()) {
- // "Click" with left, right or middle button
+ // "Click" with left, right or middle button
fireClick(event.getNativeEvent());
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/MenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/MenuBar.java
index 5d10044d64..d20f617bc1 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/MenuBar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/MenuBar.java
@@ -411,12 +411,12 @@ public class MenuBar extends Widget implements PopupListener {
popup.addPopupListener(this);
if (vertical) {
- popup.setPopupPosition(item.getAbsoluteLeft()
- + item.getOffsetWidth(), item.getAbsoluteTop());
+ popup.setPopupPosition(
+ item.getAbsoluteLeft() + item.getOffsetWidth(),
+ item.getAbsoluteTop());
} else {
- popup.setPopupPosition(item.getAbsoluteLeft(), item
- .getAbsoluteTop()
- + item.getOffsetHeight());
+ popup.setPopupPosition(item.getAbsoluteLeft(),
+ item.getAbsoluteTop() + item.getOffsetHeight());
}
shownChildMenu = item.getSubMenu();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java b/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java
index 8caf64ea79..0817d3d6e0 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java
@@ -103,8 +103,8 @@ public class ShortcutActionHandler {
modifiers = action.getIntArrayAttribute("mk");
}
- final ShortcutKeyCombination kc = new ShortcutKeyCombination(action
- .getIntAttribute("kc"), modifiers);
+ final ShortcutKeyCombination kc = new ShortcutKeyCombination(
+ action.getIntAttribute("kc"), modifiers);
final String key = action.getStringAttribute("key");
final String caption = action.getStringAttribute("caption");
actions.add(new ShortcutAction(key, kc, caption));
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java
index cd227b2e03..0b5356a17e 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAbsoluteLayout.java
@@ -7,8 +7,8 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
-import java.util.Set;
import java.util.Map.Entry;
+import java.util.Set;
import com.google.gwt.dom.client.DivElement;
import com.google.gwt.dom.client.Document;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java
index f12d089ab2..d6fa5f5551 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAccordion.java
@@ -238,9 +238,7 @@ public class VAccordion extends VTabsheetBase implements
if (index != activeTabIndex && !disabled && !readonly
&& !disabledTabKeys.contains(tabKeys.get(index))) {
addStyleDependentName("loading");
- client
- .updateVariable(id, "selected", "" + tabKeys.get(index),
- true);
+ client.updateVariable(id, "selected", "" + tabKeys.get(index), true);
}
}
@@ -367,9 +365,7 @@ public class VAccordion extends VTabsheetBase implements
} else {
super.setHeight((height + getCaptionHeight()) + "px");
DOM.setStyleAttribute(content, "height", height + "px");
- DOM
- .setStyleAttribute(content, "top", getCaptionHeight()
- + "px");
+ DOM.setStyleAttribute(content, "top", getCaptionHeight() + "px");
}
}
@@ -408,8 +404,8 @@ public class VAccordion extends VTabsheetBase implements
}
int captionWidth = caption.getRequiredWidth();
- int padding = Util.measureHorizontalPaddingAndBorder(caption
- .getElement(), 18);
+ int padding = Util.measureHorizontalPaddingAndBorder(
+ caption.getElement(), 18);
return captionWidth + padding;
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
index f971a17043..500a6ea869 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
@@ -1511,9 +1511,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
}
value.setHours(h);
if (timeChangeListener != null) {
- timeChangeListener.changed(h, value.getMinutes(), value
- .getSeconds(), DateTimeService
- .getMilliseconds(value));
+ timeChangeListener.changed(h, value.getMinutes(),
+ value.getSeconds(),
+ DateTimeService.getMilliseconds(value));
}
event.preventDefault();
event.stopPropagation();
@@ -1521,9 +1521,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
final int m = mins.getSelectedIndex();
value.setMinutes(m);
if (timeChangeListener != null) {
- timeChangeListener.changed(value.getHours(), m, value
- .getSeconds(), DateTimeService
- .getMilliseconds(value));
+ timeChangeListener.changed(value.getHours(), m,
+ value.getSeconds(),
+ DateTimeService.getMilliseconds(value));
}
event.preventDefault();
event.stopPropagation();
@@ -1531,9 +1531,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
final int s = sec.getSelectedIndex();
value.setSeconds(s);
if (timeChangeListener != null) {
- timeChangeListener.changed(value.getHours(), value
- .getMinutes(), s, DateTimeService
- .getMilliseconds(value));
+ timeChangeListener.changed(value.getHours(),
+ value.getMinutes(), s,
+ DateTimeService.getMilliseconds(value));
}
event.preventDefault();
event.stopPropagation();
@@ -1541,8 +1541,8 @@ public class VCalendarPanel extends FocusableFlexTable implements
final int ms = msec.getSelectedIndex();
DateTimeService.setMilliseconds(value, ms);
if (timeChangeListener != null) {
- timeChangeListener.changed(value.getHours(), value
- .getMinutes(), value.getSeconds(), ms);
+ timeChangeListener.changed(value.getHours(),
+ value.getMinutes(), value.getSeconds(), ms);
}
event.preventDefault();
event.stopPropagation();
@@ -1551,9 +1551,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
+ (ampm.getSelectedIndex() * 12);
value.setHours(h);
if (timeChangeListener != null) {
- timeChangeListener.changed(h, value.getMinutes(), value
- .getSeconds(), DateTimeService
- .getMilliseconds(value));
+ timeChangeListener.changed(h, value.getMinutes(),
+ value.getSeconds(),
+ DateTimeService.getMilliseconds(value));
}
event.preventDefault();
event.stopPropagation();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
index 5307234869..d5d8d3627d 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java
@@ -99,8 +99,8 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
}
clickEventHandler.handleEventHandlerRegistration(client);
- final VMarginInfo margins = new VMarginInfo(uidl
- .getIntAttribute("margins"));
+ final VMarginInfo margins = new VMarginInfo(
+ uidl.getIntAttribute("margins"));
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_TOP,
margins.hasTop());
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_RIGHT,
@@ -110,8 +110,8 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_LEFT,
margins.hasLeft());
- setStyleName(margin, CLASSNAME + "-" + "spacing", uidl
- .hasAttribute("spacing"));
+ setStyleName(margin, CLASSNAME + "-" + "spacing",
+ uidl.hasAttribute("spacing"));
panel.updateFromUIDL(uidl, client);
rendering = false;
}
@@ -184,8 +184,8 @@ public class VCssLayout extends SimplePanel implements Paintable, Container {
continue;
} else {
style.setProperty(
- makeCamelCase(rule[0].trim()), rule[1]
- .trim());
+ makeCamelCase(rule[0].trim()),
+ rule[1].trim());
}
}
} catch (Exception e) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java
index 7cfe627492..e67c9e6a44 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCustomLayout.java
@@ -21,12 +21,12 @@ import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Container;
import com.vaadin.terminal.gwt.client.ContainerResizedListener;
import com.vaadin.terminal.gwt.client.Paintable;
+import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
import com.vaadin.terminal.gwt.client.RenderSpace;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.VCaption;
import com.vaadin.terminal.gwt.client.VCaptionWrapper;
-import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
/**
* Custom Layout implements complex layout defined with HTML template.
@@ -530,9 +530,9 @@ public class VCustomLayout extends ComplexPanel implements Paintable,
.getParentElement();
FloatSize extra = locationToExtraSize.get(getLocation(child));
- return new RenderSpace(pe.getOffsetWidth() - (int) extra.getWidth(), pe
- .getOffsetHeight()
- - (int) extra.getHeight(), Util.mayHaveScrollBars(pe));
+ return new RenderSpace(pe.getOffsetWidth() - (int) extra.getWidth(),
+ pe.getOffsetHeight() - (int) extra.getHeight(),
+ Util.mayHaveScrollBars(pe));
}
@Override
@@ -604,8 +604,8 @@ public class VCustomLayout extends ComplexPanel implements Paintable,
|| (relativeHeight && (relativeSize.getHeight() >= 0.0f))) {
relativeSizeWidgets.add(widget);
- widget.getElement().getStyle().setProperty("position",
- "absolute");
+ widget.getElement().getStyle()
+ .setProperty("position", "absolute");
}
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java
index ce7cba03e8..ffbe25e9a7 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java
@@ -20,9 +20,9 @@ import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.MouseEventDetails;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.RenderInformation;
+import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
-import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.ui.dd.DDUtil;
import com.vaadin.terminal.gwt.client.ui.dd.HorizontalDropLocation;
import com.vaadin.terminal.gwt.client.ui.dd.VAbstractDropHandler;
@@ -33,9 +33,9 @@ import com.vaadin.terminal.gwt.client.ui.dd.VDropHandler;
import com.vaadin.terminal.gwt.client.ui.dd.VHasDropHandler;
import com.vaadin.terminal.gwt.client.ui.dd.VHtml5DragEvent;
import com.vaadin.terminal.gwt.client.ui.dd.VHtml5File;
+import com.vaadin.terminal.gwt.client.ui.dd.VHtml5File.Callback;
import com.vaadin.terminal.gwt.client.ui.dd.VTransferable;
import com.vaadin.terminal.gwt.client.ui.dd.VerticalDropLocation;
-import com.vaadin.terminal.gwt.client.ui.dd.VHtml5File.Callback;
/**
*
@@ -77,8 +77,8 @@ public class VDragAndDropWrapper extends VCustomComponent implements
if (dragStarMode == WRAPPER) {
startDrag.createDragImage(getElement(), true);
} else {
- startDrag.createDragImage(((Widget) paintable)
- .getElement(), true);
+ startDrag.createDragImage(
+ ((Widget) paintable).getElement(), true);
}
event.preventDefault(); // prevent text selection
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java
index 49b3123bbf..0735f0049f 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VEmbedded.java
@@ -121,8 +121,8 @@ public class VEmbedded extends HTML implements Paintable {
+ uidl.getId() + "\"></iframe>");
browserElement = DOM.getFirstChild(getElement());
} else {
- DOM.setElementAttribute(browserElement, "src", getSrc(uidl,
- client));
+ DOM.setElementAttribute(browserElement, "src",
+ getSrc(uidl, client));
}
clearBrowserElement = false;
} else {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VForm.java b/src/com/vaadin/terminal/gwt/client/ui/VForm.java
index 090063f007..9872dd0c1b 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VForm.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VForm.java
@@ -180,8 +180,8 @@ public class VForm extends ComplexPanel implements Container, KeyDownHandler {
if (childUidl != null) {
if (shortcutHandler == null) {
shortcutHandler = new ShortcutActionHandler(id, client);
- keyDownRegistration = addDomHandler(this, KeyDownEvent
- .getType());
+ keyDownRegistration = addDomHandler(this,
+ KeyDownEvent.getType());
}
shortcutHandler.updateActionMap(childUidl);
}
@@ -199,14 +199,12 @@ public class VForm extends ComplexPanel implements Container, KeyDownHandler {
renderInformation.updateSize(getElement());
renderInformation.setContentAreaHeight(renderInformation
- .getRenderedSize().getHeight()
- - getSpaceConsumedVertically());
+ .getRenderedSize().getHeight() - getSpaceConsumedVertically());
if (BrowserInfo.get().isIE6()) {
getElement().getStyle().setProperty("overflow", "hidden");
}
renderInformation.setContentAreaWidth(renderInformation
- .getRenderedSize().getWidth()
- - borderPaddingHorizontal);
+ .getRenderedSize().getWidth() - borderPaddingHorizontal);
}
public RenderSpace getAllocatedSpace(Widget child) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
index 43a09a7dee..798fb01edf 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
@@ -89,8 +89,8 @@ public class VFormLayout extends SimplePanel implements Container {
}
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
- final VMarginInfo margins = new VMarginInfo(uidl
- .getIntAttribute("margins"));
+ final VMarginInfo margins = new VMarginInfo(
+ uidl.getIntAttribute("margins"));
Element margin = getElement();
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_TOP,
@@ -98,13 +98,13 @@ public class VFormLayout extends SimplePanel implements Container {
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_RIGHT,
margins.hasRight());
setStyleName(margin,
- CLASSNAME + "-" + StyleConstants.MARGIN_BOTTOM, margins
- .hasBottom());
+ CLASSNAME + "-" + StyleConstants.MARGIN_BOTTOM,
+ margins.hasBottom());
setStyleName(margin, CLASSNAME + "-" + StyleConstants.MARGIN_LEFT,
margins.hasLeft());
- setStyleName(margin, CLASSNAME + "-" + "spacing", uidl
- .hasAttribute("spacing"));
+ setStyleName(margin, CLASSNAME + "-" + "spacing",
+ uidl.hasAttribute("spacing"));
int i = 0;
for (final Iterator it = uidl.getChildIterator(); it.hasNext(); i++) {
@@ -336,8 +336,8 @@ public class VFormLayout extends SimplePanel implements Container {
public void updateCaption(UIDL uidl) {
setVisible(!uidl.getBooleanAttribute("invisible"));
- setStyleName(getElement(), "v-disabled", uidl
- .hasAttribute("disabled"));
+ setStyleName(getElement(), "v-disabled",
+ uidl.hasAttribute("disabled"));
boolean isEmpty = true;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
index 17233728e5..9927e000e6 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
@@ -285,8 +285,8 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
Cell c = column[j];
if (c != null && c.cc != null
&& c.widthCanAffectHeight()) {
- c.cc.setContainerSize(c.getAvailableWidth(), c
- .getAvailableHeight());
+ c.cc.setContainerSize(c.getAvailableWidth(),
+ c.getAvailableHeight());
client.handleComponentRelativeSize(c.cc
.getWidget());
c.cc.updateWidgetSize();
@@ -621,8 +621,8 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
}
private void handleMargins(UIDL uidl) {
- final VMarginInfo margins = new VMarginInfo(uidl
- .getIntAttribute("margins"));
+ final VMarginInfo margins = new VMarginInfo(
+ uidl.getIntAttribute("margins"));
String styles = CLASSNAME + "-margin";
if (margins.hasTop()) {
@@ -657,8 +657,8 @@ public class VGridLayout extends SimplePanel implements Paintable, Container {
componentContainer.setWidget(newComponent);
widgetToComponentContainer.put(newComponent, componentContainer);
- paintableToCell.put((Paintable) newComponent, paintableToCell
- .get(oldComponent));
+ paintableToCell.put((Paintable) newComponent,
+ paintableToCell.get(oldComponent));
}
public void updateCaption(Paintable component, UIDL uidl) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java
index 480685345f..a6fc0107c3 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VListSelect.java
@@ -48,8 +48,8 @@ public class VListSelect extends VOptionGroupBase {
}
for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
final UIDL optionUidl = (UIDL) i.next();
- select.addItem(optionUidl.getStringAttribute("caption"), optionUidl
- .getStringAttribute("key"));
+ select.addItem(optionUidl.getStringAttribute("caption"),
+ optionUidl.getStringAttribute("key"));
if (optionUidl.hasAttribute("selected")) {
select.setItemSelected(select.getItemCount() - 1, true);
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
index ab32d93f17..6899a2ca9f 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
@@ -226,12 +226,10 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
itemHTML.append("<span class=\"" + CLASSNAME
+ "-menuitem-caption\">");
if (item.hasAttribute("icon")) {
- itemHTML
- .append("<img src=\""
- + client.translateVaadinUri(item
- .getStringAttribute("icon"))
- + "\" class=\"" + Icon.CLASSNAME
- + "\" alt=\"\" />");
+ itemHTML.append("<img src=\""
+ + client.translateVaadinUri(item
+ .getStringAttribute("icon"))
+ + "\" class=\"" + Icon.CLASSNAME + "\" alt=\"\" />");
}
itemHTML.append(Util.escapeHTML(itemText) + "</span>");
@@ -381,8 +379,8 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
if (items.contains(item)) {
int index = items.indexOf(item);
- DOM.removeChild(getContainerElement(), DOM.getChild(
- getContainerElement(), index));
+ DOM.removeChild(getContainerElement(),
+ DOM.getChild(getContainerElement(), index));
items.remove(index);
}
}
@@ -551,8 +549,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
popup.show();
if (left + popup.getOffsetWidth() >= RootPanel.getBodyElement()
- .getOffsetWidth()
- - shadowSpace) {
+ .getOffsetWidth() - shadowSpace) {
if (subMenu) {
left = item.getParentMenu().getAbsoluteLeft()
- popup.getOffsetWidth() - shadowSpace;
@@ -580,8 +577,8 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
}
if (popup.getElement().getStyle().getProperty("width") == null
- || popup.getElement().getStyle().getProperty(
- "width") == "") {
+ || popup.getElement().getStyle()
+ .getProperty("width") == "") {
popup.setWidth(popup.getOffsetWidth() + "px");
}
popup.getElement().getStyle().setProperty("zoom", "1");
@@ -920,9 +917,9 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
* .gwt.event.dom.client.KeyPressEvent)
*/
public void onKeyPress(KeyPressEvent event) {
- if (handleNavigation(event.getNativeEvent().getKeyCode(), event
- .isControlKeyDown()
- || event.isMetaKeyDown(), event.isShiftKeyDown())) {
+ if (handleNavigation(event.getNativeEvent().getKeyCode(),
+ event.isControlKeyDown() || event.isMetaKeyDown(),
+ event.isShiftKeyDown())) {
event.preventDefault();
}
}
@@ -935,9 +932,9 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
* .event.dom.client.KeyDownEvent)
*/
public void onKeyDown(KeyDownEvent event) {
- if (handleNavigation(event.getNativeEvent().getKeyCode(), event
- .isControlKeyDown()
- || event.isMetaKeyDown(), event.isShiftKeyDown())) {
+ if (handleNavigation(event.getNativeEvent().getKeyCode(),
+ event.isControlKeyDown() || event.isMetaKeyDown(),
+ event.isShiftKeyDown())) {
event.preventDefault();
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java
index 8c00e9c1a7..a1c4e0ba01 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VNativeSelect.java
@@ -40,8 +40,8 @@ public class VNativeSelect extends VOptionGroupBase implements Field {
boolean selected = false;
for (final Iterator i = uidl.getChildIterator(); i.hasNext();) {
final UIDL optionUidl = (UIDL) i.next();
- select.addItem(optionUidl.getStringAttribute("caption"), optionUidl
- .getStringAttribute("key"));
+ select.addItem(optionUidl.getStringAttribute("caption"),
+ optionUidl.getStringAttribute("key"));
if (optionUidl.hasAttribute("selected")) {
select.setItemSelected(select.getItemCount() - 1, true);
selected = true;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOptionGroupBase.java b/src/com/vaadin/terminal/gwt/client/ui/VOptionGroupBase.java
index 115c415289..1f3789239d 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VOptionGroupBase.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VOptionGroupBase.java
@@ -197,9 +197,7 @@ abstract class VOptionGroupBase extends Composite implements Paintable, Field,
public void onChange(ChangeEvent event) {
if (multiselect) {
- client
- .updateVariable(id, "selected", getSelectedItems(),
- immediate);
+ client.updateVariable(id, "selected", getSelectedItems(), immediate);
} else {
client.updateVariable(id, "selected", new String[] { ""
+ getSelectedItem() }, immediate);
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java
index 9df038f93c..2ceeb3366b 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VOrderedLayout.java
@@ -16,12 +16,12 @@ import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Paintable;
+import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
+import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.RenderSpace;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ValueMap;
-import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
-import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.ui.layout.CellBasedLayout;
import com.vaadin.terminal.gwt.client.ui.layout.ChildComponentContainer;
@@ -33,7 +33,7 @@ public class VOrderedLayout extends CellBasedLayout {
private int orientation;
- // Can be removed once OrderedLayout is removed
+ // Can be removed once OrderedLayout is removed
private boolean allowOrientationUpdate = false;
/**
@@ -91,7 +91,7 @@ public class VOrderedLayout extends CellBasedLayout {
isRendering = true;
super.updateFromUIDL(uidl, client);
- // Only non-cached, visible UIDL:s can introduce changes
+ // Only non-cached, visible UIDL:s can introduce changes
if (uidl.getBooleanAttribute("cached")
|| uidl.getBooleanAttribute("invisible")) {
isRendering = false;
@@ -104,10 +104,10 @@ public class VOrderedLayout extends CellBasedLayout {
handleOrientationUpdate(uidl);
}
- // IStopWatch w = new IStopWatch("OrderedLayout.updateFromUIDL");
+ // IStopWatch w = new IStopWatch("OrderedLayout.updateFromUIDL");
- ArrayList<Widget> uidlWidgets = new ArrayList<Widget>(uidl
- .getChildCount());
+ ArrayList<Widget> uidlWidgets = new ArrayList<Widget>(
+ uidl.getChildCount());
ArrayList<ChildComponentContainer> relativeSizeComponents = new ArrayList<ChildComponentContainer>();
ArrayList<UIDL> relativeSizeComponentUIDL = new ArrayList<UIDL>();
@@ -117,11 +117,11 @@ public class VOrderedLayout extends CellBasedLayout {
final Paintable child = client.getPaintable(childUIDL);
Widget widget = (Widget) child;
- // Create container for component
+ // Create container for component
ChildComponentContainer childComponentContainer = getComponentContainer(widget);
if (childComponentContainer == null) {
- // This is a new component
+ // This is a new component
childComponentContainer = createChildContainer(widget);
}
@@ -148,8 +148,8 @@ public class VOrderedLayout extends CellBasedLayout {
activeLayoutSize.getWidth());
}
if (sizeHasChangedDuringRendering && Util.isCached(childUIDL)) {
- // notify cached relative sized component about size
- // chance
+ // notify cached relative sized component about size
+ // chance
client.handleComponentRelativeSize(childComponentContainer
.getWidget());
}
@@ -159,9 +159,9 @@ public class VOrderedLayout extends CellBasedLayout {
}
- // w.mark("Rendering of "
- // + (uidlWidgets.size() - relativeSizeComponents.size())
- // + " absolute size components done");
+ // w.mark("Rendering of "
+ // + (uidlWidgets.size() - relativeSizeComponents.size())
+ // + " absolute size components done");
/*
* Remove any children after pos. These are the ones that previously
@@ -169,20 +169,20 @@ public class VOrderedLayout extends CellBasedLayout {
*/
removeChildrenAfter(pos);
- // w.mark("Old children removed");
+ // w.mark("Old children removed");
/* Fetch alignments and expand ratio from UIDL */
updateAlignmentsAndExpandRatios(uidl, uidlWidgets);
- // w.mark("Alignments and expand ratios updated");
+ // w.mark("Alignments and expand ratios updated");
/* Fetch widget sizes from rendered components */
updateWidgetSizes();
- // w.mark("Widget sizes updated");
+ // w.mark("Widget sizes updated");
recalculateLayout();
- // w.mark("Layout size calculated (" + activeLayoutSize +
- // ") offsetSize: "
- // + getOffsetWidth() + "," + getOffsetHeight());
+ // w.mark("Layout size calculated (" + activeLayoutSize +
+ // ") offsetSize: "
+ // + getOffsetWidth() + "," + getOffsetHeight());
/* Render relative size components */
for (int i = 0; i < relativeSizeComponents.size(); i++) {
@@ -207,11 +207,11 @@ public class VOrderedLayout extends CellBasedLayout {
.getWidget());
}
- // childComponentContainer.updateWidgetSize();
+ // childComponentContainer.updateWidgetSize();
}
- // w.mark("Rendering of " + (relativeSizeComponents.size())
- // + " relative size components done");
+ // w.mark("Rendering of " + (relativeSizeComponents.size())
+ // + " relative size components done");
/* Fetch widget sizes for relative size components */
for (ChildComponentContainer childComponentContainer : widgetToComponentContainer
@@ -221,7 +221,7 @@ public class VOrderedLayout extends CellBasedLayout {
childComponentContainer.updateWidgetSize();
}
- // w.mark("Widget sizes updated");
+ // w.mark("Widget sizes updated");
/*
* Components with relative size in main direction may affect the layout
@@ -231,7 +231,7 @@ public class VOrderedLayout extends CellBasedLayout {
|| (isVertical() && isDynamicWidth())) {
layoutSizeMightHaveChanged();
}
- // w.mark("Layout dimensions updated");
+ // w.mark("Layout dimensions updated");
/* Update component spacing */
updateContainerMargins();
@@ -241,13 +241,13 @@ public class VOrderedLayout extends CellBasedLayout {
* direction
*/
if (updateRelativeSizesInNonMainDirection()) {
- // Sizes updated - might affect the other dimension so we need to
- // recheck the widget sizes and recalculate layout dimensions
+ // Sizes updated - might affect the other dimension so we need to
+ // recheck the widget sizes and recalculate layout dimensions
updateWidgetSizes();
layoutSizeMightHaveChanged();
}
calculateAlignments();
- // w.mark("recalculateComponentSizesAndAlignments done");
+ // w.mark("recalculateComponentSizesAndAlignments done");
setRootSize();
@@ -260,14 +260,14 @@ public class VOrderedLayout extends CellBasedLayout {
root.getStyle().setProperty("zoom", "1");
}
- // w.mark("runDescendentsLayout done");
+ // w.mark("runDescendentsLayout done");
isRendering = false;
sizeHasChangedDuringRendering = false;
}
private void layoutSizeMightHaveChanged() {
- Size oldSize = new Size(activeLayoutSize.getWidth(), activeLayoutSize
- .getHeight());
+ Size oldSize = new Size(activeLayoutSize.getWidth(),
+ activeLayoutSize.getHeight());
calculateLayoutDimensions();
/*
@@ -314,11 +314,11 @@ public class VOrderedLayout extends CellBasedLayout {
if (remaining > 0) {
- // Some left-over pixels due to rounding errors
+ // Some left-over pixels due to rounding errors
- // Add one pixel to each container until there are no pixels left
- // FIXME extra pixels should be divided among expanded widgets if
- // such a widgets exists
+ // Add one pixel to each container until there are no pixels left
+ // FIXME extra pixels should be divided among expanded widgets if
+ // such a widgets exists
Iterator<Widget> widgetIterator = iterator();
while (widgetIterator.hasNext() && remaining-- > 0) {
@@ -381,7 +381,7 @@ public class VOrderedLayout extends CellBasedLayout {
int maxWidgetWidth = 0;
int maxWidgetHeight = 0;
- // Calculate layout dimensions from component dimensions
+ // Calculate layout dimensions from component dimensions
for (ChildComponentContainer childComponentContainer : widgetToComponentContainer
.values()) {
@@ -426,8 +426,8 @@ public class VOrderedLayout extends CellBasedLayout {
remainingSpace = 0;
}
- // ApplicationConnection.getConsole().log(
- // "Layout size: " + activeLayoutSize);
+ // ApplicationConnection.getConsole().log(
+ // "Layout size: " + activeLayoutSize);
return remainingSpace;
}
@@ -463,14 +463,14 @@ public class VOrderedLayout extends CellBasedLayout {
int h = 0;
if (isHorizontal()) {
- // HORIZONTAL
+ // HORIZONTAL
h = activeLayoutSize.getHeight();
if (!isDynamicWidth()) {
w = -1;
}
} else {
- // VERTICAL
+ // VERTICAL
w = activeLayoutSize.getWidth();
if (!isDynamicHeight()) {
h = -1;
@@ -519,9 +519,9 @@ public class VOrderedLayout extends CellBasedLayout {
.widgetHasSizeSpecified(orientation)) {
int captionWidth = childComponentContainer
.getCaptionRequiredWidth();
- // ApplicationConnection.getConsole().log(
- // "Component width: " + width
- // + ", caption width: " + captionWidth);
+ // ApplicationConnection.getConsole().log(
+ // "Component width: " + width
+ // + ", caption width: " + captionWidth);
if (captionWidth > width) {
width = captionWidth;
}
@@ -536,8 +536,8 @@ public class VOrderedLayout extends CellBasedLayout {
* Let the overflowing components overflow. IE has
* problems with zero sizes.
*/
- // width = 0;
- // height = 0;
+ // width = 0;
+ // height = 0;
} else if (width > availableWidth) {
width = availableWidth;
@@ -596,9 +596,9 @@ public class VOrderedLayout extends CellBasedLayout {
int activeLayoutWidth = 0;
int activeLayoutHeight = 0;
- // Update layout dimensions
+ // Update layout dimensions
if (isHorizontal()) {
- // Horizontal
+ // Horizontal
if (isDynamicWidth()) {
activeLayoutWidth = totalComponentWidth;
}
@@ -608,7 +608,7 @@ public class VOrderedLayout extends CellBasedLayout {
}
} else {
- // Vertical
+ // Vertical
if (isDynamicWidth()) {
activeLayoutWidth = maxComponentWidth;
}
@@ -693,7 +693,7 @@ public class VOrderedLayout extends CellBasedLayout {
private ChildComponentContainer createChildContainer(Widget child) {
- // Create a container DIV for the child
+ // Create a container DIV for the child
ChildComponentContainer childComponent = new ChildComponentContainer(
child, orientation);
@@ -705,29 +705,29 @@ public class VOrderedLayout extends CellBasedLayout {
int width = 0;
int height = 0;
ChildComponentContainer childComponentContainer = getComponentContainer(child);
- // WIDTH CALCULATION
+ // WIDTH CALCULATION
if (isVertical()) {
width = activeLayoutSize.getWidth();
width -= childComponentContainer.getCaptionWidthAfterComponent();
} else if (!isDynamicWidth()) {
- // HORIZONTAL
+ // HORIZONTAL
width = childComponentContainer.getContSize().getWidth();
width -= childComponentContainer.getCaptionWidthAfterComponent();
}
- // HEIGHT CALCULATION
+ // HEIGHT CALCULATION
if (isHorizontal()) {
height = activeLayoutSize.getHeight();
height -= childComponentContainer.getCaptionHeightAboveComponent();
} else if (!isDynamicHeight()) {
- // VERTICAL
+ // VERTICAL
height = childComponentContainer.getContSize().getHeight();
height -= childComponentContainer.getCaptionHeightAboveComponent();
}
- // ApplicationConnection.getConsole().log(
- // "allocatedSpace for " + Util.getSimpleName(child) + ": "
- // + width + "," + height);
+ // ApplicationConnection.getConsole().log(
+ // "allocatedSpace for " + Util.getSimpleName(child) + ": "
+ // + width + "," + height);
RenderSpace space = new RenderSpace(width, height);
return space;
}
@@ -742,7 +742,7 @@ public class VOrderedLayout extends CellBasedLayout {
client.handleComponentRelativeSize(componentContainer
.getWidget());
- // Update widget size from DOM
+ // Update widget size from DOM
componentContainer.updateWidgetSize();
}
}
@@ -778,13 +778,13 @@ public class VOrderedLayout extends CellBasedLayout {
for (Paintable p : children) {
/* Update widget size from DOM */
ChildComponentContainer componentContainer = getComponentContainer((Widget) p);
- // This should no longer be needed (after #2563)
- // if (isDynamicWidth()) {
- // componentContainer.setUnlimitedContainerWidth();
- // } else {
- // componentContainer.setLimitedContainerWidth(activeLayoutSize
- // .getWidth());
- // }
+ // This should no longer be needed (after #2563)
+ // if (isDynamicWidth()) {
+ // componentContainer.setUnlimitedContainerWidth();
+ // } else {
+ // componentContainer.setLimitedContainerWidth(activeLayoutSize
+ // .getWidth());
+ // }
componentContainer.updateWidgetSize();
@@ -890,10 +890,10 @@ public class VOrderedLayout extends CellBasedLayout {
ChildComponentContainer container = getComponentContainer(widget);
- // Calculate alignment info
+ // Calculate alignment info
container.setAlignment(getAlignment(pid));
- // Update expand ratio
+ // Update expand ratio
container.setNormalizedExpandRatio(getExpandRatio(pid));
}
}
@@ -915,7 +915,7 @@ public class VOrderedLayout extends CellBasedLayout {
expandRatioSum += expandRatios.getRawNumber(keyArray.get(i));
}
if (expandRatioSum == 0) {
- // by default split equally among components
+ // by default split equally among components
defaultExpandRatio = 1.0 / widgetToComponentContainer.size();
} else {
defaultExpandRatio = 0;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java b/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java
index 43f08b6a0c..9e4e167060 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java
@@ -271,12 +271,18 @@ public class VOverlay extends PopupPanel {
// Opera fix, part 2 (ticket #2704)
if (BrowserInfo.get().isOpera()) {
// We'll fix the height of all the middle elements
- DOM.getChild(shadow, 3).getStyle().setPropertyPx("height",
- DOM.getChild(shadow, 3).getOffsetHeight());
- DOM.getChild(shadow, 4).getStyle().setPropertyPx("height",
- DOM.getChild(shadow, 4).getOffsetHeight());
- DOM.getChild(shadow, 5).getStyle().setPropertyPx("height",
- DOM.getChild(shadow, 5).getOffsetHeight());
+ DOM.getChild(shadow, 3)
+ .getStyle()
+ .setPropertyPx("height",
+ DOM.getChild(shadow, 3).getOffsetHeight());
+ DOM.getChild(shadow, 4)
+ .getStyle()
+ .setPropertyPx("height",
+ DOM.getChild(shadow, 4).getOffsetHeight());
+ DOM.getChild(shadow, 5)
+ .getStyle()
+ .setPropertyPx("height",
+ DOM.getChild(shadow, 5).getOffsetHeight());
}
// Attach to dom if not there already
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VPanel.java
index 4ec7221522..e0ade0c428 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VPanel.java
@@ -405,9 +405,7 @@ public class VPanel extends SimplePanel implements Container,
if (containerHeight < 0) {
containerHeight = 0;
}
- DOM
- .setStyleAttribute(contentNode, "height", containerHeight
- + "px");
+ DOM.setStyleAttribute(contentNode, "height", containerHeight + "px");
} else {
DOM.setStyleAttribute(contentNode, "height", "");
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
index 5482301b0c..98f16e44c7 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java
@@ -268,8 +268,8 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
popup.setWidth(w + "px");
popup.setHeight(h + "px");
- popup.setPopupPosition(l, t
- + calendarToggle.getOffsetHeight() + 2);
+ popup.setPopupPosition(l,
+ t + calendarToggle.getOffsetHeight() + 2);
Date end = new Date();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java
index 93f6b313ee..72846e85cf 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java
@@ -26,13 +26,13 @@ import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.Container;
import com.vaadin.terminal.gwt.client.Paintable;
+import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.RenderSpace;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.VCaption;
import com.vaadin.terminal.gwt.client.VCaptionWrapper;
import com.vaadin.terminal.gwt.client.VTooltip;
-import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea;
public class VPopupView extends HTML implements Container, Iterable<Widget> {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index 7224ef0c90..4dee108b32 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -485,13 +485,14 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
}
// Send the selected row ranges
- client.updateVariable(paintableId, "selectedRanges", ranges
- .toArray(new String[selectedRowRanges.size()]), false);
+ client.updateVariable(paintableId, "selectedRanges",
+ ranges.toArray(new String[selectedRowRanges.size()]), false);
}
// Send the selected rows
- client.updateVariable(paintableId, "selected", selectedRowKeys
- .toArray(new String[selectedRowKeys.size()]), immediate);
+ client.updateVariable(paintableId, "selected",
+ selectedRowKeys.toArray(new String[selectedRowKeys.size()]),
+ immediate);
}
@@ -758,8 +759,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
updateFooter(uidl.getStringArrayAttribute("vcolorder"));
if (!recalcWidths && initializedAndAttached) {
- updateBody(rowData, uidl.getIntAttribute("firstrow"), uidl
- .getIntAttribute("rows"));
+ updateBody(rowData, uidl.getIntAttribute("firstrow"),
+ uidl.getIntAttribute("rows"));
if (headerChangedDuringUpdate) {
lazyAdjustColumnWidths.schedule(1);
} else {
@@ -780,8 +781,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
}
scrollBody = createScrollBody();
- scrollBody.renderInitialRows(rowData, uidl
- .getIntAttribute("firstrow"), uidl.getIntAttribute("rows"));
+ scrollBody.renderInitialRows(rowData,
+ uidl.getIntAttribute("firstrow"),
+ uidl.getIntAttribute("rows"));
scrollBodyPanel.add(scrollBody);
initialContentReceived = true;
if (isAttached()) {
@@ -1833,8 +1835,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
.getChild(floatingCopyOfHeaderCell, 1);
DOM.setElementProperty(floatingCopyOfHeaderCell, "className",
CLASSNAME + "-header-drag");
- updateFloatingCopysPosition(DOM.getAbsoluteLeft(td), DOM
- .getAbsoluteTop(td));
+ updateFloatingCopysPosition(DOM.getAbsoluteLeft(td),
+ DOM.getAbsoluteTop(td));
DOM.appendChild(RootPanel.get().getElement(),
floatingCopyOfHeaderCell);
}
@@ -1866,8 +1868,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (client.hasEventListeners(VScrollTable.this,
HEADER_CLICK_EVENT_ID)) {
MouseEventDetails details = new MouseEventDetails(event);
- client.updateVariable(paintableId, "headerClickEvent", details
- .toString(), false);
+ client.updateVariable(paintableId, "headerClickEvent",
+ details.toString(), false);
client.updateVariable(paintableId, "headerClickCID", cid, true);
}
}
@@ -2052,8 +2054,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
// cols)
final int hw = ((Element) getElement().getLastChild())
- .getOffsetWidth()
- + scrollBody.getCellExtraWidth();
+ .getOffsetWidth() + scrollBody.getCellExtraWidth();
if (columnIndex < 0) {
columnIndex = 0;
for (Iterator<Widget> it = tHead.iterator(); it
@@ -2340,13 +2341,15 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
private void focusSlot(int index) {
removeSlotFocus();
if (index > 0) {
- DOM.setElementProperty(DOM.getFirstChild(DOM.getChild(tr,
- index - 1)), "className", CLASSNAME + "-resizer "
- + CLASSNAME + "-focus-slot-right");
+ DOM.setElementProperty(
+ DOM.getFirstChild(DOM.getChild(tr, index - 1)),
+ "className", CLASSNAME + "-resizer " + CLASSNAME
+ + "-focus-slot-right");
} else {
- DOM.setElementProperty(DOM.getFirstChild(DOM
- .getChild(tr, index)), "className", CLASSNAME
- + "-resizer " + CLASSNAME + "-focus-slot-left");
+ DOM.setElementProperty(
+ DOM.getFirstChild(DOM.getChild(tr, index)),
+ "className", CLASSNAME + "-resizer " + CLASSNAME
+ + "-focus-slot-left");
}
focusedSlot = index;
}
@@ -2356,11 +2359,13 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
return;
}
if (focusedSlot == 0) {
- DOM.setElementProperty(DOM.getFirstChild(DOM.getChild(tr,
- focusedSlot)), "className", CLASSNAME + "-resizer");
+ DOM.setElementProperty(
+ DOM.getFirstChild(DOM.getChild(tr, focusedSlot)),
+ "className", CLASSNAME + "-resizer");
} else if (focusedSlot > 0) {
- DOM.setElementProperty(DOM.getFirstChild(DOM.getChild(tr,
- focusedSlot - 1)), "className", CLASSNAME + "-resizer");
+ DOM.setElementProperty(
+ DOM.getFirstChild(DOM.getChild(tr, focusedSlot - 1)),
+ "className", CLASSNAME + "-resizer");
}
focusedSlot = -1;
}
@@ -2467,8 +2472,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
for (int i = 0; i < cols.length; i++) {
final String cid = (String) cols[i];
final HeaderCell c = getHeaderCell(cid);
- final VisibleColumnAction a = new VisibleColumnAction(c
- .getColKey());
+ final VisibleColumnAction a = new VisibleColumnAction(
+ c.getColKey());
a.setCaption(c.getCaption());
if (!c.isEnabled()) {
a.setCollapsed(true);
@@ -2740,8 +2745,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (client.hasEventListeners(VScrollTable.this,
FOOTER_CLICK_EVENT_ID)) {
MouseEventDetails details = new MouseEventDetails(event);
- client.updateVariable(paintableId, "footerClickEvent", details
- .toString(), false);
+ client.updateVariable(paintableId, "footerClickEvent",
+ details.toString(), false);
client.updateVariable(paintableId, "footerClickCID", cid, true);
}
}
@@ -2775,8 +2780,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
// cols)
final int hw = ((Element) getElement().getLastChild())
- .getOffsetWidth()
- + scrollBody.getCellExtraWidth();
+ .getOffsetWidth() + scrollBody.getCellExtraWidth();
if (columnIndex < 0) {
columnIndex = 0;
for (Iterator<Widget> it = tHead.iterator(); it
@@ -3285,8 +3289,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (row.isSelected()) {
row.addStyleName("v-selected");
}
- tBodyElement.insertBefore(row.getElement(), tBodyElement
- .getFirstChild());
+ tBodyElement.insertBefore(row.getElement(),
+ tBodyElement.getFirstChild());
adopt(row);
renderedRows.add(0, row);
}
@@ -3737,8 +3741,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
public boolean remove(Widget w) {
if (childWidgets.contains(w)) {
orphan(w);
- DOM.removeChild(DOM.getParent(w.getElement()), w
- .getElement());
+ DOM.removeChild(DOM.getParent(w.getElement()),
+ w.getElement());
childWidgets.remove(w);
return true;
} else {
@@ -3771,14 +3775,13 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
// select event, even though nullselectionallowed wont let
// the change trough. Will need to be updated if that is
// changed.
- client
- .updateVariable(
- paintableId,
- "clickEvent",
- details.toString(),
- !(event.getButton() == Event.BUTTON_LEFT
- && !doubleClick
- && selectMode > Table.SELECT_MODE_NONE && immediate));
+ client.updateVariable(
+ paintableId,
+ "clickEvent",
+ details.toString(),
+ !(event.getButton() == Event.BUTTON_LEFT
+ && !doubleClick
+ && selectMode > Table.SELECT_MODE_NONE && immediate));
}
}
@@ -4167,8 +4170,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
final Action[] actions = new Action[actionKeys.length];
for (int i = 0; i < actions.length; i++) {
final String actionKey = actionKeys[i];
- final TreeAction a = new TreeAction(this, String
- .valueOf(rowKey), actionKey);
+ final TreeAction a = new TreeAction(this,
+ String.valueOf(rowKey), actionKey);
a.setCaption(getActionCaption(actionKey));
a.setIconUrl(getActionIcon(actionKey));
actions[i] = a;
@@ -4569,8 +4572,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
String s = uidl.getStringAttribute("caption");
if (uidl.hasAttribute("icon")) {
s = "<img src=\""
- + client
- .translateVaadinUri(uidl.getStringAttribute("icon"))
+ + client.translateVaadinUri(uidl.getStringAttribute("icon"))
+ "\" alt=\"icon\" class=\"v-icon\">" + s;
}
return s;
@@ -4947,8 +4949,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
// Down navigation
if (selectMode == SELECT_MODE_NONE && keycode == getNavigationDownKey()) {
scrollBodyPanel.setScrollPosition(scrollBodyPanel
- .getScrollPosition()
- + scrollingVelocity);
+ .getScrollPosition() + scrollingVelocity);
return true;
} else if (keycode == getNavigationDownKey()) {
if (selectMode == SELECT_MODE_MULTI && moveFocusDown()) {
@@ -4964,8 +4965,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
// Up navigation
if (selectMode == SELECT_MODE_NONE && keycode == getNavigationUpKey()) {
scrollBodyPanel.setScrollPosition(scrollBodyPanel
- .getScrollPosition()
- - scrollingVelocity);
+ .getScrollPosition() - scrollingVelocity);
return true;
} else if (keycode == getNavigationUpKey()) {
if (selectMode == SELECT_MODE_MULTI && moveFocusUp()) {
@@ -4980,15 +4980,13 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (keycode == getNavigationLeftKey()) {
// Left navigation
scrollBodyPanel.setHorizontalScrollPosition(scrollBodyPanel
- .getHorizontalScrollPosition()
- - scrollingVelocity);
+ .getHorizontalScrollPosition() - scrollingVelocity);
return true;
} else if (keycode == getNavigationRightKey()) {
// Right navigation
scrollBodyPanel.setHorizontalScrollPosition(scrollBodyPanel
- .getHorizontalScrollPosition()
- + scrollingVelocity);
+ .getHorizontalScrollPosition() + scrollingVelocity);
return true;
}
@@ -5014,8 +5012,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
int rowHeight = (int) scrollBody.getRowHeight();
int offset = pageLength * rowHeight - rowHeight;
scrollBodyPanel.setScrollPosition(scrollBodyPanel
- .getScrollPosition()
- + offset);
+ .getScrollPosition() + offset);
if (selectMode > SELECT_MODE_NONE) {
if (!moveFocusDown(pageLength - 2)) {
final int lastRendered = scrollBody.getLastRendered();
@@ -5037,8 +5034,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
int rowHeight = (int) scrollBody.getRowHeight();
int offset = pageLength * rowHeight - rowHeight;
scrollBodyPanel.setScrollPosition(scrollBodyPanel
- .getScrollPosition()
- - offset);
+ .getScrollPosition() - offset);
if (selectMode > SELECT_MODE_NONE) {
if (!moveFocusUp(pageLength - 2)) {
final int firstRendered = scrollBody.getFirstRendered();
@@ -5101,9 +5097,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
*/
public void onKeyPress(KeyPressEvent event) {
if (hasFocus) {
- if (handleNavigation(event.getNativeEvent().getKeyCode(), event
- .isControlKeyDown()
- || event.isMetaKeyDown(), event.isShiftKeyDown())) {
+ if (handleNavigation(event.getNativeEvent().getKeyCode(),
+ event.isControlKeyDown() || event.isMetaKeyDown(),
+ event.isShiftKeyDown())) {
event.preventDefault();
}
@@ -5129,9 +5125,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
*/
public void onKeyDown(KeyDownEvent event) {
if (hasFocus) {
- if (handleNavigation(event.getNativeEvent().getKeyCode(), event
- .isControlKeyDown()
- || event.isMetaKeyDown(), event.isShiftKeyDown())) {
+ if (handleNavigation(event.getNativeEvent().getKeyCode(),
+ event.isControlKeyDown() || event.isMetaKeyDown(),
+ event.isShiftKeyDown())) {
event.preventDefault();
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSlider.java b/src/com/vaadin/terminal/gwt/client/ui/VSlider.java
index 3a42780c96..5715e0bb7b 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VSlider.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VSlider.java
@@ -181,16 +181,16 @@ public class VSlider extends SimpleFocusablePanel implements Paintable, Field,
private void updateFeedbackPosition() {
if (vertical) {
- feedbackPopup.setPopupPosition(DOM.getAbsoluteLeft(handle)
- + handle.getOffsetWidth(), DOM.getAbsoluteTop(handle)
- + handle.getOffsetHeight() / 2
- - feedbackPopup.getOffsetHeight() / 2);
+ feedbackPopup.setPopupPosition(
+ DOM.getAbsoluteLeft(handle) + handle.getOffsetWidth(),
+ DOM.getAbsoluteTop(handle) + handle.getOffsetHeight() / 2
+ - feedbackPopup.getOffsetHeight() / 2);
} else {
- feedbackPopup.setPopupPosition(DOM.getAbsoluteLeft(handle)
- + handle.getOffsetWidth() / 2
- - feedbackPopup.getOffsetWidth() / 2, DOM
- .getAbsoluteTop(handle)
- - feedbackPopup.getOffsetHeight());
+ feedbackPopup.setPopupPosition(
+ DOM.getAbsoluteLeft(handle) + handle.getOffsetWidth() / 2
+ - feedbackPopup.getOffsetWidth() / 2,
+ DOM.getAbsoluteTop(handle)
+ - feedbackPopup.getOffsetHeight());
}
}
@@ -279,8 +279,7 @@ public class VSlider extends SimpleFocusablePanel implements Paintable, Field,
final int handleSize = Integer.parseInt(DOM.getElementProperty(handle,
domProperty));
final int baseSize = Integer.parseInt(DOM.getElementProperty(base,
- domProperty))
- - (2 * BASE_BORDER_WIDTH);
+ domProperty)) - (2 * BASE_BORDER_WIDTH);
final int range = baseSize - handleSize;
double v = value.doubleValue();
@@ -338,8 +337,8 @@ public class VSlider extends SimpleFocusablePanel implements Paintable, Field,
} else if ((BrowserInfo.get().isGecko() && DOM.eventGetType(event) == Event.ONKEYPRESS)
|| (!BrowserInfo.get().isGecko() && DOM.eventGetType(event) == Event.ONKEYDOWN)) {
- if (handleNavigation(event.getKeyCode(), event.getCtrlKey(), event
- .getShiftKey())) {
+ if (handleNavigation(event.getKeyCode(), event.getCtrlKey(),
+ event.getShiftKey())) {
feedbackPopup.show();
@@ -465,7 +464,9 @@ public class VSlider extends SimpleFocusablePanel implements Paintable, Field,
final double baseOffset = vertical ? DOM.getAbsoluteTop(base)
- Window.getScrollTop() - handleSize / 2 : DOM
.getAbsoluteLeft(base)
- - Window.getScrollLeft() + handleSize / 2;
+ - Window.getScrollLeft()
+ + handleSize
+ / 2;
if (vertical) {
v = ((baseSize - (coord - baseOffset)) / (baseSize - handleSize))
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java
index 977f3855ca..0b0a9befa3 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java
@@ -320,9 +320,7 @@ public class VSplitPanel extends ComplexPanel implements Container,
return;
}
- DOM
- .setStyleAttribute(firstContainer, "width", pixelPosition
- + "px");
+ DOM.setStyleAttribute(firstContainer, "width", pixelPosition + "px");
int secondContainerWidth = (wholeSize - pixelPosition - getSplitterSize());
if (secondContainerWidth < 0) {
secondContainerWidth = 0;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTablePaging.java b/src/com/vaadin/terminal/gwt/client/ui/VTablePaging.java
index 638f4b9be9..24999aaa25 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTablePaging.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTablePaging.java
@@ -154,8 +154,8 @@ public class VTablePaging extends Composite implements Table, Paintable,
final UIDL col = (UIDL) it.next();
final String cid = col.getStringAttribute("cid");
if (!col.hasAttribute("collapsed")) {
- tBody.setWidget(0, colIndex, new HeaderCell(cid, col
- .getStringAttribute("caption")));
+ tBody.setWidget(0, colIndex,
+ new HeaderCell(cid, col.getStringAttribute("caption")));
}
colIndex++;
@@ -183,9 +183,9 @@ public class VTablePaging extends Composite implements Table, Paintable,
int curRowIndex = 1;
while (it.hasNext()) {
final UIDL rowUidl = (UIDL) it.next();
- final TableRow row = new TableRow(curRowIndex, String
- .valueOf(rowUidl.getIntAttribute("key")), rowUidl
- .hasAttribute("selected"));
+ final TableRow row = new TableRow(curRowIndex,
+ String.valueOf(rowUidl.getIntAttribute("key")),
+ rowUidl.hasAttribute("selected"));
int colIndex = 0;
if (rowHeaders) {
tBody.setWidget(curRowIndex, colIndex, new BodyCell(row,
@@ -363,13 +363,15 @@ public class VTablePaging extends Composite implements Table, Paintable,
selected = sel;
if (selected) {
selectedRowKeys.add(key);
- DOM.setStyleAttribute(tBody.getRowFormatter().getElement(
- rowIndex), "background", "yellow");
+ DOM.setStyleAttribute(
+ tBody.getRowFormatter().getElement(rowIndex),
+ "background", "yellow");
} else {
selectedRowKeys.remove(key);
- DOM.setStyleAttribute(tBody.getRowFormatter().getElement(
- rowIndex), "background", "transparent");
+ DOM.setStyleAttribute(
+ tBody.getRowFormatter().getElement(rowIndex),
+ "background", "transparent");
}
}
@@ -391,8 +393,11 @@ public class VTablePaging extends Composite implements Table, Paintable,
}
setSelected(true);
}
- client.updateVariable(id, "selected", selectedRowKeys
- .toArray(new String[selectedRowKeys.size()]), immediate);
+ client.updateVariable(
+ id,
+ "selected",
+ selectedRowKeys.toArray(new String[selectedRowKeys.size()]),
+ immediate);
}
/**
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
index a9d827914b..2ca1eb3a6f 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java
@@ -341,8 +341,9 @@ public class VTabsheet extends VTabsheetBase {
DeferredCommand.addCommand(new Command() {
public void execute() {
previousVisibleWidget = tp.getWidget(tp.getVisibleWidget());
- DOM.setStyleAttribute(DOM.getParent(previousVisibleWidget
- .getElement()), "visibility", "hidden");
+ DOM.setStyleAttribute(
+ DOM.getParent(previousVisibleWidget.getElement()),
+ "visibility", "hidden");
client.updateVariable(id, "selected", tabKeys.get(tabIndex)
.toString(), true);
}
@@ -387,9 +388,7 @@ public class VTabsheet extends VTabsheetBase {
addStyleDependentName("loading"); // Indicate initial progress
tb.setStyleName(CLASSNAME + "-tabs");
- DOM
- .setElementProperty(contentNode, "className", CLASSNAME
- + "-content");
+ DOM.setElementProperty(contentNode, "className", CLASSNAME + "-content");
DOM.setElementProperty(deco, "className", CLASSNAME + "-deco");
add(tb, tabs);
@@ -737,8 +736,9 @@ public class VTabsheet extends VTabsheetBase {
updateOpenTabSize();
VTabsheet.this.removeStyleDependentName("loading");
if (previousVisibleWidget != null) {
- DOM.setStyleAttribute(DOM.getParent(previousVisibleWidget
- .getElement()), "visibility", "");
+ DOM.setStyleAttribute(
+ DOM.getParent(previousVisibleWidget.getElement()),
+ "visibility", "");
previousVisibleWidget = null;
}
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java
index 8b6d0bfbbc..fb6e7e258a 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java
@@ -240,8 +240,9 @@ public class VTextualDate extends VDateField implements Paintable, Field,
if (date != null) {
// if date value was leniently parsed, normalize text
// presentation
- text.setValue(DateTimeFormat.getFormat(
- getFormatString()).format(date), false);
+ text.setValue(
+ DateTimeFormat.getFormat(getFormatString())
+ .format(date), false);
}
} else {
date = format.parseStrict(text.getText());
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java
index d30ada2a97..2733836f1e 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTwinColSelect.java
@@ -209,8 +209,9 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
options.setFocus(true);
}
- client.updateVariable(id, "selected", selectedKeys
- .toArray(new String[selectedKeys.size()]), isImmediate());
+ client.updateVariable(id, "selected",
+ selectedKeys.toArray(new String[selectedKeys.size()]),
+ isImmediate());
}
private void removeItem() {
@@ -242,8 +243,9 @@ public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler,
selections.setFocus(true);
}
- client.updateVariable(id, "selected", selectedKeys
- .toArray(new String[selectedKeys.size()]), isImmediate());
+ client.updateVariable(id, "selected",
+ selectedKeys.toArray(new String[selectedKeys.size()]),
+ isImmediate());
}
@Override
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VUpload.java b/src/com/vaadin/terminal/gwt/client/ui/VUpload.java
index ce3012b3b0..62d7a45477 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VUpload.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VUpload.java
@@ -247,8 +247,7 @@ public class VUpload extends SimplePanel implements Paintable {
if (fu.getFilename().length() == 0 || submitted || !enabled) {
ApplicationConnection
.getConsole()
- .log(
- "Submit cancelled (disabled, no file or already submitted)");
+ .log("Submit cancelled (disabled, no file or already submitted)");
return;
}
// flush possibly pending variable changes, so they will be handled
@@ -270,8 +269,7 @@ public class VUpload extends SimplePanel implements Paintable {
public void run() {
ApplicationConnection
.getConsole()
- .log(
- "Visiting server to see if upload started event changed UI.");
+ .log("Visiting server to see if upload started event changed UI.");
client.updateVariable(paintableId, "pollForStart",
nextUploadId, true);
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java
index 3955231f3a..d6556b0d19 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VView.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java
@@ -292,8 +292,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
}
final String style = notification.hasAttribute("style") ? notification
- .getStringAttribute("style")
- : null;
+ .getStringAttribute("style") : null;
final int position = notification
.getIntAttribute("position");
final int delay = notification.getIntAttribute("delay");
@@ -455,8 +454,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
if (changed) {
ApplicationConnection
.getConsole()
- .log(
- "Running layout functions due window resize");
+ .log("Running layout functions due window resize");
connection.runDescendentsLayout(VView.this);
sendClientResized();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
index a1301e865a..c398db048b 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
@@ -226,9 +226,7 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
footer = DOM.createDiv();
DOM.setElementProperty(footer, "className", CLASSNAME + "-footer");
resizeBox = DOM.createDiv();
- DOM
- .setElementProperty(resizeBox, "className", CLASSNAME
- + "-resizebox");
+ DOM.setElementProperty(resizeBox, "className", CLASSNAME + "-resizebox");
closeBox = DOM.createDiv();
DOM.setElementProperty(closeBox, "className", CLASSNAME + "-closebox");
DOM.appendChild(footer, resizeBox);
@@ -313,8 +311,8 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
}
if (uidl.hasAttribute("caption")) {
- setCaption(uidl.getStringAttribute("caption"), uidl
- .getStringAttribute("icon"));
+ setCaption(uidl.getStringAttribute("caption"),
+ uidl.getStringAttribute("icon"));
}
boolean showingUrl = false;
@@ -430,8 +428,7 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
}
final String style = notification.hasAttribute("style") ? notification
- .getStringAttribute("style")
- : null;
+ .getStringAttribute("style") : null;
final int position = notification
.getIntAttribute("position");
final int delay = notification.getIntAttribute("delay");
@@ -710,14 +707,15 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
private void showModalityCurtain() {
if (BrowserInfo.get().isFF2()) {
- DOM.setStyleAttribute(modalityCurtain, "height", DOM
- .getElementPropertyInt(RootPanel.getBodyElement(),
- "offsetHeight")
- + "px");
+ DOM.setStyleAttribute(
+ modalityCurtain,
+ "height",
+ DOM.getElementPropertyInt(RootPanel.getBodyElement(),
+ "offsetHeight") + "px");
DOM.setStyleAttribute(modalityCurtain, "position", "absolute");
}
- DOM.setStyleAttribute(modalityCurtain, "zIndex", ""
- + (windowOrder.indexOf(this) + Z_INDEX));
+ DOM.setStyleAttribute(modalityCurtain, "zIndex",
+ "" + (windowOrder.indexOf(this) + Z_INDEX));
DOM.appendChild(RootPanel.getBodyElement(), modalityCurtain);
}
@@ -996,8 +994,8 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
rootPixelWidth = getElement().getOffsetWidth();
width = rootPixelWidth + "px";
} else {
- rootPixelWidth = Integer.parseInt(width.substring(0, width
- .indexOf("px")));
+ rootPixelWidth = Integer.parseInt(width.substring(0,
+ width.indexOf("px")));
}
// "width" now contains the new width in pixels
@@ -1134,8 +1132,8 @@ public class VWindow extends VOverlay implements Container, ScrollListener,
// debug window
Console console = ApplicationConnection.getConsole();
if (console instanceof VDebugConsole
- && DOM.isOrHasChild(((VDebugConsole) console)
- .getElement(), target)) {
+ && DOM.isOrHasChild(
+ ((VDebugConsole) console).getElement(), target)) {
return true; // allow debug-window clicks
}
return false;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java
index 936cdf8408..aa5b75242f 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java
@@ -14,9 +14,9 @@ import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Event.NativePreviewEvent;
import com.google.gwt.user.client.Event.NativePreviewHandler;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
@@ -537,8 +537,8 @@ public class VDragAndDropManager {
VTransferable transferable = currentDrag.getTransferable();
- client.updateVariable(DD_SERVICE, "component", transferable
- .getDragSource(), false);
+ client.updateVariable(DD_SERVICE, "component",
+ transferable.getDragSource(), false);
client.updateVariable(DD_SERVICE, "type", drop.ordinal(), false);
diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragEvent.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragEvent.java
index 399c9cd2e1..306659a571 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/dd/VDragEvent.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VDragEvent.java
@@ -8,9 +8,9 @@ import java.util.Map;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NativeEvent;
+import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.dom.client.TableElement;
import com.google.gwt.dom.client.TableSectionElement;
-import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.user.client.Element;
import com.vaadin.terminal.gwt.client.BrowserInfo;
diff --git a/src/com/vaadin/terminal/gwt/client/ui/layout/CellBasedLayout.java b/src/com/vaadin/terminal/gwt/client/ui/layout/CellBasedLayout.java
index ec66cfe60d..f573e36e09 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/layout/CellBasedLayout.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/layout/CellBasedLayout.java
@@ -239,11 +239,10 @@ public abstract class CellBasedLayout extends ComplexPanel implements Container
static {
helper = Document.get().createDivElement();
- helper
- .setInnerHTML("<div style=\"position:absolute;top:0;left:0;height:0;visibility:hidden;overflow:hidden;\">"
- + "<div style=\"width:0;height:0;visibility:hidden;overflow:hidden;\">"
- + "</div></div>"
- + "<div style=\"position:absolute;height:0;overflow:hidden;\"></div>");
+ helper.setInnerHTML("<div style=\"position:absolute;top:0;left:0;height:0;visibility:hidden;overflow:hidden;\">"
+ + "<div style=\"width:0;height:0;visibility:hidden;overflow:hidden;\">"
+ + "</div></div>"
+ + "<div style=\"position:absolute;height:0;overflow:hidden;\"></div>");
NodeList<Node> childNodes = helper.getChildNodes();
measurement = (DivElement) childNodes.getItem(0);
measurement2 = (DivElement) measurement.getFirstChildElement();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java b/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java
index 83e3c66536..8770fabdb5 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/layout/ChildComponentContainer.java
@@ -16,11 +16,11 @@ import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Paintable;
+import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
+import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.VCaption;
-import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize;
-import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.ui.AlignmentInfo;
public class ChildComponentContainer extends Panel {
@@ -83,8 +83,7 @@ public class ChildComponentContainer extends Panel {
// FF2 chokes on some floats very easily. Measuring size escpecially
// becomes terribly slow
TableElement tableEl = Document.get().createTableElement();
- tableEl
- .setInnerHTML("<tbody><tr><td><div></div></td></tr></tbody>");
+ tableEl.setInnerHTML("<tbody><tr><td><div></div></td></tr></tbody>");
DivElement div = (DivElement) tableEl.getFirstChildElement()
.getFirstChildElement().getFirstChildElement()
.getFirstChildElement();
@@ -268,8 +267,8 @@ public class ChildComponentContainer extends Panel {
setMarginTop(containerMarginTop);
if (caption != null) {
- caption.getElement().getStyle().setPropertyPx("marginLeft",
- alignmentLeftOffsetForCaption);
+ caption.getElement().getStyle()
+ .setPropertyPx("marginLeft", alignmentLeftOffsetForCaption);
}
widgetDIV.getStyle().setPropertyPx("marginLeft",
alignmentLeftOffsetForWidget);
@@ -326,8 +325,8 @@ public class ChildComponentContainer extends Panel {
* Take into account the rare case that the caption on the right
* side of the component AND is higher than the component
*/
- emptySpace -= Math.max(widgetSize.getHeight(), caption
- .getHeight());
+ emptySpace -= Math.max(widgetSize.getHeight(),
+ caption.getHeight());
} else {
emptySpace -= widgetSize.getHeight();
emptySpace -= getCaptionHeight();
diff --git a/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextToolbar.java b/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextToolbar.java
index f3aa9d6b24..9154017a32 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextToolbar.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextToolbar.java
@@ -319,10 +319,10 @@ public class VRichTextToolbar extends Composite {
setStyleName("gwt-RichTextToolbar");
if (basic != null) {
- topPanel.add(bold = createToggleButton(images.bold(), strings
- .bold()));
- topPanel.add(italic = createToggleButton(images.italic(), strings
- .italic()));
+ topPanel.add(bold = createToggleButton(images.bold(),
+ strings.bold()));
+ topPanel.add(italic = createToggleButton(images.italic(),
+ strings.italic()));
topPanel.add(underline = createToggleButton(images.underline(),
strings.underline()));
topPanel.add(subscript = createToggleButton(images.subscript(),
@@ -331,19 +331,19 @@ public class VRichTextToolbar extends Composite {
strings.superscript()));
topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
strings.justifyLeft()));
- topPanel.add(justifyCenter = createPushButton(images
- .justifyCenter(), strings.justifyCenter()));
+ topPanel.add(justifyCenter = createPushButton(
+ images.justifyCenter(), strings.justifyCenter()));
topPanel.add(justifyRight = createPushButton(images.justifyRight(),
strings.justifyRight()));
}
if (extended != null) {
- topPanel.add(strikethrough = createToggleButton(images
- .strikeThrough(), strings.strikeThrough()));
- topPanel.add(indent = createPushButton(images.indent(), strings
- .indent()));
- topPanel.add(outdent = createPushButton(images.outdent(), strings
- .outdent()));
+ topPanel.add(strikethrough = createToggleButton(
+ images.strikeThrough(), strings.strikeThrough()));
+ topPanel.add(indent = createPushButton(images.indent(),
+ strings.indent()));
+ topPanel.add(outdent = createPushButton(images.outdent(),
+ strings.outdent()));
topPanel.add(hr = createPushButton(images.hr(), strings.hr()));
topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
index 9e115842ba..29a392012d 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
@@ -96,8 +96,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
for (final Enumeration e = config.getInitParameterNames(); e
.hasMoreElements();) {
final String name = (String) e.nextElement();
- applicationProperties.setProperty(name, config
- .getInitParameter(name));
+ applicationProperties.setProperty(name,
+ config.getInitParameter(name));
}
// Overrides with server.xml parameters
@@ -105,8 +105,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
for (final Enumeration e = context.getInitParameterNames(); e
.hasMoreElements();) {
final String name = (String) e.nextElement();
- applicationProperties.setProperty(name, context
- .getInitParameter(name));
+ applicationProperties.setProperty(name,
+ context.getInitParameter(name));
}
checkProductionMode();
checkCrossSiteProtection();
@@ -181,8 +181,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
pkgName = pkg.getName();
} else {
final String className = getClass().getName();
- pkgName = new String(className.toCharArray(), 0, className
- .lastIndexOf('.'));
+ pkgName = new String(className.toCharArray(), 0,
+ className.lastIndexOf('.'));
}
val = System.getProperty(pkgName + "." + parameterName);
if (val != null) {
@@ -235,8 +235,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
protected String getStaticFilesLocation(PortletRequest request) {
// TODO allow overriding on portlet level?
String staticFileLocation = getPortalProperty(
- Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH, request
- .getPortalContext());
+ Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH,
+ request.getPortalContext());
if (staticFileLocation != null) {
// remove trailing slash if any
while (staticFileLocation.endsWith(".")) {
@@ -557,8 +557,9 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
private void updateBrowserProperties(WebBrowser browser,
PortletRequest request) {
String userAgent = getHTTPHeader(request, "user-agent");
- browser.updateBrowserProperties(request.getLocale(), null, request
- .isSecure(), userAgent, getHTTPRequestParameter(request, "sw"),
+ browser.updateBrowserProperties(request.getLocale(), null,
+ request.isSecure(), userAgent,
+ getHTTPRequestParameter(request, "sw"),
getHTTPRequestParameter(request, "sh"));
}
@@ -590,8 +591,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
ResourceResponse response) throws IOException {
if (stream.getParameter("Location") != null) {
- response.setProperty(ResourceResponse.HTTP_STATUS_CODE, Integer
- .toString(HttpServletResponse.SC_MOVED_TEMPORARILY));
+ response.setProperty(ResourceResponse.HTTP_STATUS_CODE,
+ Integer.toString(HttpServletResponse.SC_MOVED_TEMPORARILY));
response.setProperty("Location", stream.getParameter("Location"));
return;
}
@@ -676,8 +677,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
} else {
System.err.println("Requested resource [" + resourceID
+ "] could not be found");
- response.setProperty(ResourceResponse.HTTP_STATUS_CODE, Integer
- .toString(HttpServletResponse.SC_NOT_FOUND));
+ response.setProperty(ResourceResponse.HTTP_STATUS_CODE,
+ Integer.toString(HttpServletResponse.SC_NOT_FOUND));
}
}
@@ -1022,10 +1023,9 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
widgetset = DEFAULT_WIDGETSET;
}
String widgetsetURL = getWidgetsetURL(widgetset, request);
- writer
- .write("document.write('<iframe tabIndex=\"-1\" id=\"__gwt_historyFrame\" "
- + "style=\"width:0;height:0;border:0;overflow:"
- + "hidden\" src=\"javascript:false\"></iframe>');\n");
+ writer.write("document.write('<iframe tabIndex=\"-1\" id=\"__gwt_historyFrame\" "
+ + "style=\"width:0;height:0;border:0;overflow:"
+ + "hidden\" src=\"javascript:false\"></iframe>');\n");
writer.write("document.write(\"<script language='javascript' src='"
+ widgetsetURL + "'><\\/script>\");\n}\n");
}
@@ -1177,14 +1177,12 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
}
writer.write("if(!vaadin.themesLoaded['" + portalTheme + "']) {\n");
- writer
- .write("var defaultStylesheet = document.createElement('link');\n");
+ writer.write("var defaultStylesheet = document.createElement('link');\n");
writer.write("defaultStylesheet.setAttribute('rel', 'stylesheet');\n");
writer.write("defaultStylesheet.setAttribute('type', 'text/css');\n");
writer.write("defaultStylesheet.setAttribute('href', '"
+ getThemeURI(portalTheme, request) + "/styles.css');\n");
- writer
- .write("document.getElementsByTagName('head')[0].appendChild(defaultStylesheet);\n");
+ writer.write("document.getElementsByTagName('head')[0].appendChild(defaultStylesheet);\n");
writer.write("vaadin.themesLoaded['" + portalTheme + "'] = true;\n}\n");
if (!portalTheme.equals(themeName)) {
@@ -1194,8 +1192,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
writer.write("stylesheet.setAttribute('type', 'text/css');\n");
writer.write("stylesheet.setAttribute('href', '" + themeURI
+ "/styles.css');\n");
- writer
- .write("document.getElementsByTagName('head')[0].appendChild(stylesheet);\n");
+ writer.write("document.getElementsByTagName('head')[0].appendChild(stylesheet);\n");
writer.write("vaadin.themesLoaded['" + themeName
+ "'] = true;\n}\n");
}
@@ -1252,8 +1249,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
if (themeName == null) {
// no, is the default theme defined by the portal?
themeName = getPortalProperty(
- Constants.PORTAL_PARAMETER_VAADIN_THEME, request
- .getPortalContext());
+ Constants.PORTAL_PARAMETER_VAADIN_THEME,
+ request.getPortalContext());
}
if (themeName == null) {
@@ -1326,8 +1323,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
// if this was an UIDL request, response UIDL back to client
if (getRequestType(request) == RequestType.UIDL) {
Application.SystemMessages ci = getSystemMessages();
- criticalNotification(request, (ResourceResponse) response, ci
- .getInternalErrorCaption(), ci.getInternalErrorMessage(),
+ criticalNotification(request, (ResourceResponse) response,
+ ci.getInternalErrorCaption(), ci.getInternalErrorMessage(),
null, ci.getInternalErrorURL());
if (application != null) {
application.getErrorHandler()
@@ -1429,8 +1426,8 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
* @return
*/
protected static String getPortalProperty(String name, PortalContext context) {
- boolean isLifeRay = context.getPortalInfo().toLowerCase().contains(
- "liferay");
+ boolean isLifeRay = context.getPortalInfo().toLowerCase()
+ .contains("liferay");
// TODO test on non-LifeRay platforms
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index 2807a7ffec..c7614383de 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -117,8 +117,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* read by {@link AbstractApplicationServlet}.
*/
public static final String REQUEST_FRAGMENT = ApplicationServlet.class
- .getName()
- + ".fragment";
+ .getName() + ".fragment";
/**
* This request attribute forces widgetsets to be loaded from under the
* specified base path; e.g shared widgetset for all portlets in a portal.
@@ -128,8 +127,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* {@link AbstractApplicationServlet}.
*/
public static final String REQUEST_VAADIN_STATIC_FILE_PATH = ApplicationServlet.class
- .getName()
- + ".widgetsetPath";
+ .getName() + ".widgetsetPath";
/**
* This request attribute forces widgetset used; e.g for portlets that can
* not have different widgetsets.
@@ -139,8 +137,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* {@link AbstractApplicationServlet}.
*/
public static final String REQUEST_WIDGETSET = ApplicationServlet.class
- .getName()
- + ".widgetset";
+ .getName() + ".widgetset";
/**
* This request attribute indicates the shared widgetset (e.g. portal-wide
* default widgetset).
@@ -150,8 +147,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* {@link AbstractApplicationServlet}.
*/
public static final String REQUEST_SHARED_WIDGETSET = ApplicationServlet.class
- .getName()
- + ".sharedWidgetset";
+ .getName() + ".sharedWidgetset";
/**
* If set, do not load the default theme but assume that loading it is
* handled e.g. by ApplicationPortlet.
@@ -161,8 +157,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* {@link AbstractApplicationServlet}.
*/
public static final String REQUEST_DEFAULT_THEME = ApplicationServlet.class
- .getName()
- + ".defaultThemeUri";
+ .getName() + ".defaultThemeUri";
/**
* This request attribute is used to add styles to the main element. E.g
* "height:500px" generates a style="height:500px" to the main element,
@@ -173,8 +168,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* {@link AbstractApplicationServlet}.
*/
public static final String REQUEST_APPSTYLE = ApplicationServlet.class
- .getName()
- + ".style";
+ .getName() + ".style";
private Properties applicationProperties;
@@ -206,8 +200,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
for (final Enumeration e = servletConfig.getInitParameterNames(); e
.hasMoreElements();) {
final String name = (String) e.nextElement();
- applicationProperties.setProperty(name, servletConfig
- .getInitParameter(name));
+ applicationProperties.setProperty(name,
+ servletConfig.getInitParameter(name));
}
// Overrides with server.xml parameters
@@ -215,8 +209,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
for (final Enumeration e = context.getInitParameterNames(); e
.hasMoreElements();) {
final String name = (String) e.nextElement();
- applicationProperties.setProperty(name, context
- .getInitParameter(name));
+ applicationProperties.setProperty(name,
+ context.getInitParameter(name));
}
checkProductionMode();
checkCrossSiteProtection();
@@ -305,8 +299,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
pkgName = pkg.getName();
} else {
final String className = getClass().getName();
- pkgName = new String(className.toCharArray(), 0, className
- .lastIndexOf('.'));
+ pkgName = new String(className.toCharArray(), 0,
+ className.lastIndexOf('.'));
}
val = System.getProperty(pkgName + "." + parameterName);
if (val != null) {
@@ -570,10 +564,10 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
private void updateBrowserProperties(WebBrowser browser,
HttpServletRequest request) {
- browser.updateBrowserProperties(request.getLocale(), request
- .getRemoteAddr(), request.isSecure(), request
- .getHeader("user-agent"), request.getParameter("sw"), request
- .getParameter("sh"));
+ browser.updateBrowserProperties(request.getLocale(),
+ request.getRemoteAddr(), request.isSecure(),
+ request.getHeader("user-agent"), request.getParameter("sw"),
+ request.getParameter("sh"));
}
protected ClassLoader getClassLoader() throws ServletException {
@@ -946,8 +940,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
// if this was an UIDL request, response UIDL back to client
if (getRequestType(request) == RequestType.UIDL) {
Application.SystemMessages ci = getSystemMessages();
- criticalNotification(request, response, ci
- .getInternalErrorCaption(), ci.getInternalErrorMessage(),
+ criticalNotification(request, response,
+ ci.getInternalErrorCaption(), ci.getInternalErrorMessage(),
null, ci.getInternalErrorURL());
if (application != null) {
application.getErrorHandler()
@@ -1059,10 +1053,10 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
request.getSession().invalidate();
// send uidl redirect
- criticalNotification(request, response, ci
- .getSessionExpiredCaption(), ci
- .getSessionExpiredMessage(), null, ci
- .getSessionExpiredURL());
+ criticalNotification(request, response,
+ ci.getSessionExpiredCaption(),
+ ci.getSessionExpiredMessage(), null,
+ ci.getSessionExpiredURL());
}
} catch (SystemMessageException ee) {
@@ -1089,9 +1083,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
response.sendRedirect(ci.getCommunicationErrorURL());
} else {
// send uidl redirect
- criticalNotification(request, response, ci
- .getCommunicationErrorCaption(), ci
- .getCommunicationErrorMessage(),
+ criticalNotification(request, response,
+ ci.getCommunicationErrorCaption(),
+ ci.getCommunicationErrorMessage(),
INVALID_SECURITY_KEY_MSG, ci.getCommunicationErrorURL());
/*
* Invalidate session. Portal integration will fail otherwise
@@ -1169,8 +1163,10 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
return true;
} else if (request.getRequestURI().startsWith(
request.getContextPath() + "/VAADIN/")) {
- serveStaticResourcesInVAADIN(request.getRequestURI().substring(
- request.getContextPath().length()), request, response);
+ serveStaticResourcesInVAADIN(
+ request.getRequestURI().substring(
+ request.getContextPath().length()), request,
+ response);
return true;
}
@@ -1248,8 +1244,8 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
* cache timeout can be configured by setting the resourceCacheTime
* parameter in web.xml
*/
- response.setHeader("Cache-Control", "max-age: "
- + String.valueOf(resourceCacheTime));
+ response.setHeader("Cache-Control",
+ "max-age: " + String.valueOf(resourceCacheTime));
}
// Write the resource to the client.
@@ -1770,10 +1766,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
if (!isProductionMode()) {
page.write("vaadin.debug = true;\n");
}
- page
- .write("document.write('<iframe tabIndex=\"-1\" id=\"__gwt_historyFrame\" "
- + "style=\"position:absolute;width:0;height:0;border:0;overflow:"
- + "hidden;\" src=\"javascript:false\"></iframe>');\n");
+ page.write("document.write('<iframe tabIndex=\"-1\" id=\"__gwt_historyFrame\" "
+ + "style=\"position:absolute;width:0;height:0;border:0;overflow:"
+ + "hidden;\" src=\"javascript:false\"></iframe>');\n");
page.write("document.write(\"<script language='javascript' src='"
+ widgetsetFilePath + "'><\\/script>\");\n}\n");
@@ -1848,8 +1843,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
page.write("stylesheet.setAttribute('type', 'text/css');\n");
page.write("stylesheet.setAttribute('href', '" + themeUri
+ "/styles.css');\n");
- page
- .write("document.getElementsByTagName('head')[0].appendChild(stylesheet);\n");
+ page.write("document.getElementsByTagName('head')[0].appendChild(stylesheet);\n");
page.write("vaadin.themesLoaded['" + themeName + "'] = true;\n}\n");
page.write("//]]>\n</script>\n");
}
@@ -1858,12 +1852,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
// inactivity
page.write("<script type=\"text/javascript\">\n");
page.write("//<![CDATA[\n");
- page
- .write("setTimeout('if (typeof "
- + widgetset.replace('.', '_')
- + " == \"undefined\") {alert(\"Failed to load the widgetset: "
- + widgetsetFilePath + "\")};',15000);\n"
- + "//]]>\n</script>\n");
+ page.write("setTimeout('if (typeof " + widgetset.replace('.', '_')
+ + " == \"undefined\") {alert(\"Failed to load the widgetset: "
+ + widgetsetFilePath + "\")};',15000);\n" + "//]]>\n</script>\n");
}
/**
@@ -1897,18 +1888,15 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
*/
protected void writeAjaxPageHtmlHeader(final BufferedWriter page,
String title, String themeUri) throws IOException {
- page
- .write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n");
+ page.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n");
page.write("<style type=\"text/css\">"
+ "html, body {height:100%;margin:0;}</style>");
// Add favicon links
- page
- .write("<link rel=\"shortcut icon\" type=\"image/vnd.microsoft.icon\" href=\""
- + themeUri + "/favicon.ico\" />");
- page
- .write("<link rel=\"icon\" type=\"image/vnd.microsoft.icon\" href=\""
- + themeUri + "/favicon.ico\" />");
+ page.write("<link rel=\"shortcut icon\" type=\"image/vnd.microsoft.icon\" href=\""
+ + themeUri + "/favicon.ico\" />");
+ page.write("<link rel=\"icon\" type=\"image/vnd.microsoft.icon\" href=\""
+ + themeUri + "/favicon.ico\" />");
page.write("<title>" + title + "</title>");
}
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
index d8664e216c..01dcffe6fc 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
@@ -53,20 +53,20 @@ import com.vaadin.terminal.DownloadStream;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Paintable;
-import com.vaadin.terminal.URIHandler;
-import com.vaadin.terminal.UploadStream;
-import com.vaadin.terminal.VariableOwner;
import com.vaadin.terminal.Paintable.RepaintRequestEvent;
import com.vaadin.terminal.Terminal.ErrorEvent;
import com.vaadin.terminal.Terminal.ErrorListener;
+import com.vaadin.terminal.URIHandler;
+import com.vaadin.terminal.UploadStream;
+import com.vaadin.terminal.VariableOwner;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.server.ComponentSizeValidator.InvalidLayout;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Component;
import com.vaadin.ui.DragAndDropWrapper;
import com.vaadin.ui.Upload;
-import com.vaadin.ui.Window;
import com.vaadin.ui.Upload.UploadException;
+import com.vaadin.ui.Window;
/**
* This is a common base class for the server-side implementations of the
@@ -1049,14 +1049,17 @@ public abstract class AbstractCommunicationManager implements
// we have more than one value changes in row for
// one variable owner, collect em in HashMap
m = new HashMap<String, Object>();
- m.put(variable[VAR_NAME], convertVariableValue(
- variable[VAR_TYPE].charAt(0),
- variable[VAR_VALUE]));
+ m.put(variable[VAR_NAME],
+ convertVariableValue(
+ variable[VAR_TYPE].charAt(0),
+ variable[VAR_VALUE]));
} else {
// use optimized single value map
- m = Collections.singletonMap(variable[VAR_NAME],
- convertVariableValue(variable[VAR_TYPE]
- .charAt(0), variable[VAR_VALUE]));
+ m = Collections.singletonMap(
+ variable[VAR_NAME],
+ convertVariableValue(
+ variable[VAR_TYPE].charAt(0),
+ variable[VAR_VALUE]));
}
// collect following variable changes for this owner
@@ -1070,9 +1073,10 @@ public abstract class AbstractCommunicationManager implements
} else {
nextVariable = null;
}
- m.put(variable[VAR_NAME], convertVariableValue(
- variable[VAR_TYPE].charAt(0),
- variable[VAR_VALUE]));
+ m.put(variable[VAR_NAME],
+ convertVariableValue(
+ variable[VAR_TYPE].charAt(0),
+ variable[VAR_VALUE]));
}
try {
owner.changeVariables(request, m);
@@ -1912,8 +1916,7 @@ public abstract class AbstractCommunicationManager implements
URL windowContext;
windowContext = new URL(context, prefix + "/");
final String windowUri = (uri.length() > prefix.length() + 1) ? uri
- .substring(prefix.length() + 1)
- : "";
+ .substring(prefix.length() + 1) : "";
return window.handleURI(windowContext, windowUri);
} else {
return null;
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java b/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
index e9de68630b..1baad53dad 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java
@@ -86,7 +86,7 @@ public abstract class AbstractWebApplicationContext implements
}
}
- // If any runtime exceptions occurred, throw a combined exception
+ // If any runtime exceptions occurred, throw a combined exception
if (exceptions != null) {
final StringBuffer msg = new StringBuffer();
for (Exception e : exceptions) {
@@ -106,15 +106,15 @@ public abstract class AbstractWebApplicationContext implements
* @see javax.servlet.http.HttpSessionBindingListener#valueBound(HttpSessionBindingEvent)
*/
public void valueBound(HttpSessionBindingEvent arg0) {
- // We are not interested in bindings
+ // We are not interested in bindings
}
/**
* @see javax.servlet.http.HttpSessionBindingListener#valueUnbound(HttpSessionBindingEvent)
*/
public void valueUnbound(HttpSessionBindingEvent event) {
- // If we are going to be unbound from the session, the session must be
- // closing
+ // If we are going to be unbound from the session, the session must be
+ // closing
try {
while (!applications.isEmpty()) {
final Application app = applications.iterator().next();
@@ -122,12 +122,12 @@ public abstract class AbstractWebApplicationContext implements
removeApplication(app);
}
} catch (Exception e) {
- // This should never happen but is possible with rare
- // configurations (e.g. robustness tests). If you have one
- // thread doing HTTP socket write and another thread trying to
- // remove same application here. Possible if you got e.g. session
- // lifetime 1 min but socket write may take longer than 1 min.
- // FIXME: Handle exception
+ // This should never happen but is possible with rare
+ // configurations (e.g. robustness tests). If you have one
+ // thread doing HTTP socket write and another thread trying to
+ // remove same application here. Possible if you got e.g. session
+ // lifetime 1 min but socket write may take longer than 1 min.
+ // FIXME: Handle exception
System.err.println("Could not remove application, leaking memory.");
e.printStackTrace();
}
@@ -168,19 +168,19 @@ public abstract class AbstractWebApplicationContext implements
}
public boolean isApplicationResourceURL(URL context, String relativeUri) {
- // If the relative uri is null, we are ready
+ // If the relative uri is null, we are ready
if (relativeUri == null) {
return false;
}
- // Resolves the prefix
+ // Resolves the prefix
String prefix = relativeUri;
final int index = relativeUri.indexOf('/');
if (index >= 0) {
prefix = relativeUri.substring(0, index);
}
- // Handles the resource requests
+ // Handles the resource requests
return (prefix.equals("APP"));
}
diff --git a/src/com/vaadin/terminal/gwt/server/ApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/ApplicationPortlet.java
index 3a527fc187..35c068400f 100644
--- a/src/com/vaadin/terminal/gwt/server/ApplicationPortlet.java
+++ b/src/com/vaadin/terminal/gwt/server/ApplicationPortlet.java
@@ -29,16 +29,16 @@ import com.vaadin.Application;
*/
@SuppressWarnings("serial")
public class ApplicationPortlet implements Portlet, Serializable {
- // portlet configuration parameters
+ // portlet configuration parameters
private static final String PORTLET_PARAMETER_APPLICATION = "application";
private static final String PORTLET_PARAMETER_STYLE = "style";
private static final String PORTLET_PARAMETER_WIDGETSET = "widgetset";
- // The application to show
+ // The application to show
protected String app = null;
- // some applications might require forced height (and, more seldom, width)
- protected String style = null; // e.g "height:500px;"
- // force the portlet to use this widgetset - portlet level setting
+ // some applications might require forced height (and, more seldom, width)
+ protected String style = null; // e.g "height:500px;"
+ // force the portlet to use this widgetset - portlet level setting
protected String portletWidgetset = null;
public void destroy() {
@@ -54,8 +54,8 @@ public class ApplicationPortlet implements Portlet, Serializable {
+ "' init parameter to be the servlet deployment path.");
}
style = config.getInitParameter(PORTLET_PARAMETER_STYLE);
- // enable forcing the selection of the widgetset in portlet
- // configuration for a single portlet (backwards compatibility)
+ // enable forcing the selection of the widgetset in portlet
+ // configuration for a single portlet (backwards compatibility)
portletWidgetset = config.getInitParameter(PORTLET_PARAMETER_WIDGETSET);
}
@@ -67,7 +67,7 @@ public class ApplicationPortlet implements Portlet, Serializable {
public void render(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
- // display the Vaadin application
+ // display the Vaadin application
writeAjaxWindow(request, response);
}
@@ -84,7 +84,7 @@ public class ApplicationPortlet implements Portlet, Serializable {
.getRequestDispatcher("/" + app);
try {
- // portal-wide settings
+ // portal-wide settings
PortalContext portalCtx = request.getPortalContext();
boolean isLifeRay = portalCtx.getPortalInfo().toLowerCase()
@@ -93,36 +93,36 @@ public class ApplicationPortlet implements Portlet, Serializable {
request.setAttribute(ApplicationServlet.REQUEST_FRAGMENT,
"true");
- // fixed base theme to use - all portal pages with Vaadin
- // applications will load this exactly once
+ // fixed base theme to use - all portal pages with Vaadin
+ // applications will load this exactly once
String portalTheme = getPortalProperty(
Constants.PORTAL_PARAMETER_VAADIN_THEME, portalCtx);
String portalWidgetset = getPortalProperty(
Constants.PORTAL_PARAMETER_VAADIN_WIDGETSET, portalCtx);
- // location of the widgetset(s) and default theme (to which
- // /VAADIN/widgetsets/...
- // is appended)
+ // location of the widgetset(s) and default theme (to which
+ // /VAADIN/widgetsets/...
+ // is appended)
String portalResourcePath = getPortalProperty(
Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH,
portalCtx);
if (portalResourcePath != null) {
- // if portalResourcePath is defined, set it as a request
- // parameter which will override the default location in
- // servlet
+ // if portalResourcePath is defined, set it as a request
+ // parameter which will override the default location in
+ // servlet
request.setAttribute(
ApplicationServlet.REQUEST_VAADIN_STATIC_FILE_PATH,
portalResourcePath);
}
- // - if the user has specified a widgetset for this portlet, use
- // it from the portlet (not fully supported)
- // - otherwise, if specified, use the portal-wide widgetset
- // and widgetset path settings (recommended)
- // - finally, default to use the default widgetset if nothing
- // else is found
+ // - if the user has specified a widgetset for this portlet, use
+ // it from the portlet (not fully supported)
+ // - otherwise, if specified, use the portal-wide widgetset
+ // and widgetset path settings (recommended)
+ // - finally, default to use the default widgetset if nothing
+ // else is found
if (portletWidgetset != null) {
request.setAttribute(ApplicationServlet.REQUEST_WIDGETSET,
portletWidgetset);
@@ -138,8 +138,8 @@ public class ApplicationPortlet implements Portlet, Serializable {
style);
}
- // portalTheme is only used if the shared portal resource
- // directory is defined
+ // portalTheme is only used if the shared portal resource
+ // directory is defined
if (portalTheme != null && portalResourcePath != null) {
request.setAttribute(
ApplicationServlet.REQUEST_DEFAULT_THEME,
@@ -156,7 +156,7 @@ public class ApplicationPortlet implements Portlet, Serializable {
*/
OutputStream out = response.getPortletOutputStream();
- // Using portal-wide theme
+ // Using portal-wide theme
String loadDefaultTheme = ("<script type=\"text/javascript\">\n"
+ "if(!vaadin) { var vaadin = {} } \n"
+ "if(!vaadin.themesLoaded) { vaadin.themesLoaded = {} } \n"
@@ -220,10 +220,10 @@ public class ApplicationPortlet implements Portlet, Serializable {
}
private String getPortalProperty(String name, PortalContext context) {
- boolean isLifeRay = context.getPortalInfo().toLowerCase().contains(
- "liferay");
+ boolean isLifeRay = context.getPortalInfo().toLowerCase()
+ .contains("liferay");
- // TODO test on non-LifeRay platforms
+ // TODO test on non-LifeRay platforms
String value;
if (isLifeRay) {
diff --git a/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java b/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java
index 3182bfedf9..fc03ff9590 100644
--- a/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java
@@ -106,8 +106,8 @@ public class ApplicationRunnerServlet extends AbstractApplicationServlet {
* context, runner, application classname
*/
private static URIS getApplicationRunnerURIs(HttpServletRequest request) {
- final String[] urlParts = request.getRequestURI().toString().split(
- "\\/");
+ final String[] urlParts = request.getRequestURI().toString()
+ .split("\\/");
String context = null;
String runner = null;
URIS uris = new URIS();
diff --git a/src/com/vaadin/terminal/gwt/server/ChangeVariablesErrorEvent.java b/src/com/vaadin/terminal/gwt/server/ChangeVariablesErrorEvent.java
index e523ad3ca5..b19abe163b 100644
--- a/src/com/vaadin/terminal/gwt/server/ChangeVariablesErrorEvent.java
+++ b/src/com/vaadin/terminal/gwt/server/ChangeVariablesErrorEvent.java
@@ -5,8 +5,8 @@ package com.vaadin.terminal.gwt.server;
import java.util.Map;
-import com.vaadin.ui.Component;
import com.vaadin.ui.AbstractComponent.ComponentErrorEvent;
+import com.vaadin.ui.Component;
@SuppressWarnings("serial")
public class ChangeVariablesErrorEvent implements ComponentErrorEvent {
diff --git a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java
index 4e6bfbd158..c48af80305 100644
--- a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java
+++ b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java
@@ -162,9 +162,10 @@ public class CommunicationManager extends AbstractCommunicationManager {
public void criticalNotification(Request request, Response response,
String cap, String msg, String details, String outOfSyncURL)
throws IOException {
- servlet.criticalNotification((HttpServletRequest) request
- .getWrappedRequest(), (HttpServletResponse) response
- .getWrappedResponse(), cap, msg, details, outOfSyncURL);
+ servlet.criticalNotification(
+ (HttpServletRequest) request.getWrappedRequest(),
+ (HttpServletResponse) response.getWrappedResponse(), cap,
+ msg, details, outOfSyncURL);
}
public String getRequestPathInfo(Request request) {
diff --git a/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java b/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java
index 9c496107a4..4ba0008252 100644
--- a/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java
+++ b/src/com/vaadin/terminal/gwt/server/ComponentSizeValidator.java
@@ -21,6 +21,7 @@ import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Form;
import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.GridLayout.Area;
import com.vaadin.ui.Layout;
import com.vaadin.ui.OrderedLayout;
import com.vaadin.ui.Panel;
@@ -28,7 +29,6 @@ import com.vaadin.ui.SplitPanel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
-import com.vaadin.ui.GridLayout.Area;
@SuppressWarnings("serial")
public class ComponentSizeValidator implements Serializable {
@@ -111,8 +111,7 @@ public class ComponentSizeValidator implements Serializable {
err.append("Layout problem detected: ");
err.append(msg);
err.append("\n");
- err
- .append("Relative sizes were replaced by undefined sizes, components may not render as expected.\n");
+ err.append("Relative sizes were replaced by undefined sizes, components may not render as expected.\n");
errorStream.println(err);
}
diff --git a/src/com/vaadin/terminal/gwt/server/GAEApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/GAEApplicationServlet.java
index 5709bc6a8d..754cc50d13 100644
--- a/src/com/vaadin/terminal/gwt/server/GAEApplicationServlet.java
+++ b/src/com/vaadin/terminal/gwt/server/GAEApplicationServlet.java
@@ -26,11 +26,11 @@ import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.EntityNotFoundException;
+import com.google.appengine.api.datastore.FetchOptions.Builder;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.PreparedQuery;
import com.google.appengine.api.datastore.Query;
-import com.google.appengine.api.datastore.FetchOptions.Builder;
import com.google.appengine.api.datastore.Query.FilterOperator;
import com.google.appengine.api.memcache.Expiration;
import com.google.appengine.api.memcache.MemcacheService;
@@ -177,8 +177,8 @@ public class GAEApplicationServlet extends ApplicationServlet {
if (requestType == RequestType.APPLICATION_RESOURCE) {
// no locking needed, let superclass handle
- getApplicationContext(request, MemcacheServiceFactory
- .getMemcacheService());
+ getApplicationContext(request,
+ MemcacheServiceFactory.getMemcacheService());
super.service(request, response);
cleanSession(request);
return;
@@ -210,9 +210,8 @@ public class GAEApplicationServlet extends ApplicationServlet {
try {
Thread.sleep(RETRY_AFTER_MILLISECONDS);
} catch (InterruptedException e) {
- log
- .info("Thread.sleep() interrupted while waiting for lock. Trying again. "
- + e);
+ log.info("Thread.sleep() interrupted while waiting for lock. Trying again. "
+ + e);
}
}
@@ -221,8 +220,7 @@ public class GAEApplicationServlet extends ApplicationServlet {
// client to retry
response.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
// Note: currently interpreting Retry-After as ms, not sec
- response
- .setHeader("Retry-After", "" + RETRY_AFTER_MILLISECONDS);
+ response.setHeader("Retry-After", "" + RETRY_AFTER_MILLISECONDS);
return;
}
@@ -397,9 +395,7 @@ public class GAEApplicationServlet extends ApplicationServlet {
}
}
} catch (Exception e) {
- log
- .warning("Exception while cleaning: "
- + getStackTraceAsString(e));
+ log.warning("Exception while cleaning: " + getStackTraceAsString(e));
}
}
diff --git a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java
index 91fabc948e..03de2fffd4 100644
--- a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java
+++ b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext.java
@@ -26,7 +26,7 @@ import com.vaadin.Application;
/**
* @author marc
*/
-@SuppressWarnings( { "serial", "unchecked" })
+@SuppressWarnings({ "serial", "unchecked" })
public class PortletApplicationContext extends WebApplicationContext implements
Serializable {
@@ -49,7 +49,7 @@ public class PortletApplicationContext extends WebApplicationContext implements
cx = new PortletApplicationContext();
}
if (!(cx instanceof PortletApplicationContext)) {
- // TODO Should we even try this? And should we leave original as-is?
+ // TODO Should we even try this? And should we leave original as-is?
PortletApplicationContext pcx = new PortletApplicationContext();
pcx.applications.addAll(cx.applications);
cx.applications.clear();
@@ -89,7 +89,7 @@ public class PortletApplicationContext extends WebApplicationContext implements
.iterator(); it.hasNext();) {
Application value = it.next();
if (value == application) {
- // values().iterator() is backed by the map
+ // values().iterator() is backed by the map
it.remove();
}
}
diff --git a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java
index 1ff07479fd..ceb26d1fb1 100644
--- a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java
+++ b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java
@@ -97,9 +97,7 @@ public class PortletApplicationContext2 extends AbstractWebApplicationContext {
.getAttribute(PortletApplicationContext2.class.getName());
if (cx == null) {
cx = new PortletApplicationContext2();
- session
- .setAttribute(PortletApplicationContext2.class.getName(),
- cx);
+ session.setAttribute(PortletApplicationContext2.class.getName(), cx);
}
if (cx.session == null) {
cx.session = session;
diff --git a/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
index 248a75efc9..57226588f9 100644
--- a/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
+++ b/src/com/vaadin/terminal/gwt/server/PortletCommunicationManager.java
@@ -161,9 +161,10 @@ public class PortletCommunicationManager extends AbstractCommunicationManager {
public void criticalNotification(Request request, Response response,
String cap, String msg, String details, String outOfSyncURL)
throws IOException {
- portlet.criticalNotification((PortletRequest) request
- .getWrappedRequest(), (MimeResponse) response
- .getWrappedResponse(), cap, msg, details, outOfSyncURL);
+ portlet.criticalNotification(
+ (PortletRequest) request.getWrappedRequest(),
+ (MimeResponse) response.getWrappedResponse(), cap, msg,
+ details, outOfSyncURL);
}
public String getRequestPathInfo(Request request) {
diff --git a/src/com/vaadin/terminal/gwt/server/RestrictedRenderResponse.java b/src/com/vaadin/terminal/gwt/server/RestrictedRenderResponse.java
index c57a02e111..7422c8abec 100644
--- a/src/com/vaadin/terminal/gwt/server/RestrictedRenderResponse.java
+++ b/src/com/vaadin/terminal/gwt/server/RestrictedRenderResponse.java
@@ -51,8 +51,8 @@ class RestrictedRenderResponse implements RenderResponse, Serializable {
}
public void flushBuffer() throws IOException {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public int getBufferSize() {
@@ -76,12 +76,12 @@ class RestrictedRenderResponse implements RenderResponse, Serializable {
}
public OutputStream getPortletOutputStream() throws IOException {
- // write forbidden
+ // write forbidden
return null;
}
public PrintWriter getWriter() throws IOException {
- // write forbidden
+ // write forbidden
return null;
}
@@ -90,23 +90,23 @@ class RestrictedRenderResponse implements RenderResponse, Serializable {
}
public void reset() {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public void resetBuffer() {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public void setBufferSize(int size) {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public void setContentType(String type) {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public void setProperty(String key, String value) {
@@ -118,8 +118,8 @@ class RestrictedRenderResponse implements RenderResponse, Serializable {
}
public void setNextPossiblePortletModes(Collection<PortletMode> portletModes) {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public ResourceURL createResourceURL() {
@@ -131,17 +131,17 @@ class RestrictedRenderResponse implements RenderResponse, Serializable {
}
public void addProperty(Cookie cookie) {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public void addProperty(String key, Element element) {
- // NOP
- // TODO throw?
+ // NOP
+ // TODO throw?
}
public Element createElement(String tagName) throws DOMException {
- // NOP
+ // NOP
return null;
}
} \ No newline at end of file
diff --git a/src/com/vaadin/terminal/gwt/server/WebApplicationContext.java b/src/com/vaadin/terminal/gwt/server/WebApplicationContext.java
index 1f3ff8befc..116667f582 100644
--- a/src/com/vaadin/terminal/gwt/server/WebApplicationContext.java
+++ b/src/com/vaadin/terminal/gwt/server/WebApplicationContext.java
@@ -41,8 +41,8 @@ public class WebApplicationContext extends AbstractWebApplicationContext {
* @see com.vaadin.service.ApplicationContext#getBaseDirectory()
*/
public File getBaseDirectory() {
- final String realPath = ApplicationServlet.getResourcePath(session
- .getServletContext(), "/");
+ final String realPath = ApplicationServlet.getResourcePath(
+ session.getServletContext(), "/");
if (realPath == null) {
return null;
}
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/AcceptCriteriaFactoryGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/AcceptCriteriaFactoryGenerator.java
index 02faefa3f4..1ba954c611 100644
--- a/src/com/vaadin/terminal/gwt/widgetsetutils/AcceptCriteriaFactoryGenerator.java
+++ b/src/com/vaadin/terminal/gwt/widgetsetutils/AcceptCriteriaFactoryGenerator.java
@@ -10,8 +10,8 @@ import java.util.Date;
import com.google.gwt.core.ext.Generator;
import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.TreeLogger;
-import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.TreeLogger.Type;
+import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
@@ -77,8 +77,7 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
ClassSourceFileComposerFactory composer = null;
composer = new ClassSourceFileComposerFactory(packageName, className);
composer.addImport("com.google.gwt.core.client.GWT");
- composer
- .setSuperclass("com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterionFactory");
+ composer.setSuperclass("com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterionFactory");
SourceWriter sourceWriter = composer.createSourceWriter(context,
printWriter);
@@ -89,8 +88,9 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
sourceWriter.println("}");
// commit generated class
context.commit(logger, printWriter);
- logger.log(Type.INFO, "Done. ("
- + (new Date().getTime() - date.getTime()) / 1000 + "seconds)");
+ logger.log(Type.INFO,
+ "Done. (" + (new Date().getTime() - date.getTime()) / 1000
+ + "seconds)");
}
@@ -106,8 +106,8 @@ public class AcceptCriteriaFactoryGenerator extends Generator {
.getCriterion();
for (Class<? extends AcceptCriterion> class1 : clientSideVerifiableCriterion) {
- logger.log(Type.INFO, "creating mapping for "
- + class1.getCanonicalName());
+ logger.log(Type.INFO,
+ "creating mapping for " + class1.getCanonicalName());
String canonicalName = class1.getCanonicalName();
Class<? extends VAcceptCriterion> clientClass = class1
.getAnnotation(ClientCriterion.class).value();
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java b/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java
index 838b04f909..ea4cbcb663 100644
--- a/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java
+++ b/src/com/vaadin/terminal/gwt/widgetsetutils/ClassPathExplorer.java
@@ -92,7 +92,8 @@ public class ClassPathExplorer {
/**
* Finds server side widgets with {@link ClientWidget} annotation on the
- * class path (entries that can contain widgets/widgetsets - see {@link #getRawClasspathEntries()}).
+ * class path (entries that can contain widgets/widgetsets - see
+ * {@link #getRawClasspathEntries()}).
*
* As a side effect, also accept criteria are searched under the same class
* path entries and added into the acceptCriterion collection.
@@ -188,8 +189,9 @@ public class ClassPathExplorer {
String basePath = location.getFile().replaceAll(
"/" + packagePath + "$", "");
try {
- URL url = new URL(location.getProtocol(), location
- .getHost(), location.getPort(), basePath);
+ URL url = new URL(location.getProtocol(),
+ location.getHost(), location.getPort(),
+ basePath);
widgetsets.put(classname, url);
} catch (MalformedURLException e) {
// should never happen as based on an existing URL,
@@ -388,8 +390,8 @@ public class ClassPathExplorer {
&& !dirs[i].getPath().contains(File.separator + ".")) {
String key = dirs[i].getCanonicalPath() + "/" + name
+ dirs[i].getName();
- locations.put(key, new URL("file://"
- + dirs[i].getCanonicalPath()));
+ locations.put(key,
+ new URL("file://" + dirs[i].getCanonicalPath()));
}
} catch (Exception ioe) {
return;
@@ -473,8 +475,8 @@ public class ClassPathExplorer {
String entryname = entry.getName();
if (!entry.isDirectory()
&& entryname.endsWith(".class")) {
- String classname = entryname.substring(0, entryname
- .length() - 6);
+ String classname = entryname.substring(0,
+ entryname.length() - 6);
if (classname.startsWith("/")) {
classname = classname.substring(1);
}
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java
index b4e5df316c..5fefa68fd8 100644
--- a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java
+++ b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java
@@ -14,8 +14,8 @@ import java.util.TreeSet;
import com.google.gwt.core.ext.Generator;
import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.TreeLogger;
-import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.TreeLogger.Type;
+import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.typeinfo.JClassType;
import com.google.gwt.core.ext.typeinfo.TypeOracle;
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
@@ -107,9 +107,8 @@ public class WidgetMapGenerator extends Generator {
if (printWriter == null) {
return;
}
- logger
- .log(Type.INFO,
- "Detecting Vaadin components in classpath to generate WidgetMapImpl.java ...");
+ logger.log(Type.INFO,
+ "Detecting Vaadin components in classpath to generate WidgetMapImpl.java ...");
Date date = new Date();
// init composer, set class properties, create source writer
@@ -136,8 +135,9 @@ public class WidgetMapGenerator extends Generator {
sourceWriter.println("}");
// commit generated class
context.commit(logger, printWriter);
- logger.log(Type.INFO, "Done. ("
- + (new Date().getTime() - date.getTime()) / 1000 + "seconds)");
+ logger.log(Type.INFO,
+ "Done. (" + (new Date().getTime() - date.getTime()) / 1000
+ + "seconds)");
}
@@ -171,9 +171,8 @@ public class WidgetMapGenerator extends Generator {
}
}
- logger
- .log(Type.INFO,
- "Widget set will contain implementations for following components: ");
+ logger.log(Type.INFO,
+ "Widget set will contain implementations for following components: ");
TreeSet<String> classNames = new TreeSet<String>();
for (Class<? extends Paintable> class1 : paintablesHavingWidgetAnnotation) {
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java
index ccde1719e4..7eaee22073 100644
--- a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java
+++ b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetSetBuilder.java
@@ -189,8 +189,7 @@ public class WidgetSetBuilder {
o.println(" 2. Give the widgetsetname (to be created or updated)"
+ " as first parameter");
o.println();
- o
- .println("All found vaadin widgetsets will be inherited in given widgetset");
+ o.println("All found vaadin widgetsets will be inherited in given widgetset");
}
diff --git a/src/com/vaadin/tools/WidgetsetCompiler.java b/src/com/vaadin/tools/WidgetsetCompiler.java
index ad1c5cfcd2..ab5e4ad9d3 100644
--- a/src/com/vaadin/tools/WidgetsetCompiler.java
+++ b/src/com/vaadin/tools/WidgetsetCompiler.java
@@ -37,23 +37,23 @@ public class WidgetsetCompiler {
*/
public static void main(final String[] args) {
try {
- // run the compiler in a different thread to enable using the
- // user-set stack size
+ // run the compiler in a different thread to enable using the
+ // user-set stack size
- // on Windows, the default stack size is too small for the main
- // thread and cannot be changed in JRE 1.5 (see
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6316197)
+ // on Windows, the default stack size is too small for the main
+ // thread and cannot be changed in JRE 1.5 (see
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6316197)
Runnable runCompiler = new Runnable() {
public void run() {
try {
- // GWTCompiler.main(args);
- // avoid warnings
+ // GWTCompiler.main(args);
+ // avoid warnings
String wsname = args[args.length - 1];
- // TODO expecting this is launched via eclipse WTP
- // project
+ // TODO expecting this is launched via eclipse WTP
+ // project
System.out
.println("Updating GWT module description file...");
WidgetSetBuilder.updateWidgetSet(wsname);
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java
index 0875355c73..78e73845ad 100644
--- a/src/com/vaadin/ui/AbstractComponent.java
+++ b/src/com/vaadin/ui/AbstractComponent.java
@@ -320,7 +320,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
* InlineDateField date = new InlineDateField(&quot;Datum&quot;);
*
* // German language specified with ISO 639-1 language
- * // code and ISO 3166-1 alpha-2 country code.
+ * // code and ISO 3166-1 alpha-2 country code.
* date.setLocale(new Locale(&quot;de&quot;, &quot;DE&quot;));
*
* date.setResolution(DateField.RESOLUTION_DAY);
@@ -735,8 +735,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource
}
if (eventIdentifiers != null) {
- target.addAttribute("eventListeners", eventIdentifiers
- .toArray());
+ target.addAttribute("eventListeners",
+ eventIdentifiers.toArray());
}
paintContent(target);
diff --git a/src/com/vaadin/ui/AbstractLayout.java b/src/com/vaadin/ui/AbstractLayout.java
index ce4b3e40c7..5cb698e688 100644
--- a/src/com/vaadin/ui/AbstractLayout.java
+++ b/src/com/vaadin/ui/AbstractLayout.java
@@ -59,9 +59,7 @@ public abstract class AbstractLayout extends AbstractComponentContainer
*/
public void setMargin(boolean topEnabled, boolean rightEnabled,
boolean bottomEnabled, boolean leftEnabled) {
- margins
- .setMargins(topEnabled, rightEnabled, bottomEnabled,
- leftEnabled);
+ margins.setMargins(topEnabled, rightEnabled, bottomEnabled, leftEnabled);
requestRepaint();
}
diff --git a/src/com/vaadin/ui/Component.java b/src/com/vaadin/ui/Component.java
index cfc648d9b0..4dcd81da31 100644
--- a/src/com/vaadin/ui/Component.java
+++ b/src/com/vaadin/ui/Component.java
@@ -473,9 +473,9 @@ public interface Component extends Paintable, VariableOwner, Sizeable,
* </p>
*
* @param caption
- * the new caption for the component. If the caption is {@code
- * null}, no caption is shown and it does not normally take any
- * space
+ * the new caption for the component. If the caption is
+ * {@code null}, no caption is shown and it does not normally
+ * take any space
*/
public void setCaption(String caption);
@@ -533,10 +533,10 @@ public interface Component extends Paintable, VariableOwner, Sizeable,
* </p>
*
* <p>
- * An icon will be rendered inside an HTML element that has the {@code
- * v-icon} CSS style class. The containing layout may enclose an icon and a
- * caption inside elements related to the caption, such as {@code v-caption}
- * .
+ * An icon will be rendered inside an HTML element that has the
+ * {@code v-icon} CSS style class. The containing layout may enclose an icon
+ * and a caption inside elements related to the caption, such as
+ * {@code v-caption} .
* </p>
*
* This method will trigger a
@@ -1075,7 +1075,7 @@ public interface Component extends Paintable, VariableOwner, Sizeable,
*
* username.setTabIndex(1);
* password.setTabIndex(2);
- * remember.setTabIndex(3); // Different than natural place
+ * remember.setTabIndex(3); // Different than natural place
* login.setTabIndex(4);
* </pre>
*
diff --git a/src/com/vaadin/ui/CssLayout.java b/src/com/vaadin/ui/CssLayout.java
index 59d13c137f..673003175c 100644
--- a/src/com/vaadin/ui/CssLayout.java
+++ b/src/com/vaadin/ui/CssLayout.java
@@ -33,7 +33,7 @@ import com.vaadin.terminal.gwt.client.ui.VCssLayout;
* <li>noticeably faster rendering time in some situations as we rely more on
* the browser's rendering engine.
* </ul>
- *<p>
+ * <p>
* With {@link CustomLayout} one can often achieve similar results (good looking
* layouts with web technologies), but with CustomLayout developer needs to work
* with fixed templates.
diff --git a/src/com/vaadin/ui/DragAndDropWrapper.java b/src/com/vaadin/ui/DragAndDropWrapper.java
index 2421e43401..87ff571f36 100644
--- a/src/com/vaadin/ui/DragAndDropWrapper.java
+++ b/src/com/vaadin/ui/DragAndDropWrapper.java
@@ -266,8 +266,8 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
throws UploadException {
Html5File file = receivers.get(fileId);
if (file != null && file.receiver != null) {
- OutputStream receiveUpload = file.receiver.receiveUpload(file
- .getFileName(), "TODO");
+ OutputStream receiveUpload = file.receiver.receiveUpload(
+ file.getFileName(), "TODO");
InputStream stream = upstream.getStream();
byte[] buf = new byte[AbstractApplicationServlet.MAX_BUFFER_SIZE];
diff --git a/src/com/vaadin/ui/Form.java b/src/com/vaadin/ui/Form.java
index 30cd546b4b..c79b62e539 100644
--- a/src/com/vaadin/ui/Form.java
+++ b/src/com/vaadin/ui/Form.java
@@ -682,8 +682,9 @@ public class Form extends AbstractField implements Item.Editor, Buffered, Item,
* @see com.vaadin.data.Item.Viewer#setItemDataSource(Item)
*/
public void setItemDataSource(Item newDataSource) {
- setItemDataSource(newDataSource, newDataSource != null ? newDataSource
- .getItemPropertyIds() : null);
+ setItemDataSource(newDataSource,
+ newDataSource != null ? newDataSource.getItemPropertyIds()
+ : null);
}
/**
@@ -782,8 +783,8 @@ public class Form extends AbstractField implements Item.Editor, Buffered, Item,
Field f = getField(properties[i]);
layout.removeComponent(f);
if (newLayout instanceof CustomLayout) {
- ((CustomLayout) newLayout).addComponent(f, properties[i]
- .toString());
+ ((CustomLayout) newLayout).addComponent(f,
+ properties[i].toString());
} else {
newLayout.addComponent(f);
}
@@ -832,8 +833,7 @@ public class Form extends AbstractField implements Item.Editor, Buffered, Item,
+ propertyId.toString() + "' can not be found.");
}
final Object value = oldField.getPropertyDataSource() == null ? oldField
- .getValue()
- : oldField.getPropertyDataSource().getValue();
+ .getValue() : oldField.getPropertyDataSource().getValue();
// Checks that the value exists and check if the select should
// be forced in multiselect mode
diff --git a/src/com/vaadin/ui/FormLayout.java b/src/com/vaadin/ui/FormLayout.java
index 4b42f0d8fb..97b5b0c7fc 100644
--- a/src/com/vaadin/ui/FormLayout.java
+++ b/src/com/vaadin/ui/FormLayout.java
@@ -21,7 +21,7 @@ import com.vaadin.terminal.gwt.client.ui.VFormLayout;
* bottom are by default on.
*
*/
-@SuppressWarnings( { "deprecation", "serial" })
+@SuppressWarnings({ "deprecation", "serial" })
@ClientWidget(VFormLayout.class)
public class FormLayout extends OrderedLayout {
diff --git a/src/com/vaadin/ui/GridLayout.java b/src/com/vaadin/ui/GridLayout.java
index b7e92402cc..51610912d1 100644
--- a/src/com/vaadin/ui/GridLayout.java
+++ b/src/com/vaadin/ui/GridLayout.java
@@ -18,6 +18,7 @@ import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.gwt.client.MouseEventDetails;
import com.vaadin.terminal.gwt.client.ui.VGridLayout;
+import com.vaadin.ui.GridLayout.OverlapsException;
/**
* <p>
@@ -1074,8 +1075,9 @@ public class GridLayout extends AbstractLayout implements
addComponent(newComponent);
} else if (newLocation == null) {
removeComponent(oldComponent);
- addComponent(newComponent, oldLocation.getColumn1(), oldLocation
- .getRow1(), oldLocation.getColumn2(), oldLocation.getRow2());
+ addComponent(newComponent, oldLocation.getColumn1(),
+ oldLocation.getRow1(), oldLocation.getColumn2(),
+ oldLocation.getRow2());
} else {
oldLocation.setComponent(newComponent);
newLocation.setComponent(oldComponent);
diff --git a/src/com/vaadin/ui/Layout.java b/src/com/vaadin/ui/Layout.java
index f735b86023..df4798b0c2 100644
--- a/src/com/vaadin/ui/Layout.java
+++ b/src/com/vaadin/ui/Layout.java
@@ -6,8 +6,8 @@ package com.vaadin.ui;
import java.io.Serializable;
-import com.vaadin.terminal.gwt.client.ui.VMarginInfo;
import com.vaadin.terminal.gwt.client.ui.AlignmentInfo.Bits;
+import com.vaadin.terminal.gwt.client.ui.VMarginInfo;
/**
* Extension to the {@link ComponentContainer} interface which adds the
diff --git a/src/com/vaadin/ui/Panel.java b/src/com/vaadin/ui/Panel.java
index 3c9ac71645..9a3d24a53d 100644
--- a/src/com/vaadin/ui/Panel.java
+++ b/src/com/vaadin/ui/Panel.java
@@ -8,8 +8,8 @@ import java.util.Iterator;
import java.util.Map;
import com.vaadin.event.Action;
-import com.vaadin.event.ActionManager;
import com.vaadin.event.Action.Handler;
+import com.vaadin.event.ActionManager;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
import com.vaadin.terminal.PaintException;
@@ -191,10 +191,8 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
// detach old content if present
if (content != null) {
content.setParent(null);
- content
- .removeListener((ComponentContainer.ComponentAttachListener) this);
- content
- .removeListener((ComponentContainer.ComponentDetachListener) this);
+ content.removeListener((ComponentContainer.ComponentAttachListener) this);
+ content.removeListener((ComponentContainer.ComponentDetachListener) this);
}
// Sets the panel to be parent for the content
diff --git a/src/com/vaadin/ui/PopupView.java b/src/com/vaadin/ui/PopupView.java
index 93208d84d2..7879b04ee4 100644
--- a/src/com/vaadin/ui/PopupView.java
+++ b/src/com/vaadin/ui/PopupView.java
@@ -47,8 +47,7 @@ public class PopupView extends AbstractComponentContainer {
* {@link PopupView#getComponentIterator()}.
*/
private static class SingleComponentIterator implements
- Iterator<Component>,
- Serializable {
+ Iterator<Component>, Serializable {
private final Component component;
private boolean first;
diff --git a/src/com/vaadin/ui/Select.java b/src/com/vaadin/ui/Select.java
index 0f33529714..bd7ec39bdb 100644
--- a/src/com/vaadin/ui/Select.java
+++ b/src/com/vaadin/ui/Select.java
@@ -283,8 +283,7 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
int index = options.indexOf(selection);
if (index != -1 && (index < first || index >= last)) {
int newPage = (index + (needNullSelectOption ? 1
- : 0))
- / pageLength;
+ : 0)) / pageLength;
currentPage = newPage;
return sanitetizeList(options, needNullSelectOption);
}
diff --git a/src/com/vaadin/ui/Slider.java b/src/com/vaadin/ui/Slider.java
index 7d06b8075a..55ff48b48a 100644
--- a/src/com/vaadin/ui/Slider.java
+++ b/src/com/vaadin/ui/Slider.java
@@ -41,7 +41,7 @@ import com.vaadin.terminal.gwt.client.ui.VSlider;
* setVolume(d.doubleValue());
* }
* }
- *
+ *
* </code>
*
* @author IT Mill Ltd.
@@ -408,8 +408,8 @@ public class Slider extends AbstractField {
target.addAttribute("resolution", resolution);
if (resolution > 0) {
- target.addVariable(this, "value", ((Double) getValue())
- .doubleValue());
+ target.addVariable(this, "value",
+ ((Double) getValue()).doubleValue());
} else {
target.addVariable(this, "value", ((Double) getValue()).intValue());
}
diff --git a/src/com/vaadin/ui/TabSheet.java b/src/com/vaadin/ui/TabSheet.java
index db8178ed07..d25e68a7f9 100644
--- a/src/com/vaadin/ui/TabSheet.java
+++ b/src/com/vaadin/ui/TabSheet.java
@@ -21,6 +21,8 @@ import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.gwt.client.ui.VTabsheet;
import com.vaadin.terminal.gwt.server.CommunicationManager;
+import com.vaadin.ui.TabSheet.CloseHandler;
+import com.vaadin.ui.TabSheet.Tab;
import com.vaadin.ui.themes.Reindeer;
import com.vaadin.ui.themes.Runo;
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index 2ee80d7430..1f0200b583 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -24,9 +24,9 @@ import com.vaadin.data.Property;
import com.vaadin.data.util.ContainerOrderedWrapper;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.event.Action;
+import com.vaadin.event.Action.Handler;
import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.Action.Handler;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.event.ItemClickEvent.ItemClickSource;
import com.vaadin.event.MouseEvents.ClickEvent;
@@ -553,8 +553,7 @@ public class Table extends AbstractSelect implements Action.Container,
this.columnHeaders.clear();
int i = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext()
- && i < columnHeaders.length; i++) {
+ .hasNext() && i < columnHeaders.length; i++) {
this.columnHeaders.put(it.next(), columnHeaders[i]);
}
@@ -617,8 +616,7 @@ public class Table extends AbstractSelect implements Action.Container,
this.columnIcons.clear();
int i = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext()
- && i < columnIcons.length; i++) {
+ .hasNext() && i < columnIcons.length; i++) {
this.columnIcons.put(it.next(), columnIcons[i]);
}
@@ -698,8 +696,7 @@ public class Table extends AbstractSelect implements Action.Container,
final HashMap<Object, String> newCA = new HashMap<Object, String>();
int i = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext()
- && i < columnAlignments.length; i++) {
+ .hasNext() && i < columnAlignments.length; i++) {
newCA.put(it.next(), columnAlignments[i]);
}
this.columnAlignments = newCA;
@@ -714,7 +711,7 @@ public class Table extends AbstractSelect implements Action.Container,
* small or very big values. Setting width to -1 (default) means that theme
* will make decision of width.
*
- *<p>
+ * <p>
* Column can either have a fixed width or expand ratio. The latter one set
* is used. See @link {@link #setColumnExpandRatio(Object, float)}.
*
@@ -2075,8 +2072,8 @@ public class Table extends AbstractSelect implements Action.Container,
// Actions
if (variables.containsKey("action")) {
- final StringTokenizer st = new StringTokenizer((String) variables
- .get("action"), ",");
+ final StringTokenizer st = new StringTokenizer(
+ (String) variables.get("action"), ",");
if (st.countTokens() == 2) {
final Object itemId = itemIdMapper.get(st.nextToken());
final Action action = (Action) actionMapper.get(st.nextToken());
@@ -2337,8 +2334,7 @@ public class Table extends AbstractSelect implements Action.Container,
final boolean[] iscomponent = new boolean[visibleColumns.size()];
int iscomponentIndex = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext()
- && iscomponentIndex < iscomponent.length;) {
+ .hasNext() && iscomponentIndex < iscomponent.length;) {
final Object columnId = it.next();
if (columnGenerators.containsKey(columnId)) {
iscomponent[iscomponentIndex++] = true;
@@ -2383,8 +2379,8 @@ public class Table extends AbstractSelect implements Action.Container,
// The select variable is only enabled if selectable
if (selectable) {
- target.addVariable(this, "selected", selectedKeys
- .toArray(new String[selectedKeys.size()]));
+ target.addVariable(this, "selected",
+ selectedKeys.toArray(new String[selectedKeys.size()]));
}
// The cursors are only shown on pageable table
@@ -2394,8 +2390,8 @@ public class Table extends AbstractSelect implements Action.Container,
// Sorting
if (getContainerDataSource() instanceof Container.Sortable) {
- target.addVariable(this, "sortcolumn", columnIdMap
- .key(sortContainerPropertyId));
+ target.addVariable(this, "sortcolumn",
+ columnIdMap.key(sortContainerPropertyId));
target.addVariable(this, "sortascending", sortAscending);
}
@@ -2429,8 +2425,7 @@ public class Table extends AbstractSelect implements Action.Container,
final String[] colorder = new String[visibleColumns.size()];
int i = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext()
- && i < colorder.length;) {
+ .hasNext() && i < colorder.length;) {
colorder[i++] = columnIdMap.key(it.next());
}
target.addVariable(this, "columnorder", colorder);
@@ -2448,8 +2443,7 @@ public class Table extends AbstractSelect implements Action.Container,
final String[] collapsedkeys = new String[ccs.size()];
int nextColumn = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
- .hasNext()
- && nextColumn < collapsedkeys.length;) {
+ .hasNext() && nextColumn < collapsedkeys.length;) {
final Object columnId = it.next();
if (isColumnCollapsed(columnId)) {
collapsedkeys[nextColumn++] = columnIdMap.key(columnId);
@@ -2485,8 +2479,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
if (columnWidths.containsKey(columnId)) {
if (getColumnWidth(columnId) > -1) {
- target.addAttribute("width", String
- .valueOf(getColumnWidth(columnId)));
+ target.addAttribute("width",
+ String.valueOf(getColumnWidth(columnId)));
} else {
target.addAttribute("er",
getColumnExpandRatio(columnId));
@@ -2542,8 +2536,7 @@ public class Table extends AbstractSelect implements Action.Container,
c.paint(target);
}
} else {
- target
- .addText((String) cells[CELL_FIRSTCOL + currentColumn][indexInRowbuffer]);
+ target.addText((String) cells[CELL_FIRSTCOL + currentColumn][indexInRowbuffer]);
}
}
@@ -2557,8 +2550,8 @@ public class Table extends AbstractSelect implements Action.Container,
paintRowIcon(target, cells, indexInRowbuffer);
paintRowHeader(target, cells, indexInRowbuffer);
- target.addAttribute("key", Integer
- .parseInt(cells[CELL_KEY][indexInRowbuffer].toString()));
+ target.addAttribute("key",
+ Integer.parseInt(cells[CELL_KEY][indexInRowbuffer].toString()));
if (isSelected(itemId)) {
target.addAttribute("selected", true);
@@ -3697,8 +3690,8 @@ public class Table extends AbstractSelect implements Action.Container,
AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent
.getTargetDetails();
table = (Table) dragEvent.getTargetDetails().getTarget();
- ArrayList<Object> visibleItemIds = new ArrayList<Object>(table
- .getPageLength());
+ ArrayList<Object> visibleItemIds = new ArrayList<Object>(
+ table.getPageLength());
visibleItemIds.size();
Object id = table.getCurrentPageFirstItemId();
for (int i = 0; i < table.getPageLength() && id != null; i++) {
diff --git a/src/com/vaadin/ui/Tree.java b/src/com/vaadin/ui/Tree.java
index 4e7fda5d88..505f37a783 100644
--- a/src/com/vaadin/ui/Tree.java
+++ b/src/com/vaadin/ui/Tree.java
@@ -25,9 +25,9 @@ import com.vaadin.data.util.IndexedContainer;
import com.vaadin.event.Action;
import com.vaadin.event.DataBoundTransferable;
import com.vaadin.event.ItemClickEvent;
-import com.vaadin.event.Transferable;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.event.ItemClickEvent.ItemClickSource;
+import com.vaadin.event.Transferable;
import com.vaadin.event.dd.DragAndDropEvent;
import com.vaadin.event.dd.DragSource;
import com.vaadin.event.dd.DropHandler;
@@ -436,8 +436,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
// Actions
if (variables.containsKey("action")) {
- final StringTokenizer st = new StringTokenizer((String) variables
- .get("action"), ",");
+ final StringTokenizer st = new StringTokenizer(
+ (String) variables.get("action"), ",");
if (st.countTokens() == 2) {
final Object itemId = itemIdMapper.get(st.nextToken());
final Action action = (Action) actionMapper.get(st.nextToken());
@@ -508,8 +508,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
target.addAttribute("selectmode", (isMultiSelect() ? "multi"
: "single"));
if (isMultiSelect()) {
- target.addAttribute("multiselectmode", multiSelectMode
- .ordinal());
+ target.addAttribute("multiselectmode",
+ multiSelectMode.ordinal());
}
} else {
target.addAttribute("selectmode", "none");
@@ -661,8 +661,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
partialUpdate = false;
} else {
// Selected
- target.addVariable(this, "selected", selectedKeys
- .toArray(new String[selectedKeys.size()]));
+ target.addVariable(this, "selected",
+ selectedKeys.toArray(new String[selectedKeys.size()]));
// Expand and collapse
target.addVariable(this, "expand", new String[] {});
diff --git a/src/com/vaadin/ui/Window.java b/src/com/vaadin/ui/Window.java
index b1b26e2807..8e407fe5ad 100644
--- a/src/com/vaadin/ui/Window.java
+++ b/src/com/vaadin/ui/Window.java
@@ -18,9 +18,9 @@ import java.util.Set;
import com.vaadin.Application;
import com.vaadin.event.ShortcutAction;
-import com.vaadin.event.ShortcutListener;
import com.vaadin.event.ShortcutAction.KeyCode;
import com.vaadin.event.ShortcutAction.ModifierKey;
+import com.vaadin.event.ShortcutListener;
import com.vaadin.terminal.DownloadStream;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
@@ -37,8 +37,8 @@ import com.vaadin.terminal.gwt.client.ui.VWindow;
* <p>
* If the window is a application window or a sub window depends on how it is
* added to the application. Adding a {@code Window} to a {@code Window} using
- * {@link Window#addWindow(Window)} makes it a sub window and adding a {@code
- * Window} to the {@code Application} using
+ * {@link Window#addWindow(Window)} makes it a sub window and adding a
+ * {@code Window} to the {@code Application} using
* {@link Application#addWindow(Window)} makes it an application window.
* </p>
* <p>
@@ -378,8 +378,8 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
* <b>Application window only</b>. Handles an URI by passing the URI to all
* URI handlers defined using {@link #addURIHandler(URIHandler)}. All URI
* handlers are called for each URI but no more than one handler may return
- * a {@link DownloadStream}. If more than one stream is returned a {@code
- * RuntimeException} is thrown.
+ * a {@link DownloadStream}. If more than one stream is returned a
+ * {@code RuntimeException} is thrown.
*
* @param context
* The URL of the application
@@ -470,8 +470,8 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
/**
* <b>Application window only</b>. Handles parameters by passing the
* parameters to all {@code ParameterHandler}s defined using
- * {@link #addParameterHandler(ParameterHandler)}. All {@code
- * ParameterHandler}s are called for each set of parameters.
+ * {@link #addParameterHandler(ParameterHandler)}. All
+ * {@code ParameterHandler}s are called for each set of parameters.
*
* @param parameters
* a map containing the parameter names and values
@@ -822,10 +822,10 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
* name of the window is used to uniquely identify it.
* <p>
* The name also determines the URL that can be used for direct access to a
- * window. All windows can be accessed through {@code
- * http://host:port/app/win} where {@code http://host:port/app} is the
- * application URL (as returned by {@link Application#getURL()} and {@code
- * win} is the window name.
+ * window. All windows can be accessed through
+ * {@code http://host:port/app/win} where {@code http://host:port/app} is
+ * the application URL (as returned by {@link Application#getURL()} and
+ * {@code win} is the window name.
* </p>
* <p>
* Note! Portlets do not support direct window access through URLs.
@@ -908,10 +908,10 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
* application.
* <p>
* The name also determines the URL that can be used for direct access to a
- * window. All windows can be accessed through {@code
- * http://host:port/app/win} where {@code http://host:port/app} is the
- * application URL (as returned by {@link Application#getURL()} and {@code
- * win} is the window name.
+ * window. All windows can be accessed through
+ * {@code http://host:port/app/win} where {@code http://host:port/app} is
+ * the application URL (as returned by {@link Application#getURL()} and
+ * {@code win} is the window name.
* </p>
* <p>
* This method can only be called before the window is added to an