public abstract class FormData extends AbstractJIPipeParameterCollection implements JIPipeData, JIPipeValidatable
JIPipeParameterCollection
and is (de)serialized via the parameter system.
Its standard display function shows the user interface with placeholder valuesModifier and Type | Class and Description |
---|---|
static class |
FormData.Serializer |
static class |
FormData.TabSettings |
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterChangedEventEmitter, JIPipeParameterCollection.ParameterChangedEventListener, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEventEmitter, JIPipeParameterCollection.ParameterStructureChangedEventListener, JIPipeParameterCollection.ParameterUIChangedEvent, JIPipeParameterCollection.ParameterUIChangedEventEmitter, JIPipeParameterCollection.ParameterUIChangedEventListener
Modifier and Type | Method and Description |
---|---|
void |
customCopy(FormData source,
CustomValidationReportContext context,
JIPipeValidationReport report)
A custom copy function that copies the contents from source into this form.
|
void |
customReset()
A custom reset method
|
void |
exportData(JIPipeWriteDataStorage storage,
String name,
boolean forceName,
JIPipeProgressInfo progressInfo)
Saves the data to a folder
|
void |
fromJson(com.fasterxml.jackson.databind.JsonNode node)
Loads metadata from JSON
|
abstract Component |
getEditor(JIPipeWorkbench workbench)
Gets a component that acts as the editor for the form data.
|
FormData.TabSettings |
getTabSettings() |
static <T extends FormData> |
importData(JIPipeReadDataStorage storage,
Class<T> klass,
JIPipeProgressInfo progressInfo)
Helper method that simplifies the importData() method definition
|
boolean |
isImmutable()
Return true if this form data is replaceable via the "Apply to ..." function
|
boolean |
isUsingCustomCopy()
Determines whether this form data uses a custom copy method for the "Apply to ..." function
If false, duplicate() is used
If true, customCopy(src) is used
|
boolean |
isUsingCustomReset()
Determines whether this form data uses a custom reset method
If false, a new copy of the original data is created
If true, customReset() is called
|
abstract void |
loadData(JIPipeMultiIterationStep iterationStep)
This method is called by the form processor nodes on loading data into this form.
|
Component |
preview(int width,
int height)
This function generates a preview component for usage within the GUI
Can return null
|
abstract void |
writeData(JIPipeMultiIterationStep iterationStep)
This method should write any changes into the data batch
|
getParameterChangedEventEmitter, getParameterStructureChangedEventEmitter, getParameterUIChangedEventEmitter, onParameterChanged, onParameterStructureChanged, onParameterUIChanged, registerSubParameter, registerSubParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, createThumbnail, display, duplicate, exportThumbnails, getDescriptionOf, getMenuPathOf, getNameOf, getSortedList, getStorageDocumentation, getStorageSchema, groupByMenuPath, isCommon, isHeavy, isHidden, toDetailedString
generateValidityReport, reportValidity
emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, isParameterUIVisible, isParameterUIVisible, setParameter
public FormData()
public FormData(FormData other)
public static <T extends FormData> T importData(JIPipeReadDataStorage storage, Class<T> klass, JIPipeProgressInfo progressInfo)
T
- the form classstorage
- the storage folderklass
- the form classprogressInfo
- the progress infopublic void exportData(JIPipeWriteDataStorage storage, String name, boolean forceName, JIPipeProgressInfo progressInfo)
JIPipeData
exportData
in interface JIPipeData
storage
- The storage where the data should be writtenname
- A name reference that can be used to generate filename(s)forceName
- If enabled, the data is saved potentially destructively. Generated files must always contain the name parameter. This is used to collect results for humans or other algorithms.progressInfo
- the progresspublic Component preview(int width, int height)
JIPipeData
preview
in interface JIPipeData
width
- the target widthheight
- the target heightpublic abstract Component getEditor(JIPipeWorkbench workbench)
workbench
- the workbenchpublic abstract void loadData(JIPipeMultiIterationStep iterationStep)
iterationStep
- the data batchpublic abstract void writeData(JIPipeMultiIterationStep iterationStep)
iterationStep
- the data batchpublic void fromJson(com.fasterxml.jackson.databind.JsonNode node)
node
- JSON nodepublic boolean isImmutable()
public boolean isUsingCustomCopy()
public boolean isUsingCustomReset()
public void customCopy(FormData source, CustomValidationReportContext context, JIPipeValidationReport report)
JIPipeValidationReport
to report issues.source
- the source datacontext
- the contextreport
- the error reportpublic void customReset()
public FormData.TabSettings getTabSettings()
Copyright © 2020–2024 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.