scijava / scijava-ui-swing

SciJava UI components for Java Swing.
BSD 2-Clause "Simplified" License
7 stars 11 forks source link

SwingFileWidget: support 'pattern' style #57

Open imagejan opened 3 years ago

imagejan commented 3 years ago

In addition to a style attribute like extensions:tif/tiff, we should support a way to define file name patterns, such as pattern:WildType*.tif (wildcard pattern) and/or pattern:^[A-Za-z0-9]+\.png (regex pattern).

Getting the style modifier will be simplified once https://github.com/scijava/scijava-common/pull/405 is merged and released.

Open questions:

imagejan commented 3 years ago

In addition to regex patterns for filtering valid inputs, we should also consider how the usage of File[List]Widgets with file patterns in SCIFIO for actual inputs, see also https://github.com/scifio/scifio/issues/431 and https://github.com/scifio/scifio/issues/432 for related discussion.