78 | | ^(Describe your design here.)^ |
| 78 | * We need to enable the FileDialog to use the mode JFileChooser.FILES_AND)DIRECTORIES when the dialog is shown with multy-select enabled. Every time the dialog is shown with enabled multy select we will be able to choose both directories and multiple files. Another change is that FileDialogInput.FileContainer should return list of all files in the directoriy trees choosed flatten. Importing of all kind of resources from files will be done with FileDialogs with multiple selection enabled. |
| 79 | * Importing resources: Importing of resources has to have one centralized logic. There are three kinds of import - importing resource, importing resource and inserting frame for it and inserting frame for already imported resource. |
| 80 | * ResourceImportManager: |
| 81 | * The manager will handle importing of resources some of the routines while importing are the same so the manager will be abstract class with default implementations for them. Every importable resource will have implementation of the manager. The implementations will provide some meta data needed for the import and methods for creating the resource and retrieving its data from different sources like files for example. The managers are immutable and generic for the resource data type (For example ImmImage for image resource). Methods of the ResourceImportManager are: |
| 82 | * {{{String getImportRole()}}} : Abstract method which provides import role, these roles are used for retrieving the right manager for the right resource import. For example when we import image we have something like import image role. |
| 83 | * {{{String getResourceKind()}}} : Abstract method that provides the kind of the resource of the manager. |
| 84 | * {{{ResourceRefR4 generateChildRef()}}} : Method using generics to create good child reference for the right resource kind... Not needed but helps a lot for readable refs. |
| 85 | * {{{List<ResourceImportInfo> retrieveResourceInfo(ResourceImportProvider provider)}}} : That method have default implementation. |