Top Description Inners Fields Constructors Methods
org.jabref.htmltonode.model

public final Record InlineStyle

extends Record
Class Inheritance
Record Components
fontWeight:int
CSS font weight, 100–900; 400 is normal, 700 is bold
italic:boolean
italic or oblique
underline:boolean
underlined text
strikethrough:boolean
struck-through text
smallCaps:boolean
font-variant: small-caps (renderers emulate via scaled capitals)
monospace:boolean
code/tt/kbd/samp or font-family: monospace
verticalPosition:InlineStyle.VerticalPosition
subscript/superscript placement
fontScale:double
font size relative to the renderer's base size; 1.0 = base
fontFamily:@Nullable String
explicit font family, or null to use the renderer default
color:@Nullable String
CSS color string (e.g. #ff0000, orange), or null for the default
background:@Nullable String
CSS background color string (e.g. from <mark>), or null for none
href:@Nullable String
link target; non-null means this run is a hyperlink
Imports
org.jspecify.annotations.Nullable

Resolved (absolute) styling of an inline run.

Parsers resolve inheritance and resets while walking the DOM (e.g. <span style="font-style: normal"> inside <i> yields italic = false), so instances always carry final values and renderers never need to consult ancestors.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
InlineStyle.VerticalPosition

Vertical placement of a run relative to the baseline.

Field Summary

Modifier and TypeField and Description
private final @Nullable String
background

Record Component accessed by background().

CSS background color string (e.g. from <mark>), or null for none
private final @Nullable String
color

Record Component accessed by color().

CSS color string (e.g. #ff0000, orange), or null for the default
public static final InlineStyle
DEFAULT

The style of unmarked body text: weight 400, base size, no decorations, default fonts and colors.

private final @Nullable String
fontFamily

Record Component accessed by fontFamily().

explicit font family, or null to use the renderer default
private final double
fontScale

Record Component accessed by fontScale().

font size relative to the renderer's base size; 1.0 = base
private final int
fontWeight

Record Component accessed by fontWeight().

CSS font weight, 100–900; 400 is normal, 700 is bold
private final @Nullable String
href

Record Component accessed by href().

link target; non-null means this run is a hyperlink
private final boolean
italic

Record Component accessed by italic().

italic or oblique
private final boolean
monospace

Record Component accessed by monospace().

code/tt/kbd/samp or font-family: monospace
private final boolean
smallCaps

Record Component accessed by smallCaps().

font-variant: small-caps (renderers emulate via scaled capitals)
private final boolean
strikethrough

Record Component accessed by strikethrough().

struck-through text
private final boolean
underline

Record Component accessed by underline().

underlined text
private final InlineStyle.VerticalPosition
verticalPosition

Record Component accessed by verticalPosition().

subscript/superscript placement

Constructor Summary

AccessConstructor and Description
public
InlineStyle(int fontWeight, boolean italic, boolean underline, boolean strikethrough, boolean smallCaps, boolean monospace, InlineStyle.VerticalPosition verticalPosition, double fontScale, @Nullable String fontFamily, @Nullable String color, @Nullable String background, @Nullable String href)

Method Summary

Modifier and TypeMethod and Description
public @Nullable String
background()

Record Component getter of background.

Record Component CSS background color string (e.g. from <mark>), or null for none

public boolean
bold()

Returns: whether the fontWeight() renders bold (600 or heavier)

public @Nullable String
color()

Record Component getter of color.

Record Component CSS color string (e.g. #ff0000, orange), or null for the default

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public @Nullable String
fontFamily()

Record Component getter of fontFamily.

Record Component explicit font family, or null to use the renderer default

public double
fontScale()

Record Component getter of fontScale.

Record Component font size relative to the renderer's base size; 1.0 = base

public int
fontWeight()

Record Component getter of fontWeight.

Record Component CSS font weight, 100–900; 400 is normal, 700 is bold

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public @Nullable String
href()

Record Component getter of href.

Record Component link target; non-null means this run is a hyperlink

public boolean
italic()

Record Component getter of italic.

Record Component italic or oblique

public boolean
monospace()

Record Component getter of monospace.

Record Component code/tt/kbd/samp or font-family: monospace

public boolean
smallCaps()

Record Component getter of smallCaps.

Record Component font-variant: small-caps (renderers emulate via scaled capitals)

public boolean
strikethrough()

Record Component getter of strikethrough.

Record Component struck-through text

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

public boolean
underline()

Record Component getter of underline.

Record Component underlined text

public InlineStyle.VerticalPosition
verticalPosition()

Record Component getter of verticalPosition.

Record Component subscript/superscript placement

public InlineStyle
public InlineStyle
public InlineStyle
public InlineStyle
withFontScale(double newFontScale)

public InlineStyle
withFontWeight(int newFontWeight)

public InlineStyle
public InlineStyle
withItalic(boolean newItalic)

public InlineStyle
withMonospace(boolean newMonospace)

public InlineStyle
withSmallCaps(boolean newSmallCaps)

public InlineStyle
withStrikethrough(boolean newStrikethrough)

public InlineStyle
withUnderline(boolean newUnderline)

public InlineStyle

Field Detail

backgroundback to summary
private final @Nullable String background

Record Component accessed by background().

CSS background color string (e.g. from <mark>), or null for none

colorback to summary
private final @Nullable String color

Record Component accessed by color().

CSS color string (e.g. #ff0000, orange), or null for the default

DEFAULTback to summary
public static final InlineStyle DEFAULT

The style of unmarked body text: weight 400, base size, no decorations, default fonts and colors.

fontFamilyback to summary
private final @Nullable String fontFamily

Record Component accessed by fontFamily().

explicit font family, or null to use the renderer default

fontScaleback to summary
private final double fontScale

Record Component accessed by fontScale().

font size relative to the renderer's base size; 1.0 = base

fontWeightback to summary
private final int fontWeight

Record Component accessed by fontWeight().

CSS font weight, 100–900; 400 is normal, 700 is bold

hrefback to summary
private final @Nullable String href

Record Component accessed by href().

link target; non-null means this run is a hyperlink

italicback to summary
private final boolean italic

Record Component accessed by italic().

italic or oblique

monospaceback to summary
private final boolean monospace

Record Component accessed by monospace().

code/tt/kbd/samp or font-family: monospace

smallCapsback to summary
private final boolean smallCaps

Record Component accessed by smallCaps().

font-variant: small-caps (renderers emulate via scaled capitals)

strikethroughback to summary
private final boolean strikethrough

Record Component accessed by strikethrough().

struck-through text

underlineback to summary
private final boolean underline

Record Component accessed by underline().

underlined text

verticalPositionback to summary
private final InlineStyle.VerticalPosition verticalPosition

Record Component accessed by verticalPosition().

subscript/superscript placement

Constructor Detail

InlineStyleback to summary
public InlineStyle(int fontWeight, boolean italic, boolean underline, boolean strikethrough, boolean smallCaps, boolean monospace, InlineStyle.VerticalPosition verticalPosition, double fontScale, @Nullable String fontFamily, @Nullable String color, @Nullable String background, @Nullable String href)

Method Detail

backgroundback to summary
public @Nullable String background()

Record Component getter of background.

Record Component
CSS background color string (e.g. from <mark>), or null for none
boldback to summary
public boolean bold()
Returns:boolean

whether the fontWeight() renders bold (600 or heavier)

colorback to summary
public @Nullable String color()

Record Component getter of color.

Record Component
CSS color string (e.g. #ff0000, orange), or null for the default
equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
fontFamilyback to summary
public @Nullable String fontFamily()

Record Component getter of fontFamily.

Record Component
explicit font family, or null to use the renderer default
fontScaleback to summary
public double fontScale()

Record Component getter of fontScale.

Record Component
font size relative to the renderer's base size; 1.0 = base
fontWeightback to summary
public int fontWeight()

Record Component getter of fontWeight.

Record Component
CSS font weight, 100–900; 400 is normal, 700 is bold
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

hrefback to summary
public @Nullable String href()

Record Component getter of href.

Record Component
link target; non-null means this run is a hyperlink
italicback to summary
public boolean italic()

Record Component getter of italic.

Record Component
italic or oblique
monospaceback to summary
public boolean monospace()

Record Component getter of monospace.

Record Component
code/tt/kbd/samp or font-family: monospace
smallCapsback to summary
public boolean smallCaps()

Record Component getter of smallCaps.

Record Component
font-variant: small-caps (renderers emulate via scaled capitals)
strikethroughback to summary
public boolean strikethrough()

Record Component getter of strikethrough.

Record Component
struck-through text
toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

underlineback to summary
public boolean underline()

Record Component getter of underline.

Record Component
underlined text
verticalPositionback to summary
public InlineStyle.VerticalPosition verticalPosition()

Record Component getter of verticalPosition.

Record Component
subscript/superscript placement
withBackgroundback to summary
public InlineStyle withBackground(@Nullable String newBackground)
withColorback to summary
public InlineStyle withColor(@Nullable String newColor)
withFontFamilyback to summary
public InlineStyle withFontFamily(@Nullable String newFontFamily)
withFontScaleback to summary
public InlineStyle withFontScale(double newFontScale)
withFontWeightback to summary
public InlineStyle withFontWeight(int newFontWeight)
withHrefback to summary
public InlineStyle withHref(@Nullable String newHref)
withItalicback to summary
public InlineStyle withItalic(boolean newItalic)
withMonospaceback to summary
public InlineStyle withMonospace(boolean newMonospace)
withSmallCapsback to summary
public InlineStyle withSmallCaps(boolean newSmallCaps)
withStrikethroughback to summary
public InlineStyle withStrikethrough(boolean newStrikethrough)
withUnderlineback to summary
public InlineStyle withUnderline(boolean newUnderline)
withVerticalPositionback to summary
public InlineStyle withVerticalPosition(InlineStyle.VerticalPosition newVerticalPosition)
org.jabref.htmltonode.model back to summary

public final Enum InlineStyle.VerticalPosition

extends Enum<InlineStyle.VerticalPosition>
Class Inheritance

Vertical placement of a run relative to the baseline.

Field Summary

Modifier and TypeField and Description
public static final InlineStyle.VerticalPosition
NORMAL

On the baseline.

public static final InlineStyle.VerticalPosition
SUB

Subscript (<sub>, vertical-align: sub).

public static final InlineStyle.VerticalPosition
SUPER

Superscript (<sup>, vertical-align: super).

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static InlineStyle.VerticalPosition
public static InlineStyle.VerticalPosition[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NORMALback to summary
public static final InlineStyle.VerticalPosition NORMAL

On the baseline.

SUBback to summary
public static final InlineStyle.VerticalPosition SUB

Subscript (<sub>, vertical-align: sub).

SUPERback to summary
public static final InlineStyle.VerticalPosition SUPER

Superscript (<sup>, vertical-align: super).

Constructor Detail

VerticalPositionback to summary
private VerticalPosition()

Method Detail

valueOfback to summary
public static InlineStyle.VerticalPosition valueOf(String name)
valuesback to summary
public static InlineStyle.VerticalPosition[] values()