Package com.illumon.iris.console.utils
Class LivePivotWidget
java.lang.Object
com.illumon.util.referencecounting.ReferenceCounted
com.illumon.iris.db.util.liveness.ReferenceCountedLivenessNode
com.illumon.iris.db.util.liveness.LivenessArtifact
com.illumon.iris.console.utils.LivePivotWidget
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
,Deflatable<LivePivotWidget>
,CloseableWidget
,ContextAwareLiveWidget<LivePivotWidget>
,LiveWidget<LivePivotWidget>
,LiveWidgetAclFilterable<LivePivotWidget>
,LivenessManager
,LivenessNode
,LivenessReferent
,Serializable
public class LivePivotWidget
extends LivenessArtifact
implements ContextAwareLiveWidget<LivePivotWidget>, Serializable, CloseableWidget, LiveWidgetAclFilterable<LivePivotWidget>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static class
Deprecated.This class has been replaced by PivotOptions and will be removed in a future release.static enum
-
Constructor Summary
ConstructorsConstructorDescriptionLivePivotWidget
(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.LivePivotWidget
(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.LivePivotWidget
(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.LivePivotWidget
(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowColumnOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.LivePivotWidget
(Table tableToPivot, String[] rows, String columnTitleColumn, String valueColumn, LivePivotWidget.Aggregation aggregation, PivotOptions options) This constructor is used to create the widget. -
Method Summary
Modifier and TypeMethodDescriptionapplyAcls
(io.deephaven.enterprise.auth.UserContext userContext, RemoteQueryProcessor remoteQueryProcessor, String name) This method should apply ACLs to all tables in the widget.deflate
(ExportedObjectClient client) Convert this object into an Inflatable suitable for serialization.getComponent
(AsyncPanel dataPanel, String viewId, Object view, String title, Object irisWidgetSupportObject, com.fishlib.io.logger.Logger log) Gets the UI component.getName()
Gets the name of the Live Widget.gets the processor connection.int
Gets the session ID for console widgets.static LiveWidget<LivePivotWidget>
getWidget
(Table tableToPivot, String[] rows, String columnTitleColumn, String unitColumn, LivePivotWidget.Aggregation aggregation, PivotOptions options) void
onClose()
void
Sets the name of the Live Widget.void
setProcessorConnection
(QueryProcessorConnection processorConnection) Sets the processor connection.void
setSessionId
(int sessionId) Sets the session ID for console widgets.skipAcls()
This method is called in the case that ACLs should be skipped.Methods inherited from class com.illumon.iris.db.util.liveness.LivenessArtifact
manageWithCurrentScope, unmanage, unmanage
Methods inherited from class com.illumon.iris.db.util.liveness.ReferenceCountedLivenessNode
destroy, dropReference, getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryRetainReference
Methods inherited from class com.illumon.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessReferent
getReferentDescription, retainReference
Methods inherited from interface com.illumon.iris.db.tables.utils.LiveWidget
getComponent, updateTelemetryInfo
-
Constructor Details
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String valueColumn, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options) This constructor is used to create the widget.- Parameters:
tableToPivot
- the table to pivotrows
- the key columns for the rowscolumnTitleColumn
- the column used as a title for each columnvalueColumn
- the column containing the value of interestaggregation
- how to aggregate the dataoptions
- a struct of booleans that control how the widget presents the data
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.- Parameters:
tableToPivot
- the table to pivotrows
- the key columns for the rowscolumnTitleColumn
- the column used as a title for each columnvalueColumns
- the columns containing the values of interestaggregation
- how to aggregate the dataoptions
- a struct that control how the widget presents the datacolorFormat
- an optional function for creating heatmap colorscolumnNameTransform
- an optional function for transforming column names
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.- Parameters:
tableToPivot
- the table to pivotrows
- the key columns for the rowscolumnTitleColumn
- the column used as a title for each columnvalueColumns
- the columns containing the values of interestaggregation
- how to aggregate the dataoptions
- a struct that control how the widget presents the datacolorFormat
- an optional function for creating heatmap colorscolumnNameTransform
- an optional function for transforming column namesuserRowOrder
- A custom order for row-columns
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform) This constructor is used to create the widget.- Parameters:
tableToPivot
- the table to pivotrows
- the key columns for the rowscolumnTitleColumn
- the column used as a title for each columnvalueColumns
- the columns containing the values of interestaggregation
- how to aggregate the dataoptions
- a struct that control how the widget presents the datacolorFormat
- an optional function for creating heatmap colorscolorFormats
- an optional map of columns to functions for creating heatmap colorscolumnNameTransform
- an optional function for transforming column names
-
LivePivotWidget
public LivePivotWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String[] valueColumns, String[] filterColumns, String[] requiredFilterColumns, LivePivotWidget.Aggregation aggregation, @NotNull PivotOptions options, Function<Object, Object> colorFormat, Map<String, Function<Object, Object>> colorFormats, Function<Object, Object> columnNameTransform, Comparable<?>[] userRowColumnOrder, Comparable<?>[] userColumnOrder) This constructor is used to create the widget.- Parameters:
tableToPivot
- the table to pivotrows
- the key columns for the rowscolumnTitleColumn
- the column used as a title for each columnvalueColumns
- the columns containing the values of interestaggregation
- how to aggregate the dataoptions
- a struct that control how the widget presents the datacolorFormat
- an optional function for creating heatmap colorscolorFormats
- an optional map of columns to functions for creating heatmap colorscolumnNameTransform
- an optional function for transforming column namesuserRowColumnOrder
- a user specified row column ordering
-
-
Method Details
-
onClose
public void onClose()- Specified by:
onClose
in interfaceCloseableWidget
-
getColorFormat
-
getColorFormats
-
getColumnNameTransform
-
applyAcls
public LivePivotWidget applyAcls(io.deephaven.enterprise.auth.UserContext userContext, RemoteQueryProcessor remoteQueryProcessor, String name) Description copied from interface:LiveWidgetAclFilterable
This method should apply ACLs to all tables in the widget. For each table in the widget, this method should call:
t = RemoteDatabase.applyAcls(t, userContext, remoteQueryProcessor, name);
- Specified by:
applyAcls
in interfaceLiveWidgetAclFilterable<LivePivotWidget>
- Parameters:
userContext
- the user contextremoteQueryProcessor
- the remote queryname
- the name of the widget
-
skipAcls
Description copied from interface:LiveWidgetAclFilterable
This method is called in the case that ACLs should be skipped.- Specified by:
skipAcls
in interfaceLiveWidgetAclFilterable<LivePivotWidget>
-
setName
Description copied from interface:ContextAwareLiveWidget
Sets the name of the Live Widget.- Specified by:
setName
in interfaceContextAwareLiveWidget<LivePivotWidget>
- Parameters:
name
- the name of the Live Widget
-
getName
Description copied from interface:ContextAwareLiveWidget
Gets the name of the Live Widget.- Specified by:
getName
in interfaceContextAwareLiveWidget<LivePivotWidget>
- Returns:
- the name of the Live Widget
-
setProcessorConnection
Description copied from interface:ContextAwareLiveWidget
Sets the processor connection.- Specified by:
setProcessorConnection
in interfaceContextAwareLiveWidget<LivePivotWidget>
- Parameters:
processorConnection
- the processor connection
-
getProcessorConnection
Description copied from interface:ContextAwareLiveWidget
gets the processor connection.- Specified by:
getProcessorConnection
in interfaceContextAwareLiveWidget<LivePivotWidget>
- Returns:
- the processor connection
-
setSessionId
public void setSessionId(int sessionId) Description copied from interface:ContextAwareLiveWidget
Sets the session ID for console widgets.- Specified by:
setSessionId
in interfaceContextAwareLiveWidget<LivePivotWidget>
- Parameters:
sessionId
- the session ID
-
getSessionId
public int getSessionId()Description copied from interface:ContextAwareLiveWidget
Gets the session ID for console widgets.- Specified by:
getSessionId
in interfaceContextAwareLiveWidget<LivePivotWidget>
- Returns:
- the session ID
-
deflate
Description copied from interface:Deflatable
Convert this object into an Inflatable suitable for serialization.- Specified by:
deflate
in interfaceDeflatable<LivePivotWidget>
- Parameters:
client
- the ExportedObjectClient we are deflating for.- Returns:
- an Inflatable for serializing to the client
-
getWidget
public static LiveWidget<LivePivotWidget> getWidget(Table tableToPivot, String[] rows, String columnTitleColumn, String unitColumn, LivePivotWidget.Aggregation aggregation, PivotOptions options) -
getComponent
public JComponent getComponent(AsyncPanel dataPanel, String viewId, Object view, String title, Object irisWidgetSupportObject, com.fishlib.io.logger.Logger log) Description copied from interface:LiveWidget
Gets the UI component.- Specified by:
getComponent
in interfaceLiveWidget<LivePivotWidget>
- Parameters:
dataPanel
- data panelviewId
- view idview
- viewtitle
- titleirisWidgetSupportObject
- widget support objectlog
- log- Returns:
- UI component
-