public class JIPipeSettingsRegistry extends Object implements JIPipeParameterCollection, JIPipeCustomParameterCollection
| Modifier and Type | Class and Description |
|---|---|
static class |
JIPipeSettingsRegistry.Sheet
A settings sheet
|
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterUIChangedEvent| Constructor and Description |
|---|
JIPipeSettingsRegistry(JIPipe jiPipe) |
| Modifier and Type | Method and Description |
|---|---|
EventBus |
getEventBus()
Gets the event bus that posts events about the parameters
|
JIPipe |
getJIPipe() |
Map<String,JIPipeParameterAccess> |
getParameters()
Returns all parameters
Please note that those parameters must be sourced in this collection.
|
static Path |
getPropertyFile() |
static com.fasterxml.jackson.databind.JsonNode |
getRawNode()
Gets the raw property files Json node
|
BiMap<String,JIPipeSettingsRegistry.Sheet> |
getRegisteredSheets() |
<T extends JIPipeParameterCollection> |
getSettings(String id,
Class<T> settingsClass)
Gets the settings instance with given ID
|
void |
load(Path file)
Loads settings from the specified file
|
void |
onSettingChanged(JIPipeParameterCollection.ParameterChangedEvent event)
Triggered when a setting was changed
|
void |
register(String id,
String name,
Icon icon,
String category,
Icon categoryIcon,
JIPipeParameterCollection parameterCollection)
Registers a new settings sheet
|
void |
register(String id,
String name,
String description,
Icon icon,
String category,
Icon categoryIcon,
JIPipeParameterCollection parameterCollection)
Registers a new settings sheet
|
void |
reload()
Reloads the settings from the default file if it exists
|
void |
save()
Saves the settings to the default settings file
|
void |
save(Path file)
Saves the settings to the specified file
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildParameterCollections, getIncludeReflectionParametersaddParameterChangeListener, addParameterChangeListener, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, isParameterUIVisible, isParameterUIVisible, setParameter, triggerParameterChange, triggerParameterStructureChange, triggerParameterUIChangepublic JIPipeSettingsRegistry(JIPipe jiPipe)
public static com.fasterxml.jackson.databind.JsonNode getRawNode()
public static Path getPropertyFile()
public void register(String id, String name, Icon icon, String category, Icon categoryIcon, JIPipeParameterCollection parameterCollection)
id - unique ID of the sheetname - sheet nameicon - sheet iconcategory - sheet category. If left null or empty, it will default to "General"categoryIcon - optional icon. If null, a wrench icon is used.parameterCollection - the object that holds the parameterspublic void register(String id, String name, String description, Icon icon, String category, Icon categoryIcon, JIPipeParameterCollection parameterCollection)
id - unique ID of the sheetname - sheet namedescription - sheet descriptionicon - sheet iconcategory - sheet category. If left null or empty, it will default to "General"categoryIcon - optional icon. If null, a wrench icon is used.parameterCollection - the object that holds the parameterspublic <T extends JIPipeParameterCollection> T getSettings(String id, Class<T> settingsClass)
T - the settings classid - the IDsettingsClass - the settings classpublic BiMap<String,JIPipeSettingsRegistry.Sheet> getRegisteredSheets()
public EventBus getEventBus()
JIPipeParameterCollectiongetEventBus in interface JIPipeParameterCollectionJIPipeParameterCollection.ParameterChangedEvent and JIPipeParameterCollection.ParameterStructureChangedEventpublic Map<String,JIPipeParameterAccess> getParameters()
JIPipeCustomParameterCollectiongetParameters in interface JIPipeCustomParameterCollectionJIPipeParameterAccess.getKey()public void save(Path file)
file - the file pathpublic void save()
public void load(Path file)
file - the filepublic void onSettingChanged(JIPipeParameterCollection.ParameterChangedEvent event)
event - generated eventpublic void reload()
public JIPipe getJIPipe()
Copyright © 2020–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.