Package com.dassault_systemes.catjdialog

   
Class CATUploadButton

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjdialog.CATCallbackSource
        |
        +-com.dassault_systemes.catjdialog.CATDialog
              |
              +-com.dassault_systemes.catjdialog.CATButton
                    |
                    +-com.dassault_systemes.catjdialog.CATUploadButton
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATUploadButton

The upload button graphical component.

Presentation:

This is a button that opens an upload form when pressed.
The application can be notified when the button is pressed, and when a file has been uploaded.

CATUploadButton Properties:

CATUploadButton Notifications:

CATUploadButton Message Catalog Implicit Mappings:

   All Implemented Interfaces:
CATIUploader
Field Summary

Constructor Summary
CATUploadButton(CATDialog iDialog, String iName)

Method Summary
void setTarget(String iFileName)
String getTarget()
void setAcceptedExtensions(String[] iAcceptedExt)
String[] getAcceptedExtensions()
void setTargetStream(OutputStream iStream)
OutputStream getTargetStream()
String getSource()
CATNotification getUploadNotification()


Field Detail

Constructor Detail

CATUploadButton

    CATUploadButton(CATDialog iDialog, String iName)

Creates an upload button with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This upload button name. Here are some rules for this name:
  • It is set in the constructor, and cannot be changed afterwards.
  • The name must be unique for the parent (2 children with the same name are not allowed).
  • The name may not contain any ot the following characters: '.' (dot), ' ' (blank), '_' (underscore)

Method Detail

setTarget

    void setTarget(String iFileName)

Sets the upload target filename.

Parameters:
iFileName
The upload target filename.

getTarget

    String getTarget()

Returns the upload target filename.

Returns:
The upload target filename.

setAcceptedExtensions

    void setAcceptedExtensions(String[] iAcceptedExt)

Sets the accepted file extensions.

The upload form will refuse to load a with with an extension that is not in the list.
A null value unsets extension filtering.

Parameters:
iAcceptedExt
Accepted extensions in a string array. Ex: { "bmp", "CATPart", "exe" }. A null value unsets the extension check.

getAcceptedExtensions

    String[] getAcceptedExtensions()

Returns the accepted file extensions (may be null).

Returns:
Accepted extensions in a string array.

setTargetStream

    void setTargetStream(OutputStream iStream)

Sets the upload target stream.

If not set, the file is saved locally in the filename specified with the setTarget() method.

Parameters:
iStream
The upload target stream.

getTargetStream

    OutputStream getTargetStream()

Returns the upload target stream.

Returns:
The upload target stream.

getSource

    String getSource()

Returns the uploaded source file name.

Returns:
The uploaded source file name.

getUploadNotification

    CATNotification getUploadNotification()

Returns the upload notification.

This notification is sent right after a file has been uploaded.

Returns:
The upload notification.


Copyright © 2000, Dassault Systèmes. All rights reserved