fixing 'All tags' display version 2 - add a new css class named 'gss-tag'
[pithos] / src / gr / ebs / gss / client / FilesPropertiesDialog.java
index 98320d4..3437245 100644 (file)
@@ -28,6 +28,8 @@ import java.util.Iterator;
 import java.util.List;\r
 \r
 import com.google.gwt.core.client.GWT;\r
+import com.google.gwt.event.dom.client.ClickEvent;\r
+import com.google.gwt.event.dom.client.ClickHandler;\r
 import com.google.gwt.event.dom.client.FocusEvent;\r
 import com.google.gwt.event.dom.client.FocusHandler;\r
 import com.google.gwt.json.client.JSONArray;\r
@@ -37,7 +39,7 @@ import com.google.gwt.json.client.JSONString;
 import com.google.gwt.user.client.Command;\r
 import com.google.gwt.user.client.DeferredCommand;\r
 import com.google.gwt.user.client.ui.Button;\r
-import com.google.gwt.user.client.ui.ClickListener;\r
+import com.google.gwt.user.client.ui.DecoratedTabPanel;\r
 import com.google.gwt.user.client.ui.DisclosurePanel;\r
 import com.google.gwt.user.client.ui.FlexTable;\r
 import com.google.gwt.user.client.ui.FlowPanel;\r
@@ -45,9 +47,7 @@ import com.google.gwt.user.client.ui.FocusPanel;
 import com.google.gwt.user.client.ui.HasHorizontalAlignment;\r
 import com.google.gwt.user.client.ui.HorizontalPanel;\r
 import com.google.gwt.user.client.ui.Label;\r
-import com.google.gwt.user.client.ui.TabPanel;\r
 import com.google.gwt.user.client.ui.VerticalPanel;\r
-import com.google.gwt.user.client.ui.Widget;\r
 \r
 /**\r
  * The 'Multiple file properties' dialog box implementation.\r
@@ -56,8 +56,6 @@ import com.google.gwt.user.client.ui.Widget;
  */\r
 public class FilesPropertiesDialog extends AbstractPropertiesDialog {\r
 \r
-       private static final String MULTIPLE_VALUES_TEXT = "(Multiple values)";\r
-\r
        private final TristateCheckBox versionedCheck;\r
 \r
        private final List<FileResource> files;\r
@@ -90,7 +88,8 @@ public class FilesPropertiesDialog extends AbstractPropertiesDialog {
                final VerticalPanel outer = new VerticalPanel();\r
                final FocusPanel focusPanel = new FocusPanel(outer);\r
                // Inner contains generalPanel and permPanel.\r
-               inner = new TabPanel();\r
+               inner = new DecoratedTabPanel();\r
+               inner.setAnimationEnabled(true);\r
                final VerticalPanel generalPanel = new VerticalPanel();\r
                final HorizontalPanel buttons = new HorizontalPanel();\r
                final VerticalPanel verPanel = new VerticalPanel();\r
@@ -156,9 +155,9 @@ public class FilesPropertiesDialog extends AbstractPropertiesDialog {
 \r
                // Create the 'OK' button, along with a listener that hides the dialog\r
                // when the button is clicked.\r
-               final Button ok = new Button("OK", new ClickListener() {\r
-\r
-                       public void onClick(Widget sender) {\r
+               final Button ok = new Button("OK", new ClickHandler() {\r
+                       @Override\r
+                       public void onClick(ClickEvent event) {\r
                                accept();\r
                                closeDialog();\r
                        }\r
@@ -167,22 +166,23 @@ public class FilesPropertiesDialog extends AbstractPropertiesDialog {
                buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
                // Create the 'Cancel' button, along with a listener that hides the\r
                // dialog when the button is clicked.\r
-               final Button cancel = new Button("Cancel", new ClickListener() {\r
-\r
-                       public void onClick(Widget sender) {\r
+               final Button cancel = new Button("Cancel", new ClickHandler() {\r
+                       @Override\r
+                       public void onClick(ClickEvent event) {\r
                                closeDialog();\r
                        }\r
                });\r
                buttons.add(cancel);\r
                buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
                buttons.setSpacing(8);\r
-               buttons.addStyleName("gwt-TabPanelBottom");\r
+               buttons.addStyleName("gss-TabPanelBottom");\r
 \r
                generalPanel.add(generalTable);\r
 \r
                // Asynchronously retrieve the tags defined by this user.\r
                DeferredCommand.addCommand(new Command() {\r
 \r
+                       @Override\r
                        public void execute() {\r
                                updateTags();\r
                        }\r
@@ -197,7 +197,7 @@ public class FilesPropertiesDialog extends AbstractPropertiesDialog {
 \r
                vPanel.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
                vPanel.setSpacing(8);\r
-               vPanel.addStyleName("gwt-TabPanelBottom");\r
+               vPanel.addStyleName("gss-TabPanelBottom");\r
                vPanel.add(new Label("Versioned"));\r
 \r
                vPanel.add(versionedCheck);\r
@@ -205,7 +205,7 @@ public class FilesPropertiesDialog extends AbstractPropertiesDialog {
                outer.add(inner);\r
                outer.add(buttons);\r
                outer.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);\r
-               outer.addStyleName("gwt-TabPanelBottom");\r
+               outer.addStyleName("gss-TabPanelBottom");\r
 \r
                focusPanel.setFocus(true);\r
                setWidget(outer);\r