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.
TextStyle, TextLayout, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| public int | ascent
the ascent of the GlyphMetrics |
| public int | descent
the descent of the GlyphMetrics |
| public int | width
the width of the GlyphMetrics |
| Access | Constructor and Description |
|---|---|
| public | GlyphMetrics(int
the GlyphMetrics ascent ascent, int the GlyphMetrics descent descent, int the GlyphMetrics width width)Constructs an instance of this class with the given ascent, descent and width values. |
| 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. |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| public int | Returns: the receiver's hashOverrides java. |
| public String | Returns: a string representation of theGlyphMetricsOverrides java. |
| ascent | back to summary |
|---|---|
| public int ascent the ascent of the GlyphMetrics | |
| descent | back to summary |
|---|---|
| public int descent the descent of the GlyphMetrics | |
| width | back to summary |
|---|---|
| public int width the width of the GlyphMetrics | |
| GlyphMetrics | back to summary |
|---|---|
| public GlyphMetrics(int ascent, int descent, int width) Constructs an instance of this class with the given ascent, descent and width values.
| |
| 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.
| |
| getAscentInPixels | back to summary |
|---|---|
| pack-priv int getAscentInPixels() | |
| getDescentInPixels | back to summary |
|---|---|
| pack-priv int getDescentInPixels() | |
| getWidthInPixels | back to summary |
|---|---|
| pack-priv int getWidthInPixels() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns an integer hash code for the receiver. Any two
objects that return
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |