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

Nested Classes
`static class` `RefinedStructuredResult.DerivedDataJobDefinition`
`static interface` `RefinedStructuredResult.ICalculationProgress`

### Field Summary

### Fields inherited from interface org.eclipse.mat.query.ISelectionProvider

`EMPTY`

### Fields inherited from interface org.eclipse.mat.query.IIconProvider

`EMPTY`

### Method Summary

All Methods Instance Methods Concrete Methods
`Column` `addDerivedDataColumn(ContextProvider provider, ContextDerivedData.DerivedColumn derivedColumn)`
`TotalsRow` `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)`
`Column` `getColumnFor(ContextProvider provider, ContextDerivedData.DerivedColumn derivedColumn)`
`Column[]` `getColumns()` The columns of the tree or table.
`Object` `getColumnValue(Object row, int columnIndex)` Returns the (unformatted) value of a table/tree cell.
`IContextObject` `getContext(Object row)` The default context of the row which is used to display information in the object inspector.
`Filter[]` `getFilter()`
`int` `getFilteredCount(List<?> elements)`
`String` `getFormattedColumnValue(Object row, int columnIndex)`
`URL` `getIcon(Object row)`
`List<RefinedStructuredResult.DerivedDataJobDefinition>` `getJobs()`
`ResultMetaData` `getResultMetaData()` (Optionally) Return meta data of the result needed to fine-tune the display of the result.
`int` `getSortColumn()`
`Column.SortDirection` `getSortDirection()`
`boolean` `hasActiveFilter()`
`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` `sort(List<?> elements)`
`IStructuredResult` `unwrap()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### setSelectionProvider

    public void setSelectionProvider(ISelectionProvider provider)

#### isDecorated

    public boolean isDecorated(int columnIndex)

#### getFilter

    public Filter[] getFilter()

#### hasActiveFilter

    public boolean hasActiveFilter()

#### getFilteredCount

    public int getFilteredCount(List<?> elements)

#### filterChanged

    public void filterChanged(Filter filter)

#### getSortColumn

    public int getSortColumn()

#### getSortDirection

    public Column.SortDirection getSortDirection()

#### setSortOrder

    public void setSortOrder(Column queryColumn,
                             Column.SortDirection direction)

#### sort

    public void sort(List<?> elements)

#### buildTotalsRow

    public TotalsRow buildTotalsRow(List<?> elements)

#### calculateTotals

    public void calculateTotals(List<?> elements,
                                TotalsRow totals,
                                IProgressListener listener)

#### getJobs

    public List<RefinedStructuredResult.DerivedDataJobDefinition> 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

    public IStructuredResult unwrap()

#### getResultMetaData

    public ResultMetaData 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 interface `IResult`
Returns:
  the metadata for the result, used to obtain extra data

#### getColumns

    public Column[] getColumns()

Description copied from interface: `IStructuredResult`
The columns of the tree or table.

Specified by:
  `getColumns` in interface `IStructuredResult`
Returns:
  an array of all the columns

#### getColumnValue

    public Object getColumnValue(Object row,
                                 int columnIndex)

Description copied from interface: `IStructuredResult`
Returns the (unformatted) value of a table/tree cell.

Specified by:
  `getColumnValue` in interface `IStructuredResult`
Parameters:
  `row` - The row object as returned by the `IResultTable.getRow(int)` or `IResultTree.getElements()` or `IResultTree.getChildren(Object)` methods
  `columnIndex` - The index of the column.
Returns:
  the cell value

#### getFormattedColumnValue

    public String getFormattedColumnValue(Object row,
                                          int columnIndex)

#### getContext

    public IContextObject getContext(Object row)

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 the `ResultMetaData`, it is also used for the context menu on a row.

Specified by:
  `getContext` in interface `IStructuredResult`
Parameters:
  `row` - The row object as returned by the `IResultTable.getRow(int)` or `IResultTree.getElements()` or `IResultTree.getChildren(Object)` methods.
Returns:
  a context object holding details about that row

#### getIcon

    public URL getIcon(Object row)

Specified by:
  `getIcon` in interface `IIconProvider`

#### isExpanded

    public boolean isExpanded(Object row)

Description copied from interface: `ISelectionProvider`
Should this node be expanded.

Specified by:
  `isExpanded` in interface `ISelectionProvider`
Parameters:
  `row` - the chosen row
Returns:
  true if it should be expanded.

#### isSelected

    public boolean isSelected(Object row)

Description copied from interface: `ISelectionProvider`
Has the user selected this row?

Specified by:
  `isSelected` in interface `ISelectionProvider`
Parameters:
  `row` - the chosen row
Returns:
  true if selected