diff options
author | Henrik Paul <henrik@vaadin.com> | 2014-08-12 14:42:54 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-08-12 13:46:44 +0000 |
commit | e3bf5b75e0c2965c91a9b0efae016cef507322bd (patch) | |
tree | 716be661a74bdc7ab1594ea3d89de5152d2ddffb | |
parent | 2252e5ac790921170746d7446f214643bc640e67 (diff) | |
download | vaadin-framework-e3bf5b75e0c2965c91a9b0efae016cef507322bd.tar.gz vaadin-framework-e3bf5b75e0c2965c91a9b0efae016cef507322bd.zip |
Removes the unused Escalator reference from FlyweightRow and FlyweightCell (#13334)
Change-Id: I2d913b753bdbb8f5dd9d3fdfae22049b54ea60a9
4 files changed, 7 insertions, 29 deletions
diff --git a/client/src/com/vaadin/client/ui/grid/Escalator.java b/client/src/com/vaadin/client/ui/grid/Escalator.java index 7263313356..3c6c84dbdc 100644 --- a/client/src/com/vaadin/client/ui/grid/Escalator.java +++ b/client/src/com/vaadin/client/ui/grid/Escalator.java @@ -3845,7 +3845,7 @@ public class Escalator extends Widget { private static final String DEFAULT_WIDTH = "500.0px"; private static final String DEFAULT_HEIGHT = "400.0px"; - private FlyweightRow flyweightRow = new FlyweightRow(this); + private FlyweightRow flyweightRow = new FlyweightRow(); /** The {@code <thead/>} tag. */ private final Element headElem = DOM.createTHead(); diff --git a/client/src/com/vaadin/client/ui/grid/FlyweightCell.java b/client/src/com/vaadin/client/ui/grid/FlyweightCell.java index b82fccfbe0..812e064221 100644 --- a/client/src/com/vaadin/client/ui/grid/FlyweightCell.java +++ b/client/src/com/vaadin/client/ui/grid/FlyweightCell.java @@ -44,13 +44,9 @@ public class FlyweightCell { private Element element = null; private CellIterator currentIterator = null; - private final Escalator escalator; - - public FlyweightCell(final FlyweightRow row, final int column, - Escalator escalator) { + public FlyweightCell(final FlyweightRow row, final int column) { this.row = row; this.column = column; - this.escalator = escalator; } /** diff --git a/client/src/com/vaadin/client/ui/grid/FlyweightRow.java b/client/src/com/vaadin/client/ui/grid/FlyweightRow.java index a5447715e5..630e5abc73 100644 --- a/client/src/com/vaadin/client/ui/grid/FlyweightRow.java +++ b/client/src/com/vaadin/client/ui/grid/FlyweightRow.java @@ -21,7 +21,6 @@ import java.util.Iterator; import java.util.List; import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Node; /** * An internal implementation of the {@link Row} interface. @@ -142,18 +141,8 @@ class FlyweightRow implements Row { private int row; private Element element; private int[] columnWidths = null; - private final Escalator escalator; private final List<FlyweightCell> cells = new ArrayList<FlyweightCell>(); - public FlyweightRow(final Escalator escalator) { - this.escalator = escalator; - } - - @Override - public Escalator getEscalator() { - return escalator; - } - void setup(final Element e, final int row, int[] columnWidths) { element = e; this.row = row; @@ -198,7 +187,7 @@ class FlyweightRow implements Row { void addCells(final int index, final int numberOfColumns) { for (int i = 0; i < numberOfColumns; i++) { final int col = index + i; - cells.add(col, new FlyweightCell(this, col, escalator)); + cells.add(col, new FlyweightCell(this, col)); } updateRestOfCells(index + numberOfColumns); } @@ -213,7 +202,7 @@ class FlyweightRow implements Row { private void updateRestOfCells(final int startPos) { // update the column number for the cells to the right for (int col = startPos; col < cells.size(); col++) { - cells.set(col, new FlyweightCell(this, col, escalator)); + cells.set(col, new FlyweightCell(this, col)); } } @@ -258,9 +247,9 @@ class FlyweightRow implements Row { } /** - * Returns a subrange of unattached flyweight cells. Unattached cells do - * not have {@link FlyweightCell#getElement() elements} associated. Note - * that FlyweightRow does not keep track of whether cells in actuality have + * Returns a subrange of unattached flyweight cells. Unattached cells do not + * have {@link FlyweightCell#getElement() elements} associated. Note that + * FlyweightRow does not keep track of whether cells in actuality have * corresponding DOM elements or not; it is the caller's responsibility to * invoke this method with correct parameters. * <p> diff --git a/client/src/com/vaadin/client/ui/grid/Row.java b/client/src/com/vaadin/client/ui/grid/Row.java index 2a176f7e82..a5317e52c4 100644 --- a/client/src/com/vaadin/client/ui/grid/Row.java +++ b/client/src/com/vaadin/client/ui/grid/Row.java @@ -26,13 +26,6 @@ import com.google.gwt.dom.client.Element; */ public interface Row { /** - * Gets the escalator containing the row. - * - * @return the escalator containing the row - */ - public Escalator getEscalator(); - - /** * Gets the row index. * * @return the row index |