Package org.eclipse.mat.query.refined
Class RefinedStructuredResult
java.lang.Object
org.eclipse.mat.query.refined.RefinedStructuredResult
- All Implemented Interfaces:
IIconProvider
,IResult
,ISelectionProvider
,IStructuredResult
- Direct Known Subclasses:
RefinedTable
,RefinedTree
public abstract class RefinedStructuredResult
extends Object
implements IStructuredResult, ISelectionProvider, IIconProvider
The result from refining a table or tree.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
Fields inherited from interface org.eclipse.mat.query.IIconProvider
EMPTY
Fields inherited from interface org.eclipse.mat.query.ISelectionProvider
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionaddDerivedDataColumn
(ContextProvider provider, ContextDerivedData.DerivedColumn derivedColumn) buildTotalsRow
(List<?> elements) void
calculate
(ContextProvider provider, ContextDerivedData.DerivedOperation operation, List<?> elements, RefinedStructuredResult.ICalculationProgress progress, IProgressListener listener) void
calculateTotals
(List<?> elements, TotalsRow totals, IProgressListener listener) void
filterChanged
(Filter filter) getColumnFor
(ContextProvider provider, ContextDerivedData.DerivedColumn derivedColumn) Column[]
The columns of the tree or table.getColumnValue
(Object row, int columnIndex) Returns the (unformatted) value of a table/tree cell.getContext
(Object row) The default context of the row which is used to display information in the object inspector.Filter[]
int
getFilteredCount
(List<?> elements) getFormattedColumnValue
(Object row, int columnIndex) getJobs()
(Optionally) Return meta data of the result needed to fine-tune the display of the result.int
boolean
boolean
isDecorated
(int columnIndex) boolean
isExpanded
(Object row) Should this node be expanded.boolean
isSelected
(Object row) Has the user selected this row?void
setSelectionProvider
(ISelectionProvider provider) void
setSortOrder
(Column queryColumn, Column.SortDirection direction) void
unwrap()
-
Method Details
-
setSelectionProvider
-
isDecorated
public boolean isDecorated(int columnIndex) -
getFilter
-
hasActiveFilter
public boolean hasActiveFilter() -
getFilteredCount
-
filterChanged
-
getSortColumn
public int getSortColumn() -
getSortDirection
-
setSortOrder
-
sort
-
buildTotalsRow
-
calculateTotals
-
getJobs
-
addDerivedDataColumn
public Column addDerivedDataColumn(ContextProvider provider, ContextDerivedData.DerivedColumn derivedColumn) -
getColumnFor
public Column getColumnFor(ContextProvider provider, ContextDerivedData.DerivedColumn derivedColumn) -
calculate
public void calculate(ContextProvider provider, ContextDerivedData.DerivedOperation operation, List<?> elements, RefinedStructuredResult.ICalculationProgress progress, IProgressListener listener) throws SnapshotException - Throws:
SnapshotException
-
unwrap
-
getResultMetaData
Description copied from interface:IResult
(Optionally) Return meta data of the result needed to fine-tune the display of the result. This could include an additional context, an additional query to run on selected data from the result , additional calculated columns, or an indication that the results are already presorted.- Specified by:
getResultMetaData
in interfaceIResult
- Returns:
- the metadata for the result, used to obtain extra data
-
getColumns
Description copied from interface:IStructuredResult
The columns of the tree or table.- Specified by:
getColumns
in interfaceIStructuredResult
- Returns:
- an array of all the columns
-
getColumnValue
Description copied from interface:IStructuredResult
Returns the (unformatted) value of a table/tree cell.- Specified by:
getColumnValue
in interfaceIStructuredResult
- Parameters:
row
- The row object as returned by theIResultTable.getRow(int)
orIResultTree.getElements()
orIResultTree.getChildren(Object)
methodscolumnIndex
- The index of the column.- Returns:
- the cell value
-
getFormattedColumnValue
-
getContext
Description copied from interface:IStructuredResult
The default context of the row which is used to display information in the object inspector. Unless no context provider is given via theResultMetaData
, it is also used for the context menu on a row.- Specified by:
getContext
in interfaceIStructuredResult
- Parameters:
row
- The row object as returned by theIResultTable.getRow(int)
orIResultTree.getElements()
orIResultTree.getChildren(Object)
methods.- Returns:
- a context object holding details about that row
-
getIcon
- Specified by:
getIcon
in interfaceIIconProvider
-
isExpanded
Description copied from interface:ISelectionProvider
Should this node be expanded.- Specified by:
isExpanded
in interfaceISelectionProvider
- Parameters:
row
- the chosen row- Returns:
- true if it should be expanded.
-
isSelected
Description copied from interface:ISelectionProvider
Has the user selected this row?- Specified by:
isSelected
in interfaceISelectionProvider
- Parameters:
row
- the chosen row- Returns:
- true if selected
-