Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nextapp.echo2.app.filetransfer
Class UploadSelect

    java.lang.Object
      nextapp.echo2.app.Component
          nextapp.echo2.app.filetransfer.UploadSelect

All Implemented Interfaces:
  java.io.Serializable, RenderIdSupport

    public class UploadSelect

extends Component

A component that allows users to upload files to the application from remote clients.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `PROPERTY_DISABLED_SEND_TEXT`
`static java.lang.String` | `PROPERTY_DISPLAY_SEND_BUTTON`
`static java.lang.String` | `PROPERTY_ENABLED_SEND_TEXT`
`static java.lang.String` | `PROPERTY_HEIGHT`
`static java.lang.String` | `PROPERTY_WIDTH`
`static java.lang.String` | `UPLOAD_LISTENER_CHANGED_PROPERTY`

Fields inherited from class nextapp.echo2.app.Component
`CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY`

Constructor Summary
`UploadSelect()` Creates an upload selector.

Method Summary
`void` | `addUploadListener(UploadListener l)` Adds an `UploadListener` to be notified of file uploads.
`void` | `fileUpload(java.io.InputStream in, int size, java.lang.String contentType, java.lang.String filename)` Notifies the upload listener that a file has been uploaded.
`java.lang.String` | `getDisabledSendButtonText()` Returns text displayed in "Send" button when it is disabled.
`java.lang.String` | `getEnabledSendButtonText()` Returns text displayed in "Send" button when it is enabled.
`Extent` | `getHeight()` Returns the height of the upload select component.
`UploadListener` | `getUploadListener()` Returns the upload listener that will process file uploads when they occur.
`Extent` | `getWidth()` Returns the width of the upload select component.
`boolean` | `isSendButtonDisplayed()` Returns whether the "Send" button should be displayed.
`void` | `removeUploadListener(UploadListener l)` Removes a (the) `UploadListener` from this `UploadSelect`.
`void` | `setDisabledSendButtonText(java.lang.String string)` Sets the text displayed in the "Send" button when it is disabled.
`void` | `setEnabledSendButtonText(java.lang.String string)` Sets the text displayed in the "Send" button when it is enabled.
`void` | `setHeight(Extent newValue)` Sets the height of the upload select component.
`void` | `setSendButtonDisplayed(boolean b)` Sets whether the "Send" button should be displayed when the component is rendered.
`void` | `setUploadListener(UploadListener newValue)` Sets the upload listener that will process file uploads when they occur.
`void` | `setWidth(Extent newValue)` Sets the width of the upload select component.

Methods inherited from class nextapp.echo2.app.Component
`add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROPERTY_HEIGHT

    public static final java.lang.String PROPERTY_HEIGHT

See Also:
  Constant Field Values

### PROPERTY_WIDTH

    public static final java.lang.String PROPERTY_WIDTH

See Also:
  Constant Field Values

### PROPERTY_ENABLED_SEND_TEXT

    public static final java.lang.String PROPERTY_ENABLED_SEND_TEXT

See Also:
  Constant Field Values

### PROPERTY_DISABLED_SEND_TEXT

    public static final java.lang.String PROPERTY_DISABLED_SEND_TEXT

See Also:
  Constant Field Values

### PROPERTY_DISPLAY_SEND_BUTTON

    public static final java.lang.String PROPERTY_DISPLAY_SEND_BUTTON

See Also:
  Constant Field Values

### UPLOAD_LISTENER_CHANGED_PROPERTY

    public static final java.lang.String UPLOAD_LISTENER_CHANGED_PROPERTY

See Also:
  Constant Field Values

Constructor Detail

### UploadSelect

    public UploadSelect()

  Creates an upload selector.

Method Detail

### addUploadListener

    public void addUploadListener(UploadListener l)
                           throws java.util.TooManyListenersException

  Adds an `UploadListener` to be notified of file uploads. This listener is unicast, only one may be added.

  Parameters:
    `l` - The listener to add.
  Throws:
    `java.util.TooManyListenersException`

### fileUpload

    public void fileUpload(java.io.InputStream in,
                           int size,
                           java.lang.String contentType,
                           java.lang.String filename)

  Notifies the upload listener that a file has been uploaded.

  Parameters:
    `in` - The inputstream containing the file.
    `size` - The length of the input stream.
    `contentType` - The content type of the uploaded file.
    `filename` - The name of the file, as specified by the client uploading it.

### getHeight

    public Extent getHeight()

  Returns the height of the upload select component.

  Returns:
    the height of the upload select component.

### getDisabledSendButtonText

    public java.lang.String getDisabledSendButtonText()

  Returns text displayed in "Send" button when it is disabled.

  Returns:
    The text displayed in "Send" button when it is disabled.

### getEnabledSendButtonText

    public java.lang.String getEnabledSendButtonText()

  Returns text displayed in "Send" button when it is enabled.

  Returns:
    The text displayed in "Send" button when it is enabled.

### getUploadListener

    public UploadListener getUploadListener()

  Returns the upload listener that will process file uploads when they occur.

  Returns:
    The upload listener that will process file uploads when they occur.

### getWidth

    public Extent getWidth()

  Returns the width of the upload select component.

  Returns:
    the width of the upload select component.

### removeUploadListener

    public void removeUploadListener(UploadListener l)

  Removes a (the) `UploadListener` from this `UploadSelect`.

  Parameters:
    `l` - The listener to remove.

### setHeight

    public void setHeight(Extent newValue)

  Sets the height of the upload select component.

  Parameters:
    `newValue` - The new height value.

### setUploadListener

    public void setUploadListener(UploadListener newValue)

  Sets the upload listener that will process file uploads when they occur.

  Parameters:
    `newValue` - The `UploadListener` that will process file uploads.

### setWidth

    public void setWidth(Extent newValue)

  Sets the width of the upload select component.

  Parameters:
    `newValue` - The new width value.

### setDisabledSendButtonText

    public void setDisabledSendButtonText(java.lang.String string)

  Sets the text displayed in the "Send" button when it is disabled.

  Parameters:
    `string` - text for the disabled button

### setEnabledSendButtonText

    public void setEnabledSendButtonText(java.lang.String string)

  Sets the text displayed in the "Send" button when it is enabled.

  Parameters:
    `string` - text for the enabled button

### isSendButtonDisplayed

    public boolean isSendButtonDisplayed()

  Returns whether the "Send" button should be displayed. By default, the button is displayed for the benefit of View environments (such as certain Web browsers) that do not support the automatic upload of a file once selected.

  Returns:
    true if the button will be displayed when the component is rendered

### setSendButtonDisplayed

    public void setSendButtonDisplayed(boolean b)

  Sets whether the "Send" button should be displayed when the component is rendered. This is a hint to the component's user interface peer and may be ignored. Peers that know the button is necessary because of limitations of the View environment (for example, on some Web browsers) should ignore this hint.

  Parameters:
    `b` - hint that the "Send" button should or should not be displayed

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD