Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles Class Reference

Static Public Member Functions

static String getHeaderClassName ()
 
static String getIndentedClassName ()
 
static String getKeyColumnClassName ()
 
static String getMessageClassName ()
 
static String getMonospacedClassName ()
 
static String getSpacedSectionClassName ()
 
static String getSubHeaderClassName ()
 
static String getTextClassName ()
 
static void setStyles (JTextPane textPane)
 
static void setupHtmlJTextPane (JTextPane textPane)
 

Static Private Member Functions

static int pxToPt (int px)
 

Static Private Attributes

static final String CLASS_PREFIX = ContentViewerHtmlStyles.class.getSimpleName()
 
static final Font DEFAULT_FONT = ContentViewerDefaults.getFont()
 
static final String HEADER_CLASSNAME = CLASS_PREFIX + "header"
 
static final Font HEADER_FONT = ContentViewerDefaults.getHeaderFont()
 
static final String INDENTED_CLASSNAME = CLASS_PREFIX + "indent"
 
static final String KEY_COLUMN_TD_CLASSNAME = CLASS_PREFIX + "keyKolumn"
 
static final String MESSAGE_CLASSNAME = CLASS_PREFIX + "message"
 
static final Font MESSAGE_FONT = ContentViewerDefaults.getMessageFont()
 
static final String MONOSPACED_CLASSNAME = CLASS_PREFIX + "monospaced"
 
static final Font MONOSPACED_FONT = ContentViewerDefaults.getMonospacedFont()
 
static final String SPACED_SECTION_CLASSNAME = CLASS_PREFIX + "spacedSection"
 
static final StyleSheet STYLE_SHEET = new StyleSheet()
 
static final String STYLE_SHEET_RULE
 
static final String SUB_HEADER_CLASSNAME = CLASS_PREFIX + "subHeader"
 
static final Font SUB_HEADER_FONT = ContentViewerDefaults.getSubHeaderFont()
 
static final String TEXT_CLASSNAME = CLASS_PREFIX + "text"
 

Detailed Description

The style sheet an class names to be used with content viewers using html rendering.

Definition at line 31 of file ContentViewerHtmlStyles.java.

Member Function Documentation

static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getHeaderClassName ( )
static
static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getIndentedClassName ( )
static
static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getKeyColumnClassName ( )
static
static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getMessageClassName ( )
static

Returns the class name to use for message text.

Returns
The class name to use for message text.

Definition at line 113 of file ContentViewerHtmlStyles.java.

References org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.MESSAGE_CLASSNAME.

Referenced by org.sleuthkit.autopsy.contentviewers.annotations.AnnotationsContentViewer.AnnotationWorker.doInBackground().

static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getMonospacedClassName ( )
static

Returns the class name to use for monospaced text.

Returns
The class name to use for monospaced text.

Definition at line 131 of file ContentViewerHtmlStyles.java.

References org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.MONOSPACED_CLASSNAME.

Referenced by org.sleuthkit.autopsy.contentviewers.Metadata.addMonospacedRow().

static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getSpacedSectionClassName ( )
static
static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getSubHeaderClassName ( )
static

Returns the class name to use for sub header text.

Returns
The class name to use for sub header text.

Definition at line 104 of file ContentViewerHtmlStyles.java.

References org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.SUB_HEADER_CLASSNAME.

static String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.getTextClassName ( )
static
static int org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.pxToPt ( int  px)
staticprivate

Converts pixel size to point size. The html rendering seems more consistent with point size versus pixel size.

Parameters
pxThe pixel size.
Returns
The point size.

Definition at line 86 of file ContentViewerHtmlStyles.java.

References org.sleuthkit.autopsy.contentviewers.layout.ContentViewerDefaults.getPtToPx().

static void org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.setStyles ( JTextPane  textPane)
static

If the textPane has an HTMLEditorKit, specifies the ContentViewerHTMLStyles styles to use refreshing the styles.

Parameters
textPaneThe text pane.

Definition at line 172 of file ContentViewerHtmlStyles.java.

Referenced by org.sleuthkit.autopsy.contentviewers.annotations.AnnotationsContentViewer.AnnotationWorker.done().

static void org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.setupHtmlJTextPane ( JTextPane  textPane)
static

