From 7d92927b8d15b28b1937e8a6255e47a79e2352e7 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 16 May 2014 08:21:04 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@95746 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/rows/EditRowDialog.java | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/EditRowDialog.java b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/EditRowDialog.java index 9bd77ff..b73f53d 100644 --- a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/EditRowDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/EditRowDialog.java @@ -26,14 +26,21 @@ public class EditRowDialog extends Window { protected RowRaw row; protected DeleteRowsSession deleteRowsSession; protected DeleteRowsProgressDialog deleteRowsProgressDialog; - + + + /** + * Edit selected row + * + * @param trId + * @param row + * @param eventBus + */ public EditRowDialog(TRId trId, RowRaw row, EventBus eventBus) { this.trId = trId; this.row = row; this.eventBus = eventBus; if (row == null) { - UtilsGXT3.alert("Attentions", - "No row selected"); + UtilsGXT3.alert("Attentions", "No row selected"); } else { initWindow(); EditRowPanel editRowPanel = new EditRowPanel(this, trId, row, @@ -42,6 +49,21 @@ public class EditRowDialog extends Window { } } + /** + * Add a new row to the table + * + * @param trId + * @param eventBus + */ + public EditRowDialog(TRId trId, EventBus eventBus) { + this.trId = trId; + this.eventBus = eventBus; + initWindow(); + EditRowPanel editRowPanel = new EditRowPanel(this, trId, eventBus); + add(editRowPanel); + + } + protected void initWindow() { setWidth(WIDTH); setHeight(HEIGHT);