Class PlatformFileCollector

java.lang.Object
com.globalmentor.beans.BoundPropertyObject
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, DepictedObject

public class PlatformFileCollector extends AbstractDepictedObject
Encapsulation of a list of platform files and a way to collect them. The installed depictor must be of the specialized type PlatformFileCollector.Depictor.
Author:
Garret Wilson
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    The custom depictor type for this depicted object class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The bound property of the selected platform files.

    Fields inherited from class com.globalmentor.beans.BoundPropertyObject

    NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Requests that the user be presented a dialog for browsing files.
    void
    cancel(PlatformFile platformFile)
    Cancels a platform file upload or download.
     
    List<? extends PlatformFile>
     
    void
    setPlatformFiles(List<? extends PlatformFile> newPlatformFiles)
    Sets the platform files.
    void
    upload(PlatformFile platformFile, URI destinationURI)
    Initiates a platform file upload.

    Methods inherited from class io.guise.framework.platform.AbstractDepictedObject

    depict, equals, exportTransfer, getDepictID, getEventListenerManager, hashCode, processEvent, toString

    Methods inherited from class io.guise.framework.event.GuiseBoundPropertyObject

    getSession

    Methods inherited from class com.globalmentor.beans.BoundPropertyObject

    addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.guise.framework.platform.DepictedObject

    getSession
  • Field Details

    • PLATFORM_FILES_PROPERTY

      public static final String PLATFORM_FILES_PROPERTY
      The bound property of the selected platform files.
  • Constructor Details

    • PlatformFileCollector

      public PlatformFileCollector()
      Default constructor.
  • Method Details

    • getDepictor

      public PlatformFileCollector.Depictor<? extends PlatformFileCollector> getDepictor()
      Specified by:
      getDepictor in interface DepictedObject
      Overrides:
      getDepictor in class AbstractDepictedObject
      Returns:
      The depictor for this object.
    • getPlatformFiles

      public List<? extends PlatformFile> getPlatformFiles()
      Returns:
      The selected platform files.
    • setPlatformFiles

      public void setPlatformFiles(List<? extends PlatformFile> newPlatformFiles)
      Sets the platform files. This is a bound property. This method is called by the platform; it should never be called directly from an application.
      Parameters:
      newPlatformFiles - The new selected platform files.
      Throws:
      NullPointerException - if the given platform files is null.
      See Also:
    • browse

      public void browse()
      Requests that the user be presented a dialog for browsing files.
    • cancel

      public void cancel(PlatformFile platformFile)
      Cancels a platform file upload or download.
      Parameters:
      platformFile - Thet platform file to cancel.
      Throws:
      NullPointerException - if the given platform file is null.
      IllegalStateException - the specified platform file can no longer be canceled because, for example, other platform files have since been selected.
    • upload

      public void upload(PlatformFile platformFile, URI destinationURI)
      Initiates a platform file upload.
      Parameters:
      platformFile - The platform file to upload.
      destinationURI - The URI representing the destination of the platform file, either absolute or relative to the application.
      Throws:
      NullPointerException - if the given platform file and/or destination URI is null.
      IllegalStateException - the specified platform file can no longer be uploaded because, for example, other platform files have since been selected.