public class TextFormat
extends java.lang.Object
Canvas
.Modifier and Type | Field and Description |
---|---|
boolean |
antialias
Whether or not the text should be antialiased.
|
Font |
font
The font in which to render the text (null indicates that the default font is used).
|
Constructor and Description |
---|
TextFormat()
Creates a default text format instance.
|
TextFormat(Font font)
Creates a text format instance with the specified font.
|
TextFormat(Font font,
boolean antialias)
Creates a configured text format instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
java.lang.String |
toString() |
TextFormat |
withAntialias(boolean antialias)
Returns a clone of this text format with
antialias configured as specified. |
TextFormat |
withFont(Font font)
Returns a clone of this text format with the font configured as specified.
|
TextFormat |
withFont(java.lang.String name,
float size)
Returns a clone of this text format with the font configured as specified.
|
TextFormat |
withFont(java.lang.String name,
Font.Style style,
float size)
Returns a clone of this text format with the font configured as specified.
|
public final Font font
public final boolean antialias
public TextFormat()
public TextFormat(Font font)
public TextFormat(Font font, boolean antialias)
public TextFormat withFont(Font font)
public TextFormat withFont(java.lang.String name, Font.Style style, float size)
public TextFormat withFont(java.lang.String name, float size)
public TextFormat withAntialias(boolean antialias)
antialias
configured as specified.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019. All Rights Reserved.