From 00861a8f98a9caecbbcde852a7d2afa218e954e0 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 5 Jun 2015 16:42:12 +0000 Subject: [PATCH] 209: TDM - Show the resources through a ListView widget Task-Url: https://support.d4science.org/issues/209 Updated ResourcesListView git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@115247 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/td/client/TabularDataPortlet.java | 10 +---- .../td/client/ribbon/CurationToolBar.java | 42 ++++++++++--------- .../ribbon/CurationToolBarMessages.java | 8 ++-- .../ribbon/CurationToolBarMessages.properties | 8 ++-- .../CurationToolBarMessages_es.properties | 8 ++-- .../CurationToolBarMessages_it.properties | 8 ++-- 6 files changed, 39 insertions(+), 45 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java index b7d0a55..3fd6ebf 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java @@ -30,15 +30,7 @@ public class TabularDataPortlet implements EntryPoint { private static final String JSP_TAG_ID = "tdp"; - /** - * - */ - public static final int TOOLBOX_WIDTH = 300; - /** - * - */ - public static final int TOOLBOX_HEIGHT = 800; - + /** * Create a remote service proxy to talk to the server-side Greeting * service. diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java index 340b5c7..f9019e2 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBar.java @@ -137,6 +137,24 @@ public class CurationToolBar { structureLayout.setWidget(0, 0, tableTypeButton); structureLayout.getFlexCellFormatter().setRowSpan(0, 0, 2); + columnTypeButton = new TextButton(msgs.columnTypeButton(), + TabularDataResources.INSTANCE.columnType32()); + columnTypeButton.disable(); + columnTypeButton.setScale(ButtonScale.LARGE); + columnTypeButton.setIconAlign(IconAlign.TOP); + columnTypeButton.setToolTip(msgs.columnTypeButtonToolTip()); + columnTypeButton.setArrowAlign(ButtonArrowAlign.BOTTOM); + columnTypeButton.addSelectHandler(new SelectHandler() { + + public void onSelect(SelectEvent event) { + eventBus.fireEvent(new RibbonEvent(RibbonType.COLUMN_TYPE)); + } + }); + + structureLayout.setWidget(0, 1, columnTypeButton); + structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2); + + changePositionColumnButton = new TextButton(msgs.changePositionColumnButton(), TabularDataResources.INSTANCE.columnReorder32()); @@ -152,8 +170,8 @@ public class CurationToolBar { } }); - structureLayout.setWidget(0, 1, changePositionColumnButton); - structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2); + structureLayout.setWidget(0, 2, changePositionColumnButton); + structureLayout.getFlexCellFormatter().setRowSpan(0, 2, 2); changeColumnLabelButton = new TextButton(msgs.changeColumnLabelButton(), @@ -170,26 +188,10 @@ public class CurationToolBar { } }); - structureLayout.setWidget(0, 2, changeColumnLabelButton); - structureLayout.getFlexCellFormatter().setRowSpan(0, 2, 2); - - columnTypeButton = new TextButton(msgs.columnTypeButton(), - TabularDataResources.INSTANCE.columnType32()); - columnTypeButton.disable(); - columnTypeButton.setScale(ButtonScale.LARGE); - columnTypeButton.setIconAlign(IconAlign.TOP); - columnTypeButton.setToolTip(msgs.columnTypeButtonToolTip()); - columnTypeButton.setArrowAlign(ButtonArrowAlign.BOTTOM); - columnTypeButton.addSelectHandler(new SelectHandler() { - - public void onSelect(SelectEvent event) { - eventBus.fireEvent(new RibbonEvent(RibbonType.COLUMN_TYPE)); - } - }); - - structureLayout.setWidget(0, 3, columnTypeButton); + structureLayout.setWidget(0, 3, changeColumnLabelButton); structureLayout.getFlexCellFormatter().setRowSpan(0, 3, 2); + addColumnButton = new TextButton(msgs.addColumnButton(), TabularDataResources.INSTANCE.columnAdd32()); addColumnButton.disable(); diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.java index 3a229f9..923c2a6 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.java @@ -46,25 +46,25 @@ public interface CurationToolBarMessages extends Messages { @DefaultMessage("Change column type") String columnTypeButtonToolTip(); - @DefaultMessage("Add Column") + @DefaultMessage("Add") String addColumnButton(); @DefaultMessage("Add Column") String addColumnButtonToolTip(); - @DefaultMessage("Delete column") + @DefaultMessage("Delete") String deleteColumnButton(); @DefaultMessage("Delete column") String deleteColumnButtonToolTip(); - @DefaultMessage("Split Column") + @DefaultMessage("Split") String splitColumnButton(); @DefaultMessage("Split Column") String splitColumnButtonToolTip(); - @DefaultMessage("Merge Column") + @DefaultMessage("Merge") String mergeColumnButton(); @DefaultMessage("Merge Column") diff --git a/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.properties b/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.properties index 8f44017..6b9f625 100644 --- a/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.properties +++ b/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages.properties @@ -10,13 +10,13 @@ changeColumnLabelButton = Labels changeColumnLabelButtonToolTip = Change column labels columnTypeButton = Column Type columnTypeButtonToolTip = Change column type -addColumnButton = Add Column +addColumnButton = Add addColumnButtonToolTip = Add Column -deleteColumnButton = Delete Column +deleteColumnButton = Delete deleteColumnButtonToolTip = Delete Column -splitColumnButton = Split Column +splitColumnButton = Split splitColumnButtonToolTip = Split Column -mergeColumnButton = Merge Column +mergeColumnButton = Merge mergeColumnButtonToolTip = Merge Column denormalizeButton = Denormalize denormalizeButtonToolTip = Denormalize diff --git a/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_es.properties b/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_es.properties index 4cc40e2..cb9c17b 100644 --- a/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_es.properties +++ b/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_es.properties @@ -10,13 +10,13 @@ changeColumnLabelButton = Etiquetas changeColumnLabelButtonToolTip = Cambio etiquetas columnTypeButton = Tipo Columna columnTypeButtonToolTip = Cambio tipo de columna -addColumnButton = Añadir Columna +addColumnButton = Añadir addColumnButtonToolTip = Añadir la columna -deleteColumnButton = Eliminar Columna +deleteColumnButton = Eliminar deleteColumnButtonToolTip = Eliminar columna -splitColumnButton = Columna Dividida +splitColumnButton = Dividida splitColumnButtonToolTip = Columna Dividida -mergeColumnButton = Fusionar Columna +mergeColumnButton = Fusionar mergeColumnButtonToolTip = Fusionar la columna denormalizeButton = Desnormalizar denormalizeButtonToolTip = Desnormalizar diff --git a/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_it.properties b/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_it.properties index bdb8d82..017b001 100644 --- a/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_it.properties +++ b/src/main/resources/org/gcube/portlets/user/td/client/ribbon/CurationToolBarMessages_it.properties @@ -10,13 +10,13 @@ changeColumnLabelButton = Etichette changeColumnLabelButtonToolTip = Cambia etichette alle colonne columnTypeButton = Tipo Colonna columnTypeButtonToolTip = Cambia il tipo di colonna -addColumnButton = Inserisci Colonna +addColumnButton = Inserisci addColumnButtonToolTip = Inserisce colonna -deleteColumnButton = Elimina colonna +deleteColumnButton = Elimina deleteColumnButtonToolTip = Elimina colonna -splitColumnButton = Dividi Colonna +splitColumnButton = Dividi splitColumnButtonToolTip = Dividi colonna -mergeColumnButton = Unisci colonne +mergeColumnButton = Unisci mergeColumnButtonToolTip = Unisci colonne denormalizeButton = Denormalizza denormalizeButtonToolTip = Denormalizza