Member Data Documentation

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.CLASS_PREFIX = ContentViewerHtmlStyles.class.getSimpleName()
staticprivate

Definition at line 34 of file ContentViewerHtmlStyles.java.

final Font org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.DEFAULT_FONT = ContentViewerDefaults.getFont()
staticprivate

Definition at line 46 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.HEADER_CLASSNAME = CLASS_PREFIX + "header"
staticprivate
final Font org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.HEADER_FONT = ContentViewerDefaults.getHeaderFont()
staticprivate

Definition at line 48 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.INDENTED_CLASSNAME = CLASS_PREFIX + "indent"
staticprivate
final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.KEY_COLUMN_TD_CLASSNAME = CLASS_PREFIX + "keyKolumn"
staticprivate
final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.MESSAGE_CLASSNAME = CLASS_PREFIX + "message"
staticprivate
final Font org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.MESSAGE_FONT = ContentViewerDefaults.getMessageFont()
staticprivate

Definition at line 47 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.MONOSPACED_CLASSNAME = CLASS_PREFIX + "monospaced"
staticprivate
final Font org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.MONOSPACED_FONT = ContentViewerDefaults.getMonospacedFont()
staticprivate

Definition at line 50 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.SPACED_SECTION_CLASSNAME = CLASS_PREFIX + "spacedSection"
staticprivate
final StyleSheet org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.STYLE_SHEET = new StyleSheet()
staticprivate

Definition at line 71 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.STYLE_SHEET_RULE
staticprivate
Initial value:
= String.format(" .%s { font-family: %s; font-size: %dpt;font-style:italic; margin: 0px; padding: 0px 0px %dpt 0px; } ",
MESSAGE_CLASSNAME, MESSAGE_FONT.getFamily(), MESSAGE_FONT.getSize(), pxToPt(ContentViewerDefaults.getLineSpacing()))
+ String.format(" .%s { font-family: %s; font-size: %dpt; font-weight: bold; margin: 0px; padding: 0px 0px %dpt 0px; } ",
HEADER_CLASSNAME, HEADER_FONT.getFamily(), HEADER_FONT.getSize(), pxToPt(ContentViewerDefaults.getLineSpacing()))
+ String.format(" .%s { font-family: %s; font-size: %dpt; font-weight: bold; margin: 0px; padding: 0px 0px %dpt 0px; } ",
SUB_HEADER_CLASSNAME, SUB_HEADER_FONT.getFamily(), SUB_HEADER_FONT.getSize(), pxToPt(ContentViewerDefaults.getLineSpacing()))
+ String.format(" .%s { font-family: %s; font-size: %dpt; margin: 0px; padding: 0px 0px %dpt 0px; } ",
TEXT_CLASSNAME, DEFAULT_FONT.getFamily(), DEFAULT_FONT.getSize(), pxToPt(ContentViewerDefaults.getLineSpacing()))
+ String.format(" .%s { font-family: %s; font-size: %dpt; margin: 0px; padding: 0px 0px %dpt 0px; } ",
MONOSPACED_CLASSNAME, Font.MONOSPACED, MONOSPACED_FONT.getSize(), pxToPt(ContentViewerDefaults.getLineSpacing()))
+ String.format(" .%s { padding-left: %dpt } ",
INDENTED_CLASSNAME, pxToPt(ContentViewerDefaults.getSectionIndent()))
+ String.format(" .%s { padding-top: %dpt } ",
SPACED_SECTION_CLASSNAME, pxToPt(ContentViewerDefaults.getSectionSpacing()))
+ String.format(" .%s { padding-right: %dpt; white-space: nowrap; } ",
KEY_COLUMN_TD_CLASSNAME, pxToPt(ContentViewerDefaults.getColumnSpacing()))

Definition at line 54 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.SUB_HEADER_CLASSNAME = CLASS_PREFIX + "subHeader"
staticprivate
final Font org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.SUB_HEADER_FONT = ContentViewerDefaults.getSubHeaderFont()
staticprivate

Definition at line 49 of file ContentViewerHtmlStyles.java.

final String org.sleuthkit.autopsy.contentviewers.layout.ContentViewerHtmlStyles.TEXT_CLASSNAME = CLASS_PREFIX + "text"
staticprivate

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

Copyright © 2012-2022 Basis Technology. Generated on: Sun Oct 2 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.