org.cafesip.gwtcomp.client.ui
Class ServerFileBrowser
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.DecoratedPopupPanel
com.google.gwt.user.client.ui.DialogBox
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:
- .gwtcomp-ServerFileBrowser { } - style for the file browser diaglog box
- .gwtcomp-ServerFileBrowserList { } - style for the file list
- .gwtcomp-ServerFileBrowserServerWait { } - style to be applied while the
file browser is waiting to hear back from the server
Screen-Shots:
- Author:
- Amit Chatterjee
| 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.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.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 |
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.
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.