summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-11-29 19:43:57 +0200
committerVaadin Code Review <review@vaadin.com>2012-12-05 09:58:20 +0000
commit82b07652e8f7795f441551893d0d864ce2754271 (patch)
tree65774161c4224573b3f4ed4d4e7bd4d4b5d0f5de /client
parent4961f541a6ddeb0e94821ab8d2e279e7e1f55986 (diff)
downloadvaadin-framework-82b07652e8f7795f441551893d0d864ce2754271.tar.gz
vaadin-framework-82b07652e8f7795f441551893d0d864ce2754271.zip
Deprecated methods which do nothing and removed dead code (#10432)
Change-Id: I5248a28289bc85cf737b43c7ac87f1b2c2e41a01
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ApplicationConnection.java60
-rw-r--r--client/src/com/vaadin/client/ContainerResizedListener.java7
-rw-r--r--client/src/com/vaadin/client/ui/VAccordion.java7
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java17
-rw-r--r--client/src/com/vaadin/client/ui/VTabsheet.java7
-rw-r--r--client/src/com/vaadin/client/ui/VWindow.java11
-rw-r--r--client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java9
7 files changed, 20 insertions, 98 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java
index 86ef6b0542..e5c7011436 100644
--- a/client/src/com/vaadin/client/ApplicationConnection.java
+++ b/client/src/com/vaadin/client/ApplicationConnection.java
@@ -2615,20 +2615,14 @@ public class ApplicationConnection {
return result.toString();
}
- private boolean runningLayout = false;
-
/**
- * Causes a re-calculation/re-layout of all paintables in a container.
+ * Does absolutely nothing. Replaced by {@link LayoutManager}.
*
* @param container
+ * @deprecated As of 7.0, serves no purpose
*/
+ @Deprecated
public void runDescendentsLayout(HasWidgets container) {
- if (runningLayout) {
- return;
- }
- runningLayout = true;
- internalRunDescendentsLayout(container);
- runningLayout = false;
}
/**
@@ -2643,54 +2637,26 @@ public class ApplicationConnection {
VConsole.log("forceLayout in " + duration.elapsedMillis() + " ms");
}
- private void internalRunDescendentsLayout(HasWidgets container) {
- // getConsole().log(
- // "runDescendentsLayout(" + Util.getSimpleName(container) + ")");
- final Iterator<Widget> childWidgets = container.iterator();
- while (childWidgets.hasNext()) {
- final Widget child = childWidgets.next();
-
- if (getConnectorMap().isConnector(child)) {
-
- if (handleComponentRelativeSize(child)) {
- /*
- * Only need to propagate event if "child" has a relative
- * size
- */
-
- if (child instanceof ContainerResizedListener) {
- ((ContainerResizedListener) child).iLayout();
- }
-
- if (child instanceof HasWidgets) {
- final HasWidgets childContainer = (HasWidgets) child;
- internalRunDescendentsLayout(childContainer);
- }
- }
- } else if (child instanceof HasWidgets) {
- // propagate over non Paintable HasWidgets
- internalRunDescendentsLayout((HasWidgets) child);
- }
-
- }
- }
-
/**
- * Converts relative sizes into pixel sizes.
+ * Returns false
*
- * @param child
- * @return true if the child has a relative size
+ * @param paintable
+ * @return false, always
+ * @deprecated As of 7.0, serves no purpose
*/
+ @Deprecated
private boolean handleComponentRelativeSize(ComponentConnector paintable) {
return false;
}
/**
- * Converts relative sizes into pixel sizes.
+ * Returns false
*
- * @param child
- * @return true if the child has a relative size
+ * @param paintable
+ * @return false, always
+ * @deprecated As of 7.0, serves no purpose
*/
+ @Deprecated
public boolean handleComponentRelativeSize(Widget widget) {
return handleComponentRelativeSize(connectorMap.getConnector(widget));
diff --git a/client/src/com/vaadin/client/ContainerResizedListener.java b/client/src/com/vaadin/client/ContainerResizedListener.java
index 3ccf68f9f9..5ea677eee8 100644
--- a/client/src/com/vaadin/client/ContainerResizedListener.java
+++ b/client/src/com/vaadin/client/ContainerResizedListener.java
@@ -19,7 +19,11 @@ package com.vaadin.client;
/**
* ContainerResizedListener interface is useful for Widgets that support
* relative sizes and who need some additional sizing logic.
+ *
+ * @deprecated As of 7.0, serves no purpose. Use {@link LayoutManager} and its
+ * methods instead.
*/
+@Deprecated
public interface ContainerResizedListener {
/**
* This function is run when container box has been resized. Object
@@ -28,6 +32,9 @@ public interface ContainerResizedListener {
* container has resized. runAnchestorsLayout(HasWidgets parent) function
* from Util class may be a good helper for this.
*
+ * @deprecated As of 7.0, this method is never called by the framework.
+ *
*/
+ @Deprecated
public void iLayout();
}
diff --git a/client/src/com/vaadin/client/ui/VAccordion.java b/client/src/com/vaadin/client/ui/VAccordion.java
index b99d170c23..90af5bf934 100644
--- a/client/src/com/vaadin/client/ui/VAccordion.java
+++ b/client/src/com/vaadin/client/ui/VAccordion.java
@@ -379,13 +379,6 @@ public class VAccordion extends VTabsheetBase {
} else if (getChildWidget() != newWidget) {
replaceWidget(newWidget);
}
- if (contentUidl.getBooleanAttribute("cached")) {
- /*
- * The size of a cached, relative sized component must be
- * updated to report correct size.
- */
- client.handleComponentRelativeSize(newPntbl.getWidget());
- }
if (isOpen() && isDynamicHeight()) {
setHeightFromWidget();
}
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index e0bd159951..f74573c5c0 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -1833,14 +1833,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
// TODO refactor this code to be the same as in resize timer
- boolean needsReLayout = false;
if (availW > total) {
// natural size is smaller than available space
final int extraSpace = availW - total;
final int totalWidthR = total - totalExplicitColumnsWidths;
int checksum = 0;
- needsReLayout = true;
if (extraSpace == 1) {
// We cannot divide one single pixel so we give it the first
@@ -1930,10 +1928,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
initializedAndAttached = true;
- if (needsReLayout) {
- scrollBody.reLayoutComponents();
- }
-
updatePageLength();
/*
@@ -2007,7 +2001,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
* Ensures the column alignments are correct at initial loading. <br/>
* (child components widths are correct)
*/
- scrollBody.reLayoutComponents();
Scheduler.get().scheduleDeferred(new Command() {
@Override
@@ -4526,15 +4519,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
}
- private void reLayoutComponents() {
- for (Widget w : this) {
- VScrollTableRow r = (VScrollTableRow) w;
- for (Widget widget : r) {
- client.handleComponentRelativeSize(widget);
- }
- }
- }
-
public int getLastRendered() {
return lastRendered;
}
@@ -6096,7 +6080,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
Util.notifyParentOfSizeChange(VScrollTable.this, false);
}
}
- scrollBody.reLayoutComponents();
Scheduler.get().scheduleDeferred(new Command() {
@Override
diff --git a/client/src/com/vaadin/client/ui/VTabsheet.java b/client/src/com/vaadin/client/ui/VTabsheet.java
index a63af0ba6f..9e6ee75965 100644
--- a/client/src/com/vaadin/client/ui/VTabsheet.java
+++ b/client/src/com/vaadin/client/ui/VTabsheet.java
@@ -939,13 +939,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
tp.showWidget(activeTabIndex);
VTabsheet.this.iLayout();
- /*
- * The size of a cached, relative sized component must be updated to
- * report correct size to updateOpenTabSize().
- */
- if (contentUIDL.getBooleanAttribute("cached")) {
- client.handleComponentRelativeSize(content.getWidget());
- }
updateOpenTabSize();
VTabsheet.this.removeStyleDependentName("loading");
}
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java
index dc64eb7529..5c0d895d59 100644
--- a/client/src/com/vaadin/client/ui/VWindow.java
+++ b/client/src/com/vaadin/client/ui/VWindow.java
@@ -35,7 +35,6 @@ import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.BrowserInfo;
@@ -738,16 +737,6 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
}
private void updateContentsSize() {
- Widget childWidget = getWidget();
-
- // Update child widget dimensions
- if (client != null && childWidget != null) {
- client.handleComponentRelativeSize(childWidget);
- if (childWidget instanceof HasWidgets) {
- client.runDescendentsLayout((HasWidgets) childWidget);
- }
- }
-
LayoutManager layoutManager = getLayoutManager();
layoutManager.setNeedsMeasure(ConnectorMap.get(client).getConnector(
this));
diff --git a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java
index edf257ad52..c5cc0194c4 100644
--- a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java
+++ b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java
@@ -67,15 +67,6 @@ public class TabsheetConnector extends TabsheetBaseConnector implements
getWidget().iLayout();
- // Re run relative size update to ensure optimal scrollbars
- // TODO isolate to situation that visible tab has undefined height
- try {
- client.handleComponentRelativeSize(getWidget().tp
- .getWidget(getWidget().tp.getVisibleWidget()));
- } catch (Exception e) {
- // Ignore, most likely empty tabsheet
- }
-
getWidget().waitingForResponse = false;
}