Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel Class Reference

Inherits org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< List< PieChartPanel.PieChartItem > >.

Classes

class  PieChartItem
 

Public Member Functions

 PieChartPanel ()
 
 PieChartPanel (String title)
 
String getTitle ()
 
PieChartPanel setTitle (String title)
 
void showDataFetchResult (DataFetchResult< T > result, String errorMessage, String noResultsMessage)
 
void showDataFetchResult (DataFetchResult< T > result)
 
synchronized void showDataWithMessage (List< PieChartPanel.PieChartItem > data, String message)
 
void showDefaultLoadingMessage ()
 
synchronized void showMessage (String message)
 
synchronized void showResults (T data)
 

Static Public Member Functions

static String getDefaultErrorMessage ()
 
static String getDefaultNoResultsMessage ()
 

Static Public Attributes

static final String DEFAULT_ERROR_MESSAGE
 
static final String DEFAULT_LOADING_MESSAGE
 
static final String DEFAULT_NO_RESULTS_MESSAGE
 

Protected Member Functions

void setMessage (boolean visible, String message)
 
abstract void setResults (T data)
 
void setResults (List< PieChartPanel.PieChartItem > data)
 

Private Attributes

final JFreeChart chart
 
final DefaultPieDataset dataset = new DefaultPieDataset()
 
final ChartMessageOverlay overlay = new ChartMessageOverlay()
 
final PiePlot plot
 

Static Private Attributes

static final double DEFAULT_CHART_PADDING = .1
 
static final Font DEFAULT_FONT = new JLabel().getFont()
 
static final Font DEFAULT_HEADER_FONT = new Font(DEFAULT_FONT.getName(), DEFAULT_FONT.getStyle(), (int) (DEFAULT_FONT.getSize() * 1.5))
 
static final PieSectionLabelGenerator DEFAULT_LABEL_GENERATOR
 
static final double NEAR_ZERO = Math.ulp(1d)
 
static final Color NO_DATA_COLOR = Color.WHITE
 
static final long serialVersionUID = 1L
 

Detailed Description

A pie chart panel.

Definition at line 42 of file PieChartPanel.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.PieChartPanel ( )

Main constructor.

Definition at line 114 of file PieChartPanel.java.

org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.PieChartPanel ( String  title)

Main constructor for the pie chart.

Parameters
titleThe title for this pie chart.

Definition at line 123 of file PieChartPanel.java.

Member Function Documentation

static String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.getDefaultErrorMessage ( )
staticinherited
Returns
The default error message.

Definition at line 58 of file AbstractLoadableComponent.java.

static String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.getDefaultNoResultsMessage ( )
staticinherited
Returns
The default message for no results.

Definition at line 65 of file AbstractLoadableComponent.java.

String org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.getTitle ( )
Returns
The title for this chart if one exists.

Definition at line 154 of file PieChartPanel.java.

Referenced by org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.setTitle().

void org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.setMessage ( boolean  visible,
String  message 
)
protected

Definition at line 173 of file PieChartPanel.java.

abstract void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.setResults ( data)
abstractprotectedinherited

Sets the data to be shown in the JTable. Repaint does not need to be handled in this method.

Parameters
dataThe list of data objects to be shown.
void org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.setResults ( List< PieChartPanel.PieChartItem >  data)
protected

Definition at line 179 of file PieChartPanel.java.

PieChartPanel org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.setTitle ( String  title)

Sets the title for this pie chart.

Parameters
titleThe title.
Returns
As a utility, returns this.

Definition at line 167 of file PieChartPanel.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.getTitle().

void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showDataFetchResult ( DataFetchResult< T >  result,
String  errorMessage,
String  noResultsMessage 
)
inherited

Shows the data in a DataFetchResult. If there was an error during the operation, the errorMessage will be displayed. If the operation completed successfully and no data is present, noResultsMessage will be shown. Otherwise, the data will be shown as rows in the table.

