org.cafesip.gwtcomp.client.ui
Class EventfulFileUpload

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.FileUpload
              extended by org.cafesip.gwtcomp.client.ui.EventfulFileUpload
All Implemented Interfaces:
HasChangeHandlers, HasHandlers, EventListener, HasName

public class EventfulFileUpload
extends FileUpload

An extension of the GWT FileUpload class that allows applications to listen to file upload events. This allows applications to listens to events such has when an upload file is entered (or selected from the "browse" popup). Applications can use the listeners to perform validation or apply other business logic.

Screen-Shots:

Author:
Amit Chatterjee

Nested Class Summary
 
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
EventfulFileUpload()
          A constructor for this class.
 
Method Summary
 void addEventListener(FileUploadEventListener listener)
          Add a file upload listener.
 void onBrowserEvent(Event event)
           
 
Methods inherited from class com.google.gwt.user.client.ui.FileUpload
addChangeHandler, getFilename, getName, isEnabled, setEnabled, setName, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, 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

EventfulFileUpload

public EventfulFileUpload()
A constructor for this class.

Method Detail

addEventListener

public void addEventListener(FileUploadEventListener listener)
Add a file upload listener.

Parameters:
listener - The listener object.

onBrowserEvent

public final void onBrowserEvent(Event event)
Specified by:
onBrowserEvent in interface EventListener
Overrides:
onBrowserEvent in class FileUpload


Copyright © 2010 Cafesip.org. All Rights Reserved.