public class FileChooser extends Object implements IFileChooser
Modifier and Type | Class and Description |
---|---|
protected class |
FileChooser.P_UIFacade |
DEFAULT_MAXIMUM_UPLOAD_SIZE
Constructor and Description |
---|
FileChooser() |
FileChooser(boolean multiSelect) |
FileChooser(Collection<String> fileExtensions) |
FileChooser(Collection<String> fileExtensions,
boolean multiSelect) |
Modifier and Type | Method and Description |
---|---|
void |
addFileChooserListener(FileChooserListener listener) |
protected void |
fireClosed() |
protected void |
fireFileChooserEvent(FileChooserEvent e) |
IDisplayParent |
getDisplayParent() |
List<String> |
getFileExtensions() |
List<org.eclipse.scout.rt.platform.resource.BinaryResource> |
getFiles() |
long |
getMaximumUploadSize() |
IFileChooserUIFacade |
getUIFacade() |
boolean |
isMultiSelect() |
void |
removeFileChooserListener(FileChooserListener listener) |
void |
setDisplayParent(IDisplayParent displayParent)
Sets the display parent to attach this
IFileChooser to. |
void |
setFiles(List<org.eclipse.scout.rt.platform.resource.BinaryResource> result)
Sets the result and releases the blocking condition held by
IFileChooser.startChooser() . |
void |
setMaximumUploadSize(long maximumUploadSize) |
List<org.eclipse.scout.rt.platform.resource.BinaryResource> |
startChooser()
start file choosing and block until a result is available
|
public FileChooser()
public FileChooser(boolean multiSelect)
public FileChooser(Collection<String> fileExtensions)
public FileChooser(Collection<String> fileExtensions, boolean multiSelect)
public IFileChooserUIFacade getUIFacade()
getUIFacade
in interface IFileChooser
public IDisplayParent getDisplayParent()
getDisplayParent
in interface IFileChooser
IDisplayParent
to attach this IFileChooser
to; is never null
.public void setDisplayParent(IDisplayParent displayParent)
IFileChooser
IFileChooser
to.
A display parent is the anchor to attach this IFileChooser
to, and affects its accessibility and modality
scope. Possible parents are IDesktop
, IOutline
, or IForm
:
IFileChooser
is always accessible; blocks the entire desktop;IFileChooser
is only accessible when the given outline is active; only blocks the outline;
IFileChooser
is only accessible when the given Form is active; only blocks the Form;setDisplayParent
in interface IFileChooser
displayParent
- like IDesktop
, IOutline
, IForm
, or null
to derive the
IDisplayParent
from the current calling context.public void addFileChooserListener(FileChooserListener listener)
addFileChooserListener
in interface IFileChooser
public void removeFileChooserListener(FileChooserListener listener)
removeFileChooserListener
in interface IFileChooser
public List<String> getFileExtensions()
getFileExtensions
in interface IFileChooser
media and mime types are specified using at least a subtype (such containing a '/')
File extensions are specified without leading '.'
Example 1: [txt, csv, text/xml]
Example 2: [text/plain, text/csv, xml]
public boolean isMultiSelect()
isMultiSelect
in interface IFileChooser
public void setMaximumUploadSize(long maximumUploadSize)
setMaximumUploadSize
in interface IFileChooser
maximumUploadSize
- maximum size for upload in bytes.public long getMaximumUploadSize()
getMaximumUploadSize
in interface IFileChooser
public List<org.eclipse.scout.rt.platform.resource.BinaryResource> startChooser()
IFileChooser
startChooser
in interface IFileChooser
IFileChooser.getFiles()
public void setFiles(List<org.eclipse.scout.rt.platform.resource.BinaryResource> result)
IFileChooser
IFileChooser.startChooser()
.setFiles
in interface IFileChooser
public List<org.eclipse.scout.rt.platform.resource.BinaryResource> getFiles()
getFiles
in interface IFileChooser
IFileChooser.startChooser()
(empty list if chooser was not yet started)protected void fireClosed()
protected void fireFileChooserEvent(FileChooserEvent e)
Copyright © 2010–2018. All rights reserved.