Parameters
resultThe DataFetchResult.
errorMessageThe error message to be shown in the event of an error.
noResultsMessageThe message to be shown if there are no results but the operation completed successfully.

Definition at line 114 of file AbstractLoadableComponent.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchResult< R >::getData(), org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchResult< R >::getException(), and org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchResult< R >::getResultType().

void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showDataFetchResult ( DataFetchResult< T >  result)
inherited

Shows the data in a DataFetchResult. If there was an error during the operation, the DEFAULT_ERROR_MESSAGE will be displayed. If the operation completed successfully and no data is present, DEFAULT_NO_RESULTS_MESSAGE will be shown. Otherwise, the data will be shown as rows in the table.

Parameters
resultThe DataFetchResult.

Definition at line 150 of file AbstractLoadableComponent.java.

synchronized void org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.showDataWithMessage ( List< PieChartPanel.PieChartItem >  data,
String  message 
)

Shows a message on top of data.

Parameters
dataThe data.
messageThe message.

Definition at line 205 of file PieChartPanel.java.

void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showDefaultLoadingMessage ( )
inherited

Shows a default loading message on the table. This will clear any results in the table.

Definition at line 85 of file AbstractLoadableComponent.java.

synchronized void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showMessage ( String  message)
inherited

Clears the results from the underlying JTable and shows the provided message.

Parameters
messageThe message to be shown.

Definition at line 75 of file AbstractLoadableComponent.java.

synchronized void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showResults ( data)
inherited

Shows the list as rows of data in the table. If overlay message will be cleared if present.

Parameters
dataThe data to be shown where each item represents a row of data.

Definition at line 96 of file AbstractLoadableComponent.java.

Member Data Documentation

final JFreeChart org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.chart
private

Definition at line 108 of file PieChartPanel.java.

final DefaultPieDataset org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.dataset = new DefaultPieDataset()
private

Definition at line 107 of file PieChartPanel.java.

final double org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.DEFAULT_CHART_PADDING = .1
staticprivate

Definition at line 99 of file PieChartPanel.java.

final String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.DEFAULT_ERROR_MESSAGE
staticinherited

The default error message.

Definition at line 46 of file AbstractLoadableComponent.java.

final Font org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.DEFAULT_FONT = new JLabel().getFont()
staticprivate

Definition at line 91 of file PieChartPanel.java.

final Font org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.DEFAULT_HEADER_FONT = new Font(DEFAULT_FONT.getName(), DEFAULT_FONT.getStyle(), (int) (DEFAULT_FONT.getSize() * 1.5))
staticprivate

Definition at line 101 of file PieChartPanel.java.

final PieSectionLabelGenerator org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.DEFAULT_LABEL_GENERATOR
staticprivate
Initial value:
= new StandardPieSectionLabelGenerator(
"{0}: {1} ({2})", new DecimalFormat("#,###"), new DecimalFormat("0.0%"))

Definition at line 103 of file PieChartPanel.java.

final String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.DEFAULT_LOADING_MESSAGE
staticinherited

The default loading message.

Definition at line 41 of file AbstractLoadableComponent.java.

final String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.DEFAULT_NO_RESULTS_MESSAGE
staticinherited

The default 'no results' message.

Definition at line 51 of file AbstractLoadableComponent.java.

final double org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.NEAR_ZERO = Math.ulp(1d)
staticprivate

It appears that JFreeChart will show nothing if all values are zero. So this is a value close to zero but not to be displayed.

Definition at line 97 of file PieChartPanel.java.

final Color org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.NO_DATA_COLOR = Color.WHITE
staticprivate

Definition at line 98 of file PieChartPanel.java.

final ChartMessageOverlay org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.overlay = new ChartMessageOverlay()
private

Definition at line 106 of file PieChartPanel.java.

final PiePlot org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.plot
private

Definition at line 109 of file PieChartPanel.java.

final long org.sleuthkit.autopsy.datasourcesummary.uiutils.PieChartPanel.serialVersionUID = 1L
staticprivate

Definition at line 89 of file PieChartPanel.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.