|
Method Summary |
|
double |
getAscent()
Returns the distance this string extends above the baseline. |
|
Rectangle |
getBounds()
Returns a Rectangle that specifies the bounding box for the string. |
|
double |
getDescent()
Returns the distance this string descends below the baseline. |
|
Font |
getFont()
Returns the font in which the GString is displayed. |
|
FontMetrics |
getFontMetrics()
Returns a FontMetrics object describing the dimensions of this string. |
|
double |
getHeight()
Returns the height of this string in pixels, as it appears on the display. |
|
Dimension |
getSize()
Returns the size of this string, which is set by changing the contents and
font rather than by calling setSize, which is disabled for this
class. |
|
String |
getString()
Returns the string displayed by this object. |
|
double |
getWidth()
Returns the width of this string in pixels, as it appears (or would appear) on the display. |
|
void |
paint(Graphics g)
Implements the paint operation for this graphical object. |
|
void |
setFont(Font font)
Changes the font used to display the GString. |
|
void |
setString(String str)
Changes the string stored within the GString object, so that
a new text string appears on the display. |
|
Inherited Method Summary |
|
void |
addMouseListener(MouseListener listener)
Adds a mouse listener to this graphical object.
[Inherited from GObject]
|
|
void |
addMouseMotionListener(MouseMotionListener listener)
Adds a mouse motion listener to this graphical object.
[Inherited from GObject]
|
|
boolean |
contains(double x,
double y)
Checks to see whether a point is inside the object.
[Inherited from GObject]
|
|
Color |
getColor()
Returns the color used to display this object.
[Inherited from GObject]
|
|
Point |
getLocation()
Returns the nearest Point corresponding to the location of this object.
[Inherited from GObject]
|
|
double |
getX()
Returns the x-coordinate of the object.
[Inherited from GObject]
|
|
double |
getY()
Returns the y-coordinate of the object.
[Inherited from GObject]
|
|
boolean |
isVisible()
Checks to see whether this object is visible.
[Inherited from GObject]
|
|
void |
moveToBack()
Moves this object to the back of the display in stacking order.
[Inherited from GObject]
|
|
void |
moveToFront()
Moves this object to the front of the display in stacking order.
[Inherited from GObject]
|
|
void |
removeMouseListener(MouseListener listener)
Removes a mouse listener from this graphical object.
[Inherited from GObject]
|
|
void |
removeMouseMotionListener(MouseMotionListener listener)
Removes a mouse motion listener from this graphical object.
[Inherited from GObject]
|
|
void |
setColor(Color c)
Sets the color used to display this object.
[Inherited from GObject]
|
|
void |
setLocation(double x,
double y)
Sets the location of this object to the point (x, y).
[Inherited from GObject]
|
|
void |
setVisible(boolean visible)
Sets whether this object is visible.
[Inherited from GObject]
|
|
void |
translate(double dx,
double dy)
Moves the object on the screen using the displacements dx and dy.
[Inherited from GObject]
|