org.cafesip.gwtcomp.client.ui
Class ServerFileBrowser

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.PopupPanel
                      extended by com.google.gwt.user.client.ui.DecoratedPopupPanel
                          extended by com.google.gwt.user.client.ui.DialogBox
                              extended by org.cafesip.gwtcomp.client.ui.ServerFileBrowser
All Implemented Interfaces:
HasCloseHandlers<PopupPanel>, HasHandlers, EventListener, EventPreview, HasAnimation, HasHTML, HasText, HasWidgets, MouseListener, SourcesPopupEvents, Iterable<Widget>

public class ServerFileBrowser
extends DialogBox

Lets GWT applications browse and selects files that are present in the web server hosting the GWT application. For system administration purposes, very often, users have to specify a file or a directory in the server. This widget lets the user browser the files in the server using a file selector user interface.

Note that this component requires a GWT servlet to be running on the server. You will need to include the gwtcomp-servlet.jar in the WEB-INF/web.xml file and in the web.xml file, add the following segment:

   <servlet>
        <servlet-name>DirListingService</servlet-name>
        <servlet-class>
            org.cafesip.gwtcomp.server.DirListingServiceImpl
        </servlet-class>
    </servlet>
    ...
    <servlet-mapping>
        <servlet-name>DirListingService</servlet-name>
        <url-pattern>/gwtcomp/directoryService</url-pattern>
    </servlet-mapping>
 

CSS Style Rules:

Screen-Shots:

Author:
Amit Chatterjee

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DialogBox
DialogBox.Caption
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
PopupPanel.PositionCallback
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ServerFileBrowser()
          A constructor for this class.
ServerFileBrowser(String filter)
          A constructor for this class.
 
Method Summary
 void addServerFileListener(ServerFileBrowserListener listener)
          Adds a listener for events.
 String getFilter()
          Returns the filter string.
 void removeServerFileListener(ServerFileBrowserListener listener)
          Removes an event listener.
 void setFilter(String filter)
          Sets a filter string.
 
Methods inherited from class com.google.gwt.user.client.ui.DialogBox
beginDragging, continueDragging, doAttachChildren, doDetachChildren, endDragging, getCaption, getHTML, getText, hide, onBrowserEvent, onEnsureDebugId, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, onPreviewNativeEvent, setHTML, setText, show
 
Methods inherited from class com.google.gwt.user.client.ui.DecoratedPopupPanel
clear, getCellElement, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, center, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidth, showRelativeTo
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, disown, onLoad, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

ServerFileBrowser

public ServerFileBrowser(String filter)
A constructor for this class.

Parameters:
filter - a regular expression filter String. Only files/directories matching the pattern will be displayed.

ServerFileBrowser

public ServerFileBrowser()
A constructor for this class. Creates a file browser with no filtering.

Method Detail

addServerFileListener

public void addServerFileListener(ServerFileBrowserListener listener)
Adds a listener for events.

Parameters:
listener -

removeServerFileListener

public void removeServerFileListener(ServerFileBrowserListener listener)
Removes an event listener.

Parameters:
listener -

getFilter

public String getFilter()
Returns the filter string.

Returns:
Returns the filter.

setFilter

public void setFilter(String filter)
Sets a filter string.

Parameters:
filter - The filter to set.


Copyright © 2010 Cafesip.org. All Rights Reserved.