diff options
Diffstat (limited to 'server/src/com/vaadin/ui/Table.java')
-rw-r--r-- | server/src/com/vaadin/ui/Table.java | 110 |
1 files changed, 100 insertions, 10 deletions
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 118e3b3fcf..d1bdcdd708 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -4575,17 +4575,35 @@ public class Table extends AbstractSelect implements Action.Container, } @Override - public void addListener(ItemClickListener listener) { + public void addItemClickListener(ItemClickListener listener) { addListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener, ItemClickEvent.ITEM_CLICK_METHOD); } + /** + * @deprecated Since 7.0, replaced by + * {@link #addItemClickListener(ItemClickListener)} + **/ + @Deprecated + public void addListener(ItemClickListener listener) { + addItemClickListener(listener); + } + @Override - public void removeListener(ItemClickListener listener) { + public void removeItemClickListener(ItemClickListener listener) { removeListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class, listener); } + /** + * @deprecated Since 7.0, replaced by + * {@link #removeItemClickListener(ItemClickListener)} + **/ + @Deprecated + public void removeListener(ItemClickListener listener) { + removeItemClickListener(listener); + } + // Identical to AbstractCompoenentContainer.setEnabled(); @Override @@ -4926,24 +4944,42 @@ public class Table extends AbstractSelect implements Action.Container, * @param listener * The handler which should handle the header click events. */ - public void addListener(HeaderClickListener listener) { + public void addHeaderClickListener(HeaderClickListener listener) { addListener(TableConstants.HEADER_CLICK_EVENT_ID, HeaderClickEvent.class, listener, HeaderClickEvent.HEADER_CLICK_METHOD); } /** + * @deprecated Since 7.0, replaced by + * {@link #addHeaderClickListener(HeaderClickListener)} + **/ + @Deprecated + public void addListener(HeaderClickListener listener) { + addHeaderClickListener(listener); + } + + /** * Removes a header click listener * * @param listener * The listener to remove. */ - public void removeListener(HeaderClickListener listener) { + public void removeHeaderClickListener(HeaderClickListener listener) { removeListener(TableConstants.HEADER_CLICK_EVENT_ID, HeaderClickEvent.class, listener); } /** + * @deprecated Since 7.0, replaced by + * {@link #removeHeaderClickListener(HeaderClickListener)} + **/ + @Deprecated + public void removeListener(HeaderClickListener listener) { + removeHeaderClickListener(listener); + } + + /** * Adds a footer click listener which handles the click events when the user * clicks on a column footer cell in the Table. * <p> @@ -4954,24 +4990,42 @@ public class Table extends AbstractSelect implements Action.Container, * @param listener * The handler which should handle the footer click events. */ - public void addListener(FooterClickListener listener) { + public void addFooterClickListener(FooterClickListener listener) { addListener(TableConstants.FOOTER_CLICK_EVENT_ID, FooterClickEvent.class, listener, FooterClickEvent.FOOTER_CLICK_METHOD); } /** + * @deprecated Since 7.0, replaced by + * {@link #addFooterClickListener(FooterClickListener)} + **/ + @Deprecated + public void addListener(FooterClickListener listener) { + addFooterClickListener(listener); + } + + /** * Removes a footer click listener * * @param listener * The listener to remove. */ - public void removeListener(FooterClickListener listener) { + public void removeFooterClickListener(FooterClickListener listener) { removeListener(TableConstants.FOOTER_CLICK_EVENT_ID, FooterClickEvent.class, listener); } /** + * @deprecated Since 7.0, replaced by + * {@link #removeFooterClickListener(FooterClickListener)} + **/ + @Deprecated + public void removeListener(FooterClickListener listener) { + removeFooterClickListener(listener); + } + + /** * Gets the footer caption beneath the rows * * @param propertyId @@ -5122,24 +5176,42 @@ public class Table extends AbstractSelect implements Action.Container, * @param listener * The listener to attach to the Table */ - public void addListener(ColumnResizeListener listener) { + public void addColumnResizeListener(ColumnResizeListener listener) { addListener(TableConstants.COLUMN_RESIZE_EVENT_ID, ColumnResizeEvent.class, listener, ColumnResizeEvent.COLUMN_RESIZE_METHOD); } /** + * @deprecated Since 7.0, replaced by + * {@link #addColumnResizeListener(ColumnResizeListener)} + **/ + @Deprecated + public void addListener(ColumnResizeListener listener) { + addColumnResizeListener(listener); + } + + /** * Removes a column resize listener from the Table. * * @param listener * The listener to remove */ - public void removeListener(ColumnResizeListener listener) { + public void removeColumnResizeListener(ColumnResizeListener listener) { removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID, ColumnResizeEvent.class, listener); } /** + * @deprecated Since 7.0, replaced by + * {@link #removeColumnResizeListener(ColumnResizeListener)} + **/ + @Deprecated + public void removeListener(ColumnResizeListener listener) { + removeColumnResizeListener(listener); + } + + /** * This event is fired when a columns are reordered by the end user user. */ public static class ColumnReorderEvent extends Component.Event { @@ -5188,23 +5260,41 @@ public class Table extends AbstractSelect implements Action.Container, * @param listener * The listener to attach to the Table */ - public void addListener(ColumnReorderListener listener) { + public void addColumnReorderListener(ColumnReorderListener listener) { addListener(TableConstants.COLUMN_REORDER_EVENT_ID, ColumnReorderEvent.class, listener, ColumnReorderEvent.METHOD); } /** + * @deprecated Since 7.0, replaced by + * {@link #addColumnReorderListener(ColumnReorderListener)} + **/ + @Deprecated + public void addListener(ColumnReorderListener listener) { + addColumnReorderListener(listener); + } + + /** * Removes a column reorder listener from the Table. * * @param listener * The listener to remove */ - public void removeListener(ColumnReorderListener listener) { + public void removeColumnReorderListener(ColumnReorderListener listener) { removeListener(TableConstants.COLUMN_REORDER_EVENT_ID, ColumnReorderEvent.class, listener); } /** + * @deprecated Since 7.0, replaced by + * {@link #removeColumnReorderListener(ColumnReorderListener)} + **/ + @Deprecated + public void removeListener(ColumnReorderListener listener) { + removeColumnReorderListener(listener); + } + + /** * Set the item description generator which generates tooltips for cells and * rows in the Table * |