public class TextBuffer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextBuffer.Alignment |
static class |
TextBuffer.Builder |
| Modifier and Type | Field and Description |
|---|---|
static RenderShape |
highlightShape |
| Modifier and Type | Method and Description |
|---|---|
void |
cache(RenderContext ctx,
double maxWidth) |
TextBuffer |
copy() |
TextBuffer |
copyTo(TextAPI<?> text) |
TextBuffer.Builder |
copyToBuilder() |
TextBuffer.Builder |
copyToBuilder(TextAPI<?> text) |
void |
decrementBlinkerPos() |
void |
decrementHighlight() |
void |
draw(RenderContext ctx,
Vector3 center,
double minX,
double minY,
double maxX,
double maxY) |
void |
flipBlinkerVisibility() |
static TextBuffer.Builder |
getBuilder(TextAPI<?> text) |
int |
getCharPos(RenderContext ctx,
double x,
double y,
Vector3 center,
double minX,
double minY,
double maxX,
double maxY)
Returns -1 if the position is too far outside the drawn text or if the buffer is not yet cached.
|
double |
getHeight(@Nullable RenderContext ctx,
double maxWidth) |
java.lang.String |
getHighlighted() |
double |
getLeft(Vector3 center) |
double |
getWidth(@Nullable RenderContext ctx,
double maxWidth) |
void |
incrementBlinkerPos() |
void |
incrementHighlight() |
boolean |
isBlank() |
boolean |
isBottomAligned() |
boolean |
isCenterAligned() |
boolean |
isEmpty() |
boolean |
isHighlighting() |
boolean |
isLeftAligned() |
boolean |
isRightAligned() |
boolean |
isTopAligned() |
static TextBuffer |
literal(java.lang.String literal) |
static TextBuffer.Builder |
literalBuilder(java.lang.String literal) |
static TextBuffer |
of(TextAPI<?> text) |
void |
setMaxWidth(RenderContext ctx,
double maxWidth) |
int |
textLength() |
java.lang.String |
toString() |
static TextBuffer |
translated(java.lang.String key,
java.lang.Object... args) |
static TextBuffer.Builder |
translatedBuilder(java.lang.String key,
java.lang.Object... args) |
public static final RenderShape highlightShape
public static TextBuffer.Builder getBuilder(TextAPI<?> text)
public static TextBuffer literal(java.lang.String literal)
public static TextBuffer.Builder literalBuilder(java.lang.String literal)
public static TextBuffer of(TextAPI<?> text)
public static TextBuffer translated(java.lang.String key, java.lang.Object... args)
public static TextBuffer.Builder translatedBuilder(java.lang.String key, java.lang.Object... args)
public void cache(RenderContext ctx, double maxWidth)
public TextBuffer copy()
public TextBuffer copyTo(TextAPI<?> text)
public TextBuffer.Builder copyToBuilder()
public TextBuffer.Builder copyToBuilder(TextAPI<?> text)
public void decrementBlinkerPos()
public void decrementHighlight()
public void draw(RenderContext ctx, Vector3 center, double minX, double minY, double maxX, double maxY)
public void flipBlinkerVisibility()
public int getCharPos(RenderContext ctx, double x, double y, Vector3 center, double minX, double minY, double maxX, double maxY)
public double getHeight(@Nullable
@Nullable RenderContext ctx,
double maxWidth)
public java.lang.String getHighlighted()
public double getLeft(Vector3 center)
public double getWidth(@Nullable
@Nullable RenderContext ctx,
double maxWidth)
public void incrementBlinkerPos()
public void incrementHighlight()
public boolean isBlank()
public boolean isBottomAligned()
public boolean isCenterAligned()
public boolean isEmpty()
public boolean isHighlighting()
public boolean isLeftAligned()
public boolean isRightAligned()
public boolean isTopAligned()
public void setMaxWidth(RenderContext ctx, double maxWidth)
public int textLength()
public java.lang.String toString()
toString in class java.lang.Object