org.gcube.portlets.user.templates.client.components
Class FancyFileUpload

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.Composite
              extended by org.gcube.portlets.user.templates.client.components.FancyFileUpload
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWordWrap, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.SourcesChangeEvents

public class FancyFileUpload
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasWordWrap, com.google.gwt.user.client.ui.SourcesChangeEvents

FancyFileUpload class is use to upload images from client in the UI

Version:
October 2008 (0.2)
Author:
Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it

Nested Class Summary
protected  class FancyFileUpload.UploadDisplay
          Class used for the display of filename to be uploaded, and handling the update of the display states.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 int DELETED_STATE
           
 int EMPTY_STATE
          State definitions
 int FAILED_STATE
           
 int PENDING_STATE
           
 int UPLOADED_STATE
           
 int UPLOADING_STATE
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
FancyFileUpload(ImageUploaderDialog owner, String templateName)
           
 
Method Summary
 void addChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
          Add a change listener
 int getCheckForFileNameDelay()
          Return the delay value set for checking a file.
 int getPendingDelay()
          Return value set for pending delay.
 String getText()
          Get the text from the widget - which in reality will be retrieving any value set in the Label element of the display widget.
 int getUploadState()
          Retrieve the status of the upload widget.
 boolean getWordWrap()
          Return if the label in the display widget is wordwrapped or not.
 void removeChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
          Remove a change listener
 void setCheckForFileNameDelay(int newDelay)
          Set the delay for checking for a filename to appear in the FileUpload widget Might be useful if there are performance issues.
 void setPendingDelay(int newDelay)
          Set the delay value indicating how long a file will remain in pending mode prior to the upload action taking place.
 void setText(String text)
          Cannot set the text of a File Upload Widget, so raise an exception.
 void setWordWrap(boolean wrap)
          Set the word wrap value of the label in the display widget.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, 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, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_STATE

public final int EMPTY_STATE
State definitions

See Also:
Constant Field Values

PENDING_STATE

public final int PENDING_STATE
See Also:
Constant Field Values

UPLOADING_STATE

public final int UPLOADING_STATE
See Also:
Constant Field Values

UPLOADED_STATE

public final int UPLOADED_STATE
See Also:
Constant Field Values

DELETED_STATE

public final int DELETED_STATE
See Also:
Constant Field Values

FAILED_STATE

public final int FAILED_STATE
See Also:
Constant Field Values
Constructor Detail

FancyFileUpload

public FancyFileUpload(ImageUploaderDialog owner,
                       String templateName)
Parameters:
owner - the caller
templateName - .
Method Detail

getText

public String getText()
Get the text from the widget - which in reality will be retrieving any value set in the Label element of the display widget.

Specified by:
getText in interface com.google.gwt.user.client.ui.HasText
Returns:
.

setText

public void setText(String text)
Cannot set the text of a File Upload Widget, so raise an exception.

Specified by:
setText in interface com.google.gwt.user.client.ui.HasText
Parameters:
text - .

getUploadState

public int getUploadState()
Retrieve the status of the upload widget.

Returns:
Status of upload widget.

setCheckForFileNameDelay

public void setCheckForFileNameDelay(int newDelay)
Set the delay for checking for a filename to appear in the FileUpload widget Might be useful if there are performance issues.

Parameters:
newDelay - .

setPendingDelay

public void setPendingDelay(int newDelay)
Set the delay value indicating how long a file will remain in pending mode prior to the upload action taking place.

Parameters:
newDelay - .

getCheckForFileNameDelay

public int getCheckForFileNameDelay()
Return the delay value set for checking a file.

Returns:
.

getPendingDelay

public int getPendingDelay()
Return value set for pending delay.

Returns:
.

getWordWrap

public boolean getWordWrap()
Return if the label in the display widget is wordwrapped or not.

Specified by:
getWordWrap in interface com.google.gwt.user.client.ui.HasWordWrap
Returns:
.

setWordWrap

public void setWordWrap(boolean wrap)
Set the word wrap value of the label in the display widget.

Specified by:
setWordWrap in interface com.google.gwt.user.client.ui.HasWordWrap
Parameters:
wrap - .

addChangeListener

public void addChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
Add a change listener

Specified by:
addChangeListener in interface com.google.gwt.user.client.ui.SourcesChangeEvents
Parameters:
listener - ,

removeChangeListener

public void removeChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
Remove a change listener

Specified by:
removeChangeListener in interface com.google.gwt.user.client.ui.SourcesChangeEvents
Parameters:
listener - .


Copyright © 2013. All Rights Reserved.