public interface JIPipeParameterCollection
Modifier and Type | Interface and Description |
---|---|
static class |
JIPipeParameterCollection.ParameterChangedEvent
Triggered when a parameter holder's parameters are changed
|
static class |
JIPipeParameterCollection.ParameterStructureChangedEvent
Triggered by an
JIPipeParameterCollection if the list of available parameters is changed. |
static class |
JIPipeParameterCollection.ParameterUIChangedEvent
Triggered by an
JIPipeParameterCollection if the parameter UI should be updated |
Modifier and Type | Method and Description |
---|---|
default void |
addParameterChangeListener(Consumer<JIPipeParameterCollection.ParameterChangedEvent> consumer)
Adds a listener to the change of any parameter.
|
default void |
addParameterChangeListener(String key,
Consumer<JIPipeParameterCollection.ParameterChangedEvent> consumer)
Adds a listener to the change of a parameter of the specified key.
|
default List<JIPipeParameterCollectionContextAction> |
getContextActions()
List of context actions that are added to this collection.
|
EventBus |
getEventBus()
Gets the event bus that posts events about the parameters
|
default <T> T |
getParameter(String key,
Class<T> klass)
Gets a parameter
|
default JIPipeParameterAccess |
getParameterAccess(String key)
Gets an access instance to a parameter of the defined key
|
default JComponent |
installUIOverrideParameterEditor(ParameterPanel parameterPanel,
JIPipeParameterEditorUI parameterEditorUI)
Allows to replace the UI that is inserted into the parameter panel with a different component
Labels are not affected
Please note that the root parameter collection handles this task for all sub-parameters
|
default void |
installUIParameterOptions(ParameterPanel parameterPanel,
JIPipeParameterEditorUI parameterEditorUI,
JPopupMenu menu)
Allows to install additional operations into the context menu of each parameter (triangle menu next to the help)
Please note that the root parameter collection handles this task for all sub-parameters
|
default boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
default boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterCollection subParameter)
Allows to override the visibility of sub-parameters inside the UI
|
default boolean |
setParameter(String key,
Object value)
Sets a parameter and triggers the associated events
|
default void |
triggerParameterChange(String key)
Triggers a
JIPipeParameterCollection.ParameterChangedEvent on this collection |
default void |
triggerParameterStructureChange()
Triggers a
JIPipeParameterCollection.ParameterStructureChangedEvent on this collection |
default void |
triggerParameterUIChange()
Triggers a
JIPipeParameterCollection.ParameterUIChangedEvent on this collection |
default boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterAccess access)
tree
- the parameter tree that is used to access this parameteraccess
- the parameterdefault boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterCollection subParameter)
tree
- the parameter tree that is used to access this parametersubParameter
- a sub parameterdefault void triggerParameterStructureChange()
JIPipeParameterCollection.ParameterStructureChangedEvent
on this collectiondefault void triggerParameterUIChange()
JIPipeParameterCollection.ParameterUIChangedEvent
on this collectiondefault void triggerParameterChange(String key)
JIPipeParameterCollection.ParameterChangedEvent
on this collectionkey
- the parameter keydefault void addParameterChangeListener(String key, Consumer<JIPipeParameterCollection.ParameterChangedEvent> consumer)
key
- the parameter keyconsumer
- the listenerdefault void addParameterChangeListener(Consumer<JIPipeParameterCollection.ParameterChangedEvent> consumer)
consumer
- the listenerdefault boolean setParameter(String key, Object value)
key
- the parameter keyvalue
- the parameter valuedefault JIPipeParameterAccess getParameterAccess(String key)
key
- the parameter keydefault <T> T getParameter(String key, Class<T> klass)
T
- the parameter classkey
- the parameter keyklass
- the parameter classdefault List<JIPipeParameterCollectionContextAction> getContextActions()
JIPipeContextAction
EventBus getEventBus()
JIPipeParameterCollection.ParameterChangedEvent
and JIPipeParameterCollection.ParameterStructureChangedEvent
default void installUIParameterOptions(ParameterPanel parameterPanel, JIPipeParameterEditorUI parameterEditorUI, JPopupMenu menu)
parameterPanel
- the parameter panelparameterEditorUI
- the currently handled parameter editormenu
- the menudefault JComponent installUIOverrideParameterEditor(ParameterPanel parameterPanel, JIPipeParameterEditorUI parameterEditorUI)
parameterPanel
- the parameter panelparameterEditorUI
- the currently handled parameter editorCopyright © 2020–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.