onModuleLoad()
.
*/
@@ -78,13 +83,14 @@ public class GSS implements EntryPoint, ResizeHandler {
* programmatic access to all the images needed by widgets.
*/
private static Images images = (Images) GWT.create(Images.class);
+
private GlassPanel glassPanel = new GlassPanel();
/**
* An aggregate image bundle that pulls together all the images for this
* application into a single bundle.
*/
- public interface Images extends ClientBundle,TopPanel.Images, StatusPanel.Images, FileMenu.Images, EditMenu.Images, SettingsMenu.Images, GroupMenu.Images, FilePropertiesDialog.Images, MessagePanel.Images, FileList.Images, SearchResults.Images, Search.Images, Groups.Images, Folders.Images {
+ public interface Images extends ClientBundle, TopPanel.Images, StatusPanel.Images, FileMenu.Images, EditMenu.Images, SettingsMenu.Images, GroupMenu.Images, FilePropertiesDialog.Images, MessagePanel.Images, FileList.Images, SearchResults.Images, Search.Images, Groups.Images, Folders.Images {
@Source("gr/ebs/gss/resources/document.png")
ImageResource folders();
@@ -147,7 +153,7 @@ public class GSS implements EntryPoint, ResizeHandler {
/**
* The group list widget.
*/
- private Groups groups = new Groups(images);
+ private Groups groups = new Groups(images);
/**
* The search result widget.
@@ -155,15 +161,9 @@ public class GSS implements EntryPoint, ResizeHandler {
private SearchResults searchResults;
/**
- * A widget that displays a message indicating that communication with the
- * server is underway.
- */
- private LoadingIndicator loading;
-
- /**
* The tab panel that occupies the right side of the screen.
*/
- private TabPanel inner = new TabPanel();
+ private TabPanel inner = new DecoratedTabPanel();
/**
* The split panel that will contain the left and right panels.
@@ -203,6 +203,7 @@ public class GSS implements EntryPoint, ResizeHandler {
private PickupDragController dragController;
+ @Override
public void onModuleLoad() {
// Initialize the singleton before calling the constructors of the
// various widgets that might call GSS.get().
@@ -213,32 +214,46 @@ public class GSS implements EntryPoint, ResizeHandler {
@Override
public void previewDragStart() throws VetoDragException {
- super.previewDragStart();
- if (context.selectedWidgets.isEmpty())
+ super.previewDragStart();
+ if (context.selectedWidgets.isEmpty())
throw new VetoDragException();
- if(context.draggable != null){
- DnDFocusPanel toDrop = (DnDFocusPanel) context.draggable;
- //prevent drag and drop for trashed files and for unselected tree items
- if(toDrop.getFiles() != null && folders.isTrashItem(folders.getCurrent()))
- throw new VetoDragException();
- else if(toDrop.getItem() != null && !toDrop.getItem().equals(folders.getCurrent()))
- throw new VetoDragException();
- else if(toDrop.getItem() != null && !toDrop.getItem().isDraggable())
- throw new VetoDragException();
-
- }
- }
+ if (context.draggable != null)
+ if (context.draggable instanceof DnDFocusPanel) {
+ DnDFocusPanel toDrop = (DnDFocusPanel) context.draggable;
+ // prevent drag and drop for trashed files and for
+ // unselected tree items
+ if (toDrop.getFiles() != null && folders.isTrashItem(folders.getCurrent()))
+ throw new VetoDragException();
+ else if (toDrop.getItem() != null && !toDrop.getItem().equals(folders.getCurrent()))
+ throw new VetoDragException();
+ else if (toDrop.getItem() != null && !toDrop.getItem().isDraggable())
+ throw new VetoDragException();
+
+ } else if (context.draggable instanceof DnDSimpleFocusPanel) {
+ DnDSimpleFocusPanel toDrop = (DnDSimpleFocusPanel) context.draggable;
+ // prevent drag and drop for trashed files and for
+ // unselected tree items
+ if (toDrop.getFiles() != null && folders.isTrashItem(folders.getCurrent()))
+ throw new VetoDragException();
+ }
+ }
@Override
protected Widget newDragProxy(DragContext aContext) {
AbsolutePanel container = new AbsolutePanel();
DOM.setStyleAttribute(container.getElement(), "overflow", "visible");
for (Iterator iterator = aContext.selectedWidgets.iterator(); iterator.hasNext();) {
+ HTML html = null;
Widget widget = (Widget) iterator.next();
- DnDFocusPanel book = (DnDFocusPanel) widget;
- HTML html = book.cloneHTML();
- if(html == null)
+ if (widget instanceof DnDFocusPanel) {
+ DnDFocusPanel book = (DnDFocusPanel) widget;
+ html = book.cloneHTML();
+ } else if (widget instanceof DnDSimpleFocusPanel) {
+ DnDSimpleFocusPanel book = (DnDSimpleFocusPanel) widget;
+ html = book.cloneHTML();
+ }
+ if (html == null)
container.add(new Label("Drag ME"));
else
container.add(html);
@@ -267,8 +282,9 @@ public class GSS implements EntryPoint, ResizeHandler {
searchResults = new SearchResults(images);
// Inner contains the various lists.
- inner.getTabBar().setStyleName("gss-TabBar");
- inner.setStyleName("gss-TabPanel");
+ inner.setAnimationEnabled(true);
+ inner.getTabBar().addStyleName("gss-MainTabBar");
+ inner.getDeckPanel().addStyleName("gss-MainTabPanelBottom");
inner.add(fileList, createHeaderHTML(AbstractImagePrototype.create(images.folders()), "Files"), true);
inner.add(groups, createHeaderHTML(AbstractImagePrototype.create(images.groups()), "Groups"), true);
@@ -280,29 +296,62 @@ public class GSS implements EntryPoint, ResizeHandler {
@Override
public void onSelection(SelectionEvent" + imageProto.getHTML() + - " | " + - caption + " |
" + imageProto.getHTML() + " | " + caption + " |