From 789c80e2537d800f029734184975c13464f116a8 Mon Sep 17 00:00:00 2001
From: Artur Signell
Date: Mon, 16 Aug 2010 04:36:37 +0000
Subject: Formatted using Eclipse Helios / Windows XP
svn changeset:14496/svn branch:6.4
---
src/com/vaadin/data/Buffered.java | 3 +-
src/com/vaadin/data/Validator.java | 1 +
src/com/vaadin/data/util/DefaultItemSorter.java | 6 +-
src/com/vaadin/data/util/Filter.java | 4 +-
src/com/vaadin/data/util/IndexedContainer.java | 15 +--
src/com/vaadin/data/util/PropertysetItem.java | 3 +-
src/com/vaadin/data/util/QueryContainer.java | 4 +-
src/com/vaadin/event/MouseEvents.java | 1 +
.../dd/acceptcriteria/ContainsDataFlavor.java | 4 +-
src/com/vaadin/launcher/util/BrowserLauncher.java | 4 +-
src/com/vaadin/terminal/ClassResource.java | 6 +-
.../terminal/gwt/client/ApplicationConnection.java | 63 +++++-----
.../gwt/client/ClientExceptionHandler.java | 4 +-
.../terminal/gwt/client/ComponentLocator.java | 8 +-
.../terminal/gwt/client/DateTimeService.java | 6 +-
.../terminal/gwt/client/RenderInformation.java | 4 +-
src/com/vaadin/terminal/gwt/client/Util.java | 4 +-
src/com/vaadin/terminal/gwt/client/VCaption.java | 3 +-
.../vaadin/terminal/gwt/client/VDebugConsole.java | 8 +-
.../vaadin/terminal/gwt/client/VErrorMessage.java | 8 +-
.../terminal/gwt/client/ui/ClickEventHandler.java | 22 ++--
src/com/vaadin/terminal/gwt/client/ui/MenuBar.java | 10 +-
.../gwt/client/ui/ShortcutActionHandler.java | 4 +-
.../terminal/gwt/client/ui/VAbsoluteLayout.java | 2 +-
.../vaadin/terminal/gwt/client/ui/VAccordion.java | 12 +-
.../terminal/gwt/client/ui/VCalendarPanel.java | 28 ++---
.../vaadin/terminal/gwt/client/ui/VCssLayout.java | 12 +-
.../terminal/gwt/client/ui/VCustomLayout.java | 12 +-
.../gwt/client/ui/VDragAndDropWrapper.java | 8 +-
.../vaadin/terminal/gwt/client/ui/VEmbedded.java | 4 +-
src/com/vaadin/terminal/gwt/client/ui/VForm.java | 10 +-
.../vaadin/terminal/gwt/client/ui/VFormLayout.java | 16 +--
.../vaadin/terminal/gwt/client/ui/VGridLayout.java | 12 +-
.../vaadin/terminal/gwt/client/ui/VListSelect.java | 4 +-
.../vaadin/terminal/gwt/client/ui/VMenuBar.java | 33 +++--
.../terminal/gwt/client/ui/VNativeSelect.java | 4 +-
.../terminal/gwt/client/ui/VOptionGroupBase.java | 4 +-
.../terminal/gwt/client/ui/VOrderedLayout.java | 134 ++++++++++-----------
.../vaadin/terminal/gwt/client/ui/VOverlay.java | 18 ++-
src/com/vaadin/terminal/gwt/client/ui/VPanel.java | 4 +-
.../terminal/gwt/client/ui/VPopupCalendar.java | 4 +-
.../vaadin/terminal/gwt/client/ui/VPopupView.java | 2 +-
.../terminal/gwt/client/ui/VScrollTable.java | 124 +++++++++----------
src/com/vaadin/terminal/gwt/client/ui/VSlider.java | 29 ++---
.../vaadin/terminal/gwt/client/ui/VSplitPanel.java | 4 +-
.../terminal/gwt/client/ui/VTablePaging.java | 27 +++--
.../vaadin/terminal/gwt/client/ui/VTabsheet.java | 14 +--
.../terminal/gwt/client/ui/VTextualDate.java | 5 +-
.../terminal/gwt/client/ui/VTwinColSelect.java | 10 +-
src/com/vaadin/terminal/gwt/client/ui/VUpload.java | 6 +-
src/com/vaadin/terminal/gwt/client/ui/VView.java | 6 +-
src/com/vaadin/terminal/gwt/client/ui/VWindow.java | 32 +++--
.../gwt/client/ui/dd/VDragAndDropManager.java | 6 +-
.../terminal/gwt/client/ui/dd/VDragEvent.java | 2 +-
.../gwt/client/ui/layout/CellBasedLayout.java | 9 +-
.../client/ui/layout/ChildComponentContainer.java | 15 ++-
.../client/ui/richtextarea/VRichTextToolbar.java | 24 ++--
.../gwt/server/AbstractApplicationPortlet.java | 57 +++++----
.../gwt/server/AbstractApplicationServlet.java | 98 +++++++--------
.../gwt/server/AbstractCommunicationManager.java | 33 ++---
.../gwt/server/AbstractWebApplicationContext.java | 26 ++--
.../terminal/gwt/server/ApplicationPortlet.java | 58 ++++-----
.../gwt/server/ApplicationRunnerServlet.java | 4 +-
.../gwt/server/ChangeVariablesErrorEvent.java | 2 +-
.../terminal/gwt/server/CommunicationManager.java | 7 +-
.../gwt/server/ComponentSizeValidator.java | 5 +-
.../terminal/gwt/server/GAEApplicationServlet.java | 18 ++-
.../gwt/server/PortletApplicationContext.java | 6 +-
.../gwt/server/PortletApplicationContext2.java | 4 +-
.../gwt/server/PortletCommunicationManager.java | 7 +-
.../gwt/server/RestrictedRenderResponse.java | 38 +++---
.../terminal/gwt/server/WebApplicationContext.java | 4 +-
.../AcceptCriteriaFactoryGenerator.java | 14 +--
.../gwt/widgetsetutils/ClassPathExplorer.java | 16 +--
.../gwt/widgetsetutils/WidgetMapGenerator.java | 17 ++-
.../gwt/widgetsetutils/WidgetSetBuilder.java | 3 +-
src/com/vaadin/tools/WidgetsetCompiler.java | 18 +--
src/com/vaadin/ui/AbstractComponent.java | 6 +-
src/com/vaadin/ui/AbstractLayout.java | 4 +-
src/com/vaadin/ui/Component.java | 16 +--
src/com/vaadin/ui/CssLayout.java | 2 +-
src/com/vaadin/ui/DragAndDropWrapper.java | 4 +-
src/com/vaadin/ui/Form.java | 12 +-
src/com/vaadin/ui/FormLayout.java | 2 +-
src/com/vaadin/ui/GridLayout.java | 6 +-
src/com/vaadin/ui/Layout.java | 2 +-
src/com/vaadin/ui/Panel.java | 8 +-
src/com/vaadin/ui/PopupView.java | 3 +-
src/com/vaadin/ui/Select.java | 3 +-
src/com/vaadin/ui/Slider.java | 6 +-
src/com/vaadin/ui/TabSheet.java | 2 +
src/com/vaadin/ui/Table.java | 49 ++++----
src/com/vaadin/ui/Tree.java | 14 +--
src/com/vaadin/ui/Window.java | 30 ++---
94 files changed, 694 insertions(+), 741 deletions(-)
(limited to 'src')
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.
- *
+ *
* 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.
- *
+ *
*
* @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() + "\">");
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("");
if (item.hasAttribute("icon")) {
- itemHTML
- .append("");
+ itemHTML.append("");
}
itemHTML.append(Util.escapeHTML(itemText) + "");
@@ -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 uidlWidgets = new ArrayList(uidl
- .getChildCount());
+ ArrayList uidlWidgets = new ArrayList(
+ uidl.getChildCount());
ArrayList relativeSizeComponents = new ArrayList();
ArrayList relativeSizeComponentUIDL = new ArrayList();
@@ -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 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 {
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 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 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 = "" + 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("
");
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('');\n");
+ writer.write("document.write('');\n");
writer.write("document.write(\"\n");
}
@@ -1858,12 +1852,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
// inactivity
page.write("\n");
+ page.write("setTimeout('if (typeof " + widgetset.replace('.', '_')
+ + " == \"undefined\") {alert(\"Failed to load the widgetset: "
+ + widgetsetFilePath + "\")};',15000);\n" + "//]]>\n\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("\n");
+ page.write("\n");
page.write("");
// Add favicon links
- page
- .write("");
- page
- .write("");
+ page.write("");
+ page.write("");
page.write("" + 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();
- 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 = ("