TextStyle defines a set of styles that can be applied
to a range of text.
The hashCode() method in this class uses the values of the public fields to compute the hash value. When storing instances of the class in hashed collections, do not modify these fields after the object has been inserted.
Application code does not need to explicitly release the
resources managed by each instance when those instances are no longer
required, and thus no dispose() method is provided.
TextLayout, Font, Color, TextLayout, TextStyle snippets, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| public Color | background
the background of the style |
| public Color | borderColor
the border color of the style |
| public int | borderStyle
the border style. |
| public Object | data
the data. |
| public Font | font
the font of the style |
| public Color | foreground
the foreground of the style |
| public GlyphMetrics | metrics
the GlyphMetrics of the style |
| public int | rise
the baseline rise of the style. |
| public boolean | strikeout
the strikeout flag of the style |
| public Color | strikeoutColor
the strikeout color of the style |
| public boolean | underline
the underline flag of the style. |
| public Color | underlineColor
the underline color of the style |
| public int | underlineStyle
the underline style. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the object is the same as this object and false otherwisethe object to compare with this object object)Overrides java. |
| public int | Returns: the receiver's hashOverrides java. |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| public String | Returns: a string representation of theTextStyleOverrides java. |
| background | back to summary |
|---|---|
| public Color background the background of the style | |
| borderColor | back to summary |
|---|---|
| public Color borderColor the border color of the style
| |
| borderStyle | back to summary |
|---|---|
| public int borderStyle the border style. The default border style is
This value should be one of
| |
| data | back to summary |
|---|---|
| public Object data the data. An user data field. It can be used to hold the HREF when the range
is used as a link or the embed object when the range is used with
| |
| font | back to summary |
|---|---|
| public Font font the font of the style | |
| foreground | back to summary |
|---|---|
| public Color foreground the foreground of the style | |
| metrics | back to summary |
|---|---|
| public GlyphMetrics metrics the GlyphMetrics of the style
| |
| rise | back to summary |
|---|---|
| public int rise the baseline rise of the style.
| |
| strikeout | back to summary |
|---|---|
| public boolean strikeout the strikeout flag of the style
| |
| strikeoutColor | back to summary |
|---|---|
| public Color strikeoutColor the strikeout color of the style
| |
| underline | back to summary |
|---|---|
| public boolean underline the underline flag of the style. The default underline
style is
| |
| underlineColor | back to summary |
|---|---|
| public Color underlineColor the underline color of the style
| |
| underlineStyle | back to summary |
|---|---|
| public int underlineStyle the underline style. This style is ignored when
This value should be one of
| |
| TextStyle | back to summary |
|---|---|
| public TextStyle() Create an empty text style.
| |
| TextStyle | back to summary |
|---|---|
| public TextStyle(Font font, Color foreground, Color background) Create a new text style with the specified font, foreground and background. | |
| TextStyle | back to summary |
|---|---|
| public TextStyle(TextStyle style) Create a new text style from an existing text style.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns an integer hash code for the receiver. Any two
objects that return
| |
| isAdherentBorder | back to summary |
|---|---|
| pack-priv boolean isAdherentBorder(TextStyle style) | |
| isAdherentStrikeout | back to summary |
|---|---|
| pack-priv boolean isAdherentStrikeout(TextStyle style) | |
| isAdherentUnderline | back to summary |
|---|---|
| pack-priv boolean isAdherentUnderline(TextStyle style) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |