Package org.opt4j.config.visualization
Class FileOperations
java.lang.Object
org.opt4j.config.visualization.FileOperations
The
FileOperations.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Fileprotected final FileChooserprotected final Set<FileOperations.FileOperationsListener>protected final ModuleRegisterprotected final SelectedModules -
Constructor Summary
ConstructorsConstructorDescriptionFileOperations(ModuleRegister moduleRegister, SelectedModules selectedModules, FileChooser fileChooser) Constructs aFileOperations. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener.getFile()Returns the current file.voidload()Opens the file chooser for loading the current configuration file.voidLoads the selected modules from the specified file.voidRemoves a listener.voidsave()Saves the current selected modules to the current file.voidSaves the current selected modules to the specified file.voidsaveAs()Opens the file chooser for saving the current configuration file.protected voidSets the current file
-
Field Details
-
file
-
fileChooser
-
moduleRegister
-
selectedModules
-
listeners
-
-
Constructor Details
-
FileOperations
@Inject public FileOperations(ModuleRegister moduleRegister, SelectedModules selectedModules, FileChooser fileChooser) Constructs aFileOperations.- Parameters:
moduleRegister- all available modulesselectedModules- all selected modulesfileChooser- the FileChooser
-
-
Method Details
-
setFile
Sets the current file- Parameters:
file- the current file- See Also:
-
getFile
Returns the current file.- Returns:
- the current file
- See Also:
-
load
public void load()Opens the file chooser for loading the current configuration file. -
saveAs
public void saveAs()Opens the file chooser for saving the current configuration file. -
load
Loads the selected modules from the specified file.- Parameters:
file- the configuration file
-
save
public void save()Saves the current selected modules to the current file. -
save
Saves the current selected modules to the specified file.- Parameters:
file- the configuration file
-
addListener
Adds a listener.- Parameters:
listener- the listener to add- See Also:
-
removeListener
Removes a listener.- Parameters:
listener- the listener to remove- See Also:
-