UIFileChooser¶
-
php\swing\UIFileChooser extends: php\swing\UIContainer
Class UIFileChooser
Constants
Properties
- property
dialogTitle¶string
- property
approveButtonText¶string
- property
selectedFile¶
- property
selectedFiles¶php\swing\File[]
- property
multiSelection¶bool
- property
selectionMode¶int
Example: FILES_AND_DIRECTORIES, FILES_ONLY or DIRECTORIES_ONLY
- property
dragEnabled¶bool
- property
fileHiding¶bool
- property
controlButtonVisible¶bool
- property
acceptAllFileFilterUsed¶bool
Methods
showDialog($approveButtonText, $parent = null)¶
Parameters:
- $approveButtonText – string
- $parent – php\swing\UIWindow
Returns: bool
showSaveDialog($parent = null)¶
Parameters:
- $parent – php\swing\UIWindow
Returns: bool
showOpenDialog($parent = null)¶
Parameters:
- $parent – php\swing\UIWindow
Returns: bool
addChoosableFilter($filter, $description)¶
Parameters:
- $filter – callable - (File $file) -> bool
- $description – string
addChoosableExtensions($extensions, $description, $showDirectories = true)¶
Parameters:
- $extensions – array - [‘jpg’, ‘gif’, ‘png’, ... etc]
- $description – string
- $showDirectories – bool
resetChoosableFilters()¶
isTraversable($file)¶
Parameters:
- $file – string, php\io\File
Returns: bool
ensureFileIsVisible($file)¶
Parameters:
- $file – string, php\io\File
approveSelection()¶
cancelSelection()¶
changeToParentDirectory()¶
onFileView($field, $callback = null)¶
Parameters:
- $field – string - - name (string), description (string), icon (Image), traversable (bool)
- $callback – callable - (File $file)