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