public abstract class FormData extends Object implements JIPipeData, JIPipeParameterCollection, 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.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterUIChangedEvent
Modifier and Type | Method and Description |
---|---|
void |
customCopy(FormData source,
JIPipeIssueReport 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.
|
EventBus |
getEventBus()
Gets the event bus that posts events about the parameters
|
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(JIPipeMergingDataBatch dataBatch)
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(JIPipeMergingDataBatch dataBatch)
This method should write any changes into the data batch
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, display, duplicate, exportThumbnails, getDescriptionOf, getMenuPathOf, getNameOf, getSortedList, getStorageDocumentation, getStorageSchema, groupByMenuPath, isCommon, isHeavy, isHidden, toDetailedString
addParameterChangeListener, addParameterChangeListener, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, isParameterUIVisible, isParameterUIVisible, setParameter, triggerParameterChange, triggerParameterStructureChange, triggerParameterUIChange
generateValidityReport, reportValidity
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 EventBus getEventBus()
JIPipeParameterCollection
getEventBus
in interface JIPipeParameterCollection
JIPipeParameterCollection.ParameterChangedEvent
and JIPipeParameterCollection.ParameterStructureChangedEvent
public abstract void loadData(JIPipeMergingDataBatch dataBatch)
dataBatch
- the data batchpublic abstract void writeData(JIPipeMergingDataBatch dataBatch)
dataBatch
- 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, JIPipeIssueReport report)
JIPipeIssueReport
to report issues.source
- the source datareport
- the error reportpublic void customReset()
public FormData.TabSettings getTabSettings()
Copyright © 2020–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.