file_chooser
anomaly_match_ui.widgets.file_chooser
¶
Styled file/folder chooser wrapper for AnomalyMatch UI.
AMFileChooser(path='', *, filename='', select_default=False, show_only_dirs=False, filter_pattern='', title='', purpose='')
¶
Bases: VBox
Dark-themed file/folder chooser for AnomalyMatch UI.
Wraps ipyfilechooser.FileChooser with ESA-branded dark styling
scoped via the .am-file-chooser CSS class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Initial directory to display. |
''
|
select_default
|
bool
|
Whether to pre-select the default path. |
False
|
show_only_dirs
|
bool
|
If |
False
|
filter_pattern
|
str
|
Glob pattern to filter files (e.g. |
''
|
title
|
str
|
Optional label displayed above the chooser. |
''
|
purpose
|
str
|
Stable key identifying this chooser site (e.g.
|
''
|
Source code in anomaly_match_ui/widgets/file_chooser.py
selected
property
¶
Return the currently selected path, or None.
selected_filename
property
¶
Return the selected filename component.
register_callback(callback)
¶
Observe selection changes.
Multiple callers can register; each is invoked in registration order on every selection. An exception in one does not stop the rest from firing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback
|
Callable
|
Called with the underlying |
required |
Source code in anomaly_match_ui/widgets/file_chooser.py
reset(path=None)
¶
Reset the chooser, optionally to a new path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | None
|
New starting directory. Uses the current directory if |
None
|