From c8e78b701a8a2c23b96e185bf0c2f822f605c343 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Fri, 6 Sep 2013 13:23:38 +0000 Subject: [PATCH] topbar icons renewed, added refresh button still missing handler though git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@81120 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/workspace/client/ConstantsPortlet.java | 3 +++ .../view/toolbars/GxtToolBarItemFunctionality.java | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java b/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java index 2f02520..dbf0ee2 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/ConstantsPortlet.java @@ -8,6 +8,9 @@ package org.gcube.portlets.user.workspace.client; public class ConstantsPortlet { // ToolBar button + public static final String CATEGORIZE = "Categorize"; + + public static final String REFRESH = "Refresh"; public static final String ADDFOLDER = "New Folder"; public static final String REMOVEITEM = "Remove"; public static final String RENAMEITEM = "Rename"; diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java index 4c23ee8..ddd9c00 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java @@ -40,6 +40,7 @@ import com.extjs.gxt.ui.client.widget.toolbar.ToolBar; public class GxtToolBarItemFunctionality { private Button btnAddFolder = null; + private Button btnRefreshFolder = null; private Button btnRemoveItem = null; private Button btnRenameItem = null; private Button btnUploadFile = null; @@ -71,7 +72,7 @@ public class GxtToolBarItemFunctionality { private void initToolBar() { - btnGridView = new ToggleButton("Category View", Resources.getIconGridView()); + btnGridView = new ToggleButton(ConstantsPortlet.CATEGORIZE, Resources.getIconGridView()); btnGridView.setScale(ButtonScale.SMALL); btnGridView.setIconAlign(IconAlign.TOP); btnGridView.toggle(true); @@ -94,6 +95,14 @@ public class GxtToolBarItemFunctionality { btnUploadFile.setArrowAlign(ButtonArrowAlign.BOTTOM); toolBar.add(btnUploadFile); + + btnRefreshFolder = new Button(ConstantsPortlet.REFRESH, + Resources.getIconRefresh()); + btnRefreshFolder.setScale(ButtonScale.SMALL); + btnRefreshFolder.setIconAlign(IconAlign.TOP); + btnRefreshFolder.setArrowAlign(ButtonArrowAlign.BOTTOM); + + toolBar.add(btnRefreshFolder); toolBar.add(new SeparatorToolItem()); // btnGetInfo = new Button("Info", Resources.getIconInfo());