Package org.opt4j.config.visualization
Class FileOperations
java.lang.Object
org.opt4j.config.visualization.FileOperations
The
FileOperations
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected File
protected final FileChooser
protected final Set<FileOperations.FileOperationsListener>
protected final ModuleRegister
protected final SelectedModules
-
Constructor Summary
ConstructorDescriptionFileOperations
(ModuleRegister moduleRegister, SelectedModules selectedModules, FileChooser fileChooser) Constructs aFileOperations
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener.getFile()
Returns the current file.void
load()
Opens the file chooser for loading the current configuration file.void
Loads the selected modules from the specified file.void
Removes a listener.void
save()
Saves the current selected modules to the current file.void
Saves the current selected modules to the specified file.void
saveAs()
Opens the file chooser for saving the current configuration file.protected void
Sets 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:
-