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¶
intExample: 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)¶
Параметры:
- $approveButtonText –
string- $parent – php\swing\UIWindow
Результат:
bool
showSaveDialog($parent = null)¶
Параметры:
- $parent – php\swing\UIWindow
Результат:
bool
showOpenDialog($parent = null)¶
Параметры:
- $parent – php\swing\UIWindow
Результат:
bool
addChoosableFilter($filter, $description)¶
Параметры:
- $filter –
callable- (File $file) -> bool- $description –
string
addChoosableExtensions($extensions, $description, $showDirectories = true)¶
Параметры:
- $extensions –
array- [‘jpg’, ‘gif’, ‘png’, ... etc]- $description –
string- $showDirectories –
bool
resetChoosableFilters()¶
isTraversable($file)¶
Параметры:
- $file –
string, php\io\FileРезультат:
bool
ensureFileIsVisible($file)¶
Параметры:
- $file –
string, php\io\File
approveSelection()¶
cancelSelection()¶
changeToParentDirectory()¶
onFileView($field, $callback = null)¶
Параметры:
- $field –
string- - name (string), description (string), icon (Image), traversable (bool)- $callback –
callable- (File $file)