MCPcopy Create free account
hub / github.com/LibrePDF/OpenPDF / InlineBox

Class InlineBox

openpdf-html/src/main/java/org/openpdf/render/InlineBox.java:54–511  ·  view source on GitHub ↗

A class which represents a portion of an inline element. If an inline element does not contain any nested elements, then a single InlineBox object will contain the content for the entire element. Otherwise, multiple InlineBox objects will be created corresponding to each discrete chu

Source from the content-addressed store, hash-verified

52 * @see InlineLayoutBox
53 */
54public class InlineBox implements Styleable {
55 @Nullable
56 private Element _element;
57
58 private String _originalText;
59 private String _text;
60 private boolean _removableWhitespace;
61 private boolean _startsHere;
62 private boolean _endsHere;
63
64 @Nullable
65 private CalculatedStyle _style;
66
67 @Nullable
68 private final ContentFunction _contentFunction;
69 @Nullable
70 private final FSFunction _function;
71
72 private boolean _minMaxCalculated;
73 private int _maxWidth;
74 private int _minWidth;
75
76 private int _firstLineWidth;
77
78 @Nullable
79 private final String _pseudoElementOrClass;
80
81 @Nullable
82 private final Text _textNode;
83
84 public InlineBox(String text, @Nullable Text textNode) {
85 this(text, textNode, null, null, null, null);
86 }
87
88 public InlineBox(String text, @Nullable Text textNode,
89 @Nullable ContentFunction contentFunction, @Nullable FSFunction function,
90 @Nullable Element element, @Nullable String pseudoElementOrClass) {
91 this(text, textNode, contentFunction, function, element, pseudoElementOrClass, null);
92 }
93
94 public InlineBox(String text, @Nullable Text textNode,
95 @Nullable ContentFunction contentFunction, @Nullable FSFunction function,
96 @Nullable Element element, @Nullable String pseudoElementOrClass,
97 @Nullable CalculatedStyle style) {
98 _text = text;
99 _originalText = text;
100 _textNode = textNode;
101 _contentFunction = contentFunction;
102 _function = function;
103 _element = element;
104 _pseudoElementOrClass = pseudoElementOrClass;
105 _style = style;
106 }
107
108 public String getText() {
109 return _text;
110 }
111

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected