ChartCat 1.2

li.netcat.chart.util
Class DeviceString

java.lang.Object
  extended byli.netcat.chart.util.DeviceString

public final class DeviceString
extends java.lang.Object

This immutable class represents a string on a specific device. The dimensions of the string might depend on the resolution and the print capabilities of the device (e.g. ligature).

Author:
Arthur Marxer

Constructor Summary
DeviceString(java.lang.String text, java.awt.FontMetrics fm)
          Constructs a new DeviceString using the given text and font metrics.
 
Method Summary
 float ascent()
          Returns the ascent of the text.
 float descent()
          Returns the descent of the text.
 float height()
          Returns the height of the string.
 java.lang.String text()
          Returns the text of this DeviceString.
 float width()
          Returns the with of the string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceString

public DeviceString(java.lang.String text,
                    java.awt.FontMetrics fm)
Constructs a new DeviceString using the given text and font metrics.

Parameters:
text - The text, might also be null.
fm - The font metrics, not null.
Method Detail

width

public float width()
Returns the with of the string.

Returns:
The with of the string.

height

public float height()
Returns the height of the string.

Returns:
The height of the string. This value is the sum of ascent and descent.

text

public java.lang.String text()
Returns the text of this DeviceString.

Returns:
The text or null.

ascent

public float ascent()
Returns the ascent of the text.

Returns:
The ascent.

descent

public float descent()
Returns the descent of the text.

Returns:
the descent of the text.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print