public abstract class PlotData extends AbstractJIPipeParameterCollection implements JIPipeData, JIPipeValidatable
Modifier and Type | Class and Description |
---|---|
static class |
PlotData.Serializer
Serializes the metadata of
PlotData |
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterChangedEventEmitter, JIPipeParameterCollection.ParameterChangedEventListener, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEventEmitter, JIPipeParameterCollection.ParameterStructureChangedEventListener, JIPipeParameterCollection.ParameterUIChangedEvent, JIPipeParameterCollection.ParameterUIChangedEventEmitter, JIPipeParameterCollection.ParameterUIChangedEventListener
Constructor and Description |
---|
PlotData()
Creates a new empty instance
|
PlotData(PlotData other)
Creates a copy of the provided data
|
Modifier and Type | Method and Description |
---|---|
void |
addSeries(PlotDataSeries series)
Adds a new series into this plot
|
static void |
calibrateAxis(org.jfree.chart.axis.ValueAxis axis,
OptionalDoubleParameter min,
OptionalDoubleParameter max)
Calibrates the axes of a plot, setting min and max values
|
void |
clearSeries()
Removes all series
|
ResultsTableData |
createSeriesTable()
Generates an empty series table with the correct columns
|
JIPipeThumbnailData |
createThumbnail(int width,
int height,
JIPipeProgressInfo progressInfo)
This function generates a thumbnail for this data
Can return null
|
void |
display(String displayName,
JIPipeWorkbench workbench,
JIPipeDataSource source)
This function should display the data in the GUI.
|
JIPipeData |
duplicate(JIPipeProgressInfo progressInfo)
Duplicates the data
|
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
|
Color |
getBackgroundColor() |
abstract org.jfree.chart.JFreeChart |
getChart() |
ColorMap |
getColorMap() |
Paint[] |
getCurrentColorMap() |
ColorListParameter |
getCustomColorMap() |
int |
getExportHeight() |
int |
getExportWidth() |
Color |
getGridColor() |
int |
getLegendFontSize() |
PlotMetadata |
getMetadata()
Gets the metadata for this plot instance.
|
List<PlotDataSeries> |
getSeries() |
String |
getTitle() |
int |
getTitleFontSize() |
static <T extends PlotData> |
importData(JIPipeReadDataStorage storage,
Class<T> klass,
JIPipeProgressInfo progressInfo) |
static <T extends PlotData> |
importData(JIPipeReadDataStorage storage,
JIPipeProgressInfo progressInfo) |
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
boolean |
isUseCustomColorMap() |
boolean |
isWithLegend() |
Component |
preview(int width,
int height)
This function generates a preview component for usage within the GUI
Can return null
|
void |
removeSeries(PlotDataSeries series)
Removes a series
|
void |
reportValidity(JIPipeValidationReportContext reportContext,
JIPipeValidationReport report)
Generates a validity report
|
void |
setBackgroundColor(Color backgroundColor) |
void |
setColorMap(ColorMap colorMap) |
void |
setCustomColorMap(ColorListParameter customColorMap) |
void |
setExportHeight(int exportHeight) |
void |
setExportWidth(int exportWidth) |
void |
setGridColor(Color gridColor) |
void |
setLegendFontSize(int legendFontSize) |
void |
setTitle(String title)
Sets the plot title
|
boolean |
setTitleFontSize(int titleFontSize) |
void |
setUseCustomColorMap(boolean useCustomColorMap) |
void |
setWithLegend(boolean withLegend) |
String |
toString() |
protected void |
updateChartProperties(org.jfree.chart.JFreeChart chart)
Sets properties of charts
|
getParameterChangedEventEmitter, getParameterStructureChangedEventEmitter, getParameterUIChangedEventEmitter, onParameterChanged, onParameterStructureChanged, onParameterUIChanged, registerSubParameter, registerSubParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, exportThumbnails, getDescriptionOf, getMenuPathOf, getNameOf, getSortedList, getStorageDocumentation, getStorageSchema, groupByMenuPath, isCommon, isHeavy, isHidden, toDetailedString
generateValidityReport
emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, isParameterUIVisible, setParameter
public PlotData()
public PlotData(PlotData other)
other
- the originalpublic static <T extends PlotData> T importData(JIPipeReadDataStorage storage, JIPipeProgressInfo progressInfo)
public static <T extends PlotData> T importData(JIPipeReadDataStorage storage, Class<T> klass, JIPipeProgressInfo progressInfo)
public static void calibrateAxis(org.jfree.chart.axis.ValueAxis axis, OptionalDoubleParameter min, OptionalDoubleParameter max)
axis
- the axismin
- the min valuemax
- the max valuepublic void display(String displayName, JIPipeWorkbench workbench, JIPipeDataSource source)
JIPipeData
JIPipeDataDisplayOperation
that can be registered separately.
This item will always be shown as "Default" in the list of operations.display
in interface JIPipeData
displayName
- a name that can be usedworkbench
- the workbenchsource
- optional source of the data. Can be null or any kind of data type (e.g. JIPipeDataSlot
)public Component preview(int width, int height)
JIPipeData
preview
in interface JIPipeData
width
- the target widthheight
- the target heightpublic JIPipeThumbnailData createThumbnail(int width, int height, JIPipeProgressInfo progressInfo)
JIPipeData
createThumbnail
in interface JIPipeData
width
- the widthheight
- the heightprogressInfo
- 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 JIPipeData duplicate(JIPipeProgressInfo progressInfo)
JIPipeData
duplicate
in interface JIPipeData
progressInfo
- the progress of duplicating the datapublic abstract org.jfree.chart.JFreeChart getChart()
public String getTitle()
public void setTitle(String title)
title
- The titlepublic int getExportWidth()
public void setExportWidth(int exportWidth)
public int getExportHeight()
public void setExportHeight(int exportHeight)
public Color getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
public Color getGridColor()
public void setGridColor(Color gridColor)
public boolean isWithLegend()
public void setWithLegend(boolean withLegend)
public int getTitleFontSize()
public boolean setTitleFontSize(int titleFontSize)
public int getLegendFontSize()
public void setLegendFontSize(int legendFontSize)
public ColorMap getColorMap()
public void setColorMap(ColorMap colorMap)
public boolean isUseCustomColorMap()
public void setUseCustomColorMap(boolean useCustomColorMap)
public ColorListParameter getCustomColorMap()
public void setCustomColorMap(ColorListParameter customColorMap)
public Paint[] getCurrentColorMap()
public boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterAccess access)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
tree
- the parameter tree that is used to access this parameteraccess
- the parameterprotected void updateChartProperties(org.jfree.chart.JFreeChart chart)
chart
- the chartpublic PlotMetadata getMetadata()
public ResultsTableData createSeriesTable()
public void reportValidity(JIPipeValidationReportContext reportContext, JIPipeValidationReport report)
JIPipeValidatable
reportValidity
in interface JIPipeValidatable
reportContext
- the report contextreport
- the report to be added topublic List<PlotDataSeries> getSeries()
public void addSeries(PlotDataSeries series)
series
- the seriespublic void removeSeries(PlotDataSeries series)
series
- the seriespublic void clearSeries()
public void fromJson(com.fasterxml.jackson.databind.JsonNode node)
node
- JSON nodeCopyright © 2020–2024 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.