aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/ui/Table.java20
-rw-r--r--src/com/vaadin/ui/Window.java45
2 files changed, 55 insertions, 10 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index 0563756d40..3804f8979e 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -36,14 +36,20 @@ import com.vaadin.terminal.gwt.client.ui.VScrollTable;
/**
* <p>
- * <code>TableComponent</code> is used for representing data or components in
- * pageable and selectable table.
+ * <code>Table</code> is used for representing data or components in a pageable
+ * and selectable table.
* </p>
*
* <p>
- * Note! Since version 5, components in Table will not have their caption nor
- * icon rendered. In order to workaround this limitation, wrap your component in
- * a Layout.
+ * Scalability of the Table is largely dictated by the container. A table does
+ * not have a limit for the number of items and is just as fast with hundreds of
+ * thousands of items as with just a few. The current GWT implementation with
+ * scrolling however limits the number of rows to around 500000, depending on
+ * the browser and the pixel height of rows.
+ * </p>
+ *
+ * <p>
+ * Components in a Table will not have their caption nor icon rendered.
* </p>
*
* @author IT Mill Ltd.
@@ -502,6 +508,8 @@ public class Table extends AbstractSelect implements Action.Container,
}
// Assures the visual refresh
+ // FIXME: Is this really needed? Header captions should not affect
+ // content so requestRepaint() should be sufficient.
resetPageBuffer();
refreshRenderedCells();
}
@@ -971,6 +979,8 @@ public class Table extends AbstractSelect implements Action.Container,
columnHeaders.put(propertyId, header);
// Assures the visual refresh
+ // FIXME: Is this really needed? Header captions should not affect
+ // content so requestRepaint() should be sufficient.
refreshRenderedCells();
}
diff --git a/src/com/vaadin/ui/Window.java b/src/com/vaadin/ui/Window.java
index 63daabdf90..f4657d81f6 100644
--- a/src/com/vaadin/ui/Window.java
+++ b/src/com/vaadin/ui/Window.java
@@ -1053,28 +1053,63 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
}
}
+ /**
+ * An interface used for listening to Window close events. Add the
+ * CloseListener to a browser level window or a sub window and
+ * {@link CloseListener#windowClose(CloseEvent)} will be called whenever the
+ * user closes the window.
+ *
+ * <p>
+ * Note that removing windows using {@link #removeWindow(Window)} will not
+ * fire the CloseListener.
+ * </p>
+ */
public interface CloseListener extends Serializable {
+ /**
+ * Called when the user closes a window. Use
+ * {@link CloseEvent#getWindow()} to get a reference to the
+ * {@link Window} that was closed.
+ *
+ * @param e
+ * Event containing
+ */
public void windowClose(CloseEvent e);
}
/**
- * Adds the listener.
+ * Adds a CloseListener to the window.
+ *
+ * For a sub window the CloseListener is fired when the user closes it
+ * (clicks on the close button).
+ *
+ * For a browser level window the CloseListener is fired when the browser
+ * level window is closed. Note that closing a browser level window does not
+ * mean it will be destroyed.
+ *
+ * <p>
+ * Note that removing windows using {@link #removeWindow(Window)} will not
+ * fire the CloseListener.
+ * </p>
*
* @param listener
- * the listener to add.
+ * the CloseListener to add.
*/
public void addListener(CloseListener listener) {
addListener(CloseEvent.class, listener, WINDOW_CLOSE_METHOD);
}
/**
- * Removes the listener.
+ * Removes the CloseListener from the window.
+ *
+ * <p>
+ * For more information on CloseListeners see {@link CloseListener}.
+ * </p>
*
* @param listener
- * the listener to remove.
+ * the CloseListener to remove.
*/
public void removeListener(CloseListener listener) {
- addListener(CloseEvent.class, listener, WINDOW_CLOSE_METHOD);
+ removeListener(CloseEvent.class, listener, WINDOW_CLOSE_METHOD);
}
protected void fireClose() {