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)
Creates an upload button with the specified parent and name.

Method Summary
public String[] getAcceptedExtensions()
Returns the accepted file extensions (may be null).
public String getSource()
Returns the uploaded source file name.
public String getTarget()
Returns the upload target filename.
public OutputStream getTargetStream()
Returns the upload target stream.
public CATNotification getUploadNotification()
Returns the upload notification.
public void setAcceptedExtensions(String[] iAcceptedExt)
Sets the accepted file extensions.
public void setTarget(String iFileName)
Sets the upload target filename.
public void setTargetStream(OutputStream iStream)
Sets the upload target stream.


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

getAcceptedExtensions

    public String[] getAcceptedExtensions()

Returns the accepted file extensions (may be null).

Return:
Accepted extensions in a string array.

getSource

    public String getSource()

Returns the uploaded source file name.

Return:
The uploaded source file name.

getTarget

    public String getTarget()

Returns the upload target filename.

Return:
The upload target filename.

getTargetStream

    public OutputStream getTargetStream()

Returns the upload target stream.

Return:
The upload target stream.

getUploadNotification

    public CATNotification getUploadNotification()

Returns the upload notification.

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

Return:
The upload notification.

setAcceptedExtensions

    public 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.

setTarget

    public void setTarget(String iFileName)

Sets the upload target filename.

Parameters:
iFileName
The upload target filename.

setTargetStream

    public 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.


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