Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.bibtexhighlighter

public final Enum BibTeXStyleClass

extends Enum<BibTeXStyleClass>
Class Inheritance
Annotations
@NullMarked
Imports
org.jspecify.annotations.NullMarked

Maps a BibTeXTokenCategory (from the Veneer syntax highlighter) to the CSS style class used to render it in the JavaFX CodeArea.

The enum constant names intentionally mirror io.github.kusoroadeolu.veneer.BibTeXSyntaxHighlighter.BibTeXTokenCategory so that BibTeXHighlighter can resolve a category to its style class via Enum#valueOf.

The actual colors and font styles for each class (e.g. .bibtex-keyword) are defined in the theme stylesheets (jabref-theme.css on themes.jabref.org), not here, so that they can be customized per theme without touching Java code.

Field Summary

Modifier and TypeField and Description
public static final BibTeXStyleClass
public static final BibTeXStyleClass
public static final BibTeXStyleClass
public static final BibTeXStyleClass
public static final BibTeXStyleClass
public static final BibTeXStyleClass
public static final BibTeXStyleClass
public static final BibTeXStyleClass
private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the CSS style class name
getStyleClass
()

Returns the CSS style class name to apply to a text segment of this category, e.g. "bibtex-keyword".

public static BibTeXStyleClass
public static BibTeXStyleClass[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CITE_KEYback to summary
public static final BibTeXStyleClass CITE_KEY
COMMENTback to summary
public static final BibTeXStyleClass COMMENT
DEFAULTback to summary
public static final BibTeXStyleClass DEFAULT
FIELD_NAMEback to summary
public static final BibTeXStyleClass FIELD_NAME
KEYWORDback to summary
public static final BibTeXStyleClass KEYWORD
MACROback to summary
public static final BibTeXStyleClass MACRO
NUMBERback to summary
public static final BibTeXStyleClass NUMBER
STRINGback to summary
public static final BibTeXStyleClass STRING
styleClassback to summary
private final String styleClass

Constructor Detail

BibTeXStyleClassback to summary
private BibTeXStyleClass(String styleClass)

Method Detail

getStyleClassback to summary
public String getStyleClass()

Returns the CSS style class name to apply to a text segment of this category, e.g. "bibtex-keyword".

Returns:String

the CSS style class name

valueOfback to summary
public static BibTeXStyleClass valueOf(String name)
valuesback to summary
public static BibTeXStyleClass[] values()