Package io.deephaven.plot
Class BaseFigureImpl
java.lang.Object
io.deephaven.plot.BaseFigureImpl
- All Implemented Interfaces:
BaseFigure
,PlotExceptionCause
,Serializable
Container for
Chart
s.- See Also:
-
Constructor Summary
ModifierConstructorDescriptionCreates a new Figure instance with a 1x1 grid.BaseFigureImpl
(int numRows, int numCols) Creates a new Figure instance with anumRows
xnumCols
grid.protected
BaseFigureImpl
(BaseFigureImpl figure) Creates a copy of a Figure. -
Method Summary
Modifier and TypeMethodDescriptionchart
(int index) Returns a chart from this Figure's grid.chart
(int rowNum, int colNum) Returns a chart from this Figure's grid.void
void
copy()
Creates a copy of this Figure.figureRemoveSeries
(String... removeSeriesNames) Removes all series withnames
from this Figure.figureTitle
(String title) Sets the title of this FigurefigureTitleColor
(Paint color) Sets the color of this Figure's titlefigureTitleColor
(String color) Sets the color of this Figure's titlefigureTitleFont
(Font font) Sets the font of this Figure's titlefigureTitleFont
(String family, String style, int size) Sets the font of this Figure's titleGets this Figure'sChart
s.int
Gets the numRows of this Figure.getName()
Gets the partitioned tables associated with this figure.int
Gets the table handles associated with this figure.getTitle()
Gets the title of this Figure.Gets thePaint
of this Figure's title.Gets theFont
of this Figure's title.long
Gets the updateInterval, in milliseconds, for this Figure.int
getWidth()
Gets the width of this Figure.boolean
Whether this Figure's height and width are changeable.newChart()
Adds a newChart
to this figure.newChart
(int index) Adds a newChart
to this figure.newChart
(int rowNum, int colNum) Adds a newChart
to this figure.void
registerFigureFunction
(FigureImplFunction function) void
registerPartitionedTableFunction
(PartitionedTableHandle partitionedTableHandle, Function<Table, Table> tableTransform) void
registerTableFunction
(Table t, Function<Table, Table> function) removeChart
(int removeChartIndex) Removes a chart from the Figure's grid.removeChart
(int removeChartRowNum, int removeChartColNum) Removes a chart from the Figure's grid.void
void
setSessionId
(int sessionId) updateInterval
(long updateIntervalMillis) Sets the update interval of this Figure.void
Checks if the figure can be instantiated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.plot.BaseFigure
save, save, save, save
-
Constructor Details
-
BaseFigureImpl
public BaseFigureImpl()Creates a new Figure instance with a 1x1 grid. If newChart() with no arguments is called on this new Figure, the Figure will resize itself to hold the newChart
. -
BaseFigureImpl
public BaseFigureImpl(int numRows, int numCols) Creates a new Figure instance with anumRows
xnumCols
grid.- Parameters:
numRows
- number of rowsnumCols
- number of columns
-
BaseFigureImpl
Creates a copy of a Figure.- Parameters:
figure
- figure to copy.
-
-
Method Details
-
copy
Creates a copy of this Figure.- Returns:
- copy of this Figure.
-
getWidth
public int getWidth()Gets the width of this Figure. This is equal to the number of columns.- Returns:
- this Figure's width
-
getHeight
public int getHeight()Gets the numRows of this Figure. This is equal to the number of rows.- Returns:
- this Figure's height
-
getTitle
Gets the title of this Figure.- Returns:
- this Figure's title
-
getTitleFont
Gets theFont
of this Figure's title.- Returns:
- this Figure's title's
Font
-
getTitleColor
Gets thePaint
of this Figure's title.- Returns:
- this Figure's title's
Paint
-
isResizable
public boolean isResizable()Whether this Figure's height and width are changeable.- Returns:
- true if this Figure's height and width are changeable, false otherwise
-
getCharts
Gets this Figure'sChart
s.- Returns:
- this Figure's
Chart
s
-
getUpdateInterval
public long getUpdateInterval()Gets the updateInterval, in milliseconds, for this Figure.- Returns:
- update interval of this Figure, in milliseconds
-
getTableHandles
Gets the table handles associated with this figure.- Returns:
- table handles associated with this figure.
-
getPartitionedTableHandles
Gets the partitioned tables associated with this figure.- Returns:
- table handles associated with this figure.
-
figureRemoveSeries
Description copied from interface:BaseFigure
Removes all series withnames
from this Figure.- Specified by:
figureRemoveSeries
in interfaceBaseFigure
- Parameters:
removeSeriesNames
- series names- Returns:
- this Figure
-
registerTableFunction
-
getTableFunctionMap
-
registerPartitionedTableFunction
public void registerPartitionedTableFunction(PartitionedTableHandle partitionedTableHandle, Function<Table, Table> tableTransform) -
getPartitionedTableFunctionMap
public Map<PartitionedTable,Set<Function<PartitionedTable, getPartitionedTableFunctionMap()PartitionedTable>>> -
registerFigureFunction
-
getFigureFunctionList
-
updateInterval
Description copied from interface:BaseFigure
Sets the update interval of this Figure. The plot will be redrawn at this update interval.- Specified by:
updateInterval
in interfaceBaseFigure
- Parameters:
updateIntervalMillis
- update interval, in milliseconds- Returns:
- this Figure
-
figureTitle
Description copied from interface:BaseFigure
Sets the title of this Figure- Specified by:
figureTitle
in interfaceBaseFigure
- Parameters:
title
- title- Returns:
- this Figure
-
figureTitleFont
Description copied from interface:BaseFigure
Sets the font of this Figure's title- Specified by:
figureTitleFont
in interfaceBaseFigure
- Parameters:
font
- font- Returns:
- this Figure
-
figureTitleFont
Description copied from interface:BaseFigure
Sets the font of this Figure's title- Specified by:
figureTitleFont
in interfaceBaseFigure
- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- this Figure
-
figureTitleColor
Description copied from interface:BaseFigure
Sets the color of this Figure's title- Specified by:
figureTitleColor
in interfaceBaseFigure
- Parameters:
color
- color- Returns:
- this Figure
-
figureTitleColor
Description copied from interface:BaseFigure
Sets the color of this Figure's title- Specified by:
figureTitleColor
in interfaceBaseFigure
- Parameters:
color
- color- Returns:
- this Figure
-
newChart
Description copied from interface:BaseFigure
Adds a newChart
to this figure.- Specified by:
newChart
in interfaceBaseFigure
- Returns:
- the new
Chart
. TheChart
is placed in the next available grid space, starting at the upper left hand corner of the grid, going left to right, top to bottom. If no available space is found in the grid:- if this Figure was created with no specified grid size, then the Figure will resize itself to add the
new
Chart
; - if not, a RuntimeException will be thrown.
- if this Figure was created with no specified grid size, then the Figure will resize itself to add the
new
-
newChart
Description copied from interface:BaseFigure
Adds a newChart
to this figure.- Specified by:
newChart
in interfaceBaseFigure
- Parameters:
index
- index from the Figure's grid to remove. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].- Returns:
- the new
Chart
. TheChart
is placed at the grid space indicated by theindex
.
-
newChart
Description copied from interface:BaseFigure
Adds a newChart
to this figure.- Specified by:
newChart
in interfaceBaseFigure
- Parameters:
rowNum
- row index in this Figure's grid. The row index starts at 0.colNum
- column index in this Figure's grid. The column index starts at 0.- Returns:
- the new
Chart
. TheChart
is placed at the grid space [rowNum
,colNum
.
-
removeChart
Description copied from interface:BaseFigure
Removes a chart from the Figure's grid.- Specified by:
removeChart
in interfaceBaseFigure
- Parameters:
removeChartIndex
- index from the Figure's grid to remove. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].- Returns:
- this Figure with the chart removed.
-
removeChart
Description copied from interface:BaseFigure
Removes a chart from the Figure's grid.- Specified by:
removeChart
in interfaceBaseFigure
- Parameters:
removeChartRowNum
- row index in this Figure's grid. The row index starts at 0.removeChartColNum
- column index in this Figure's grid. The column index starts at 0.- Returns:
- this Figure with the chart removed.
-
chart
Description copied from interface:BaseFigure
Returns a chart from this Figure's grid.- Specified by:
chart
in interfaceBaseFigure
- Parameters:
index
- index from the Figure's grid. The index starts at 0 in the upper left hand corner of the grid and increases going left to right, top to bottom. E.g. for a 2x2 Figure, the indices would be [0, 1] [2, 3].- Returns:
- selected
Chart
-
chart
Description copied from interface:BaseFigure
Returns a chart from this Figure's grid.- Specified by:
chart
in interfaceBaseFigure
- Parameters:
rowNum
- row index in this Figure's grid. The row index starts at 0.colNum
- column index in this Figure's grid. The column index starts at 0.- Returns:
- selected
Chart
-
validateInitialization
public void validateInitialization()Checks if the figure can be instantiated. Throws an error if not.- Throws:
RuntimeException
- if no charts or no plots have been created
-
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-
setName
-
setSessionId
public void setSessionId(int sessionId) -
getName
-
getSessionId
public int getSessionId() -
consolidatePartitionedTables
public void consolidatePartitionedTables() -
consolidateTables
public void consolidateTables()
-