APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvm.hotspot.ui

public Class Annotation

extends Object
Class Inheritance
Imports
java.awt.*, java.awt.font.*, java.awt.geom.*, java.util.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.utilities.*

This can be extended, along with AnnotatedMemoryPanel, to be an arbitrarily complex mechanism, supporting user interaction, etc.

Field Summary

Modifier and TypeField and Description
private Color
private int
private List<Integer>
private Interval
private List<String>
private int
private int
x

private int
y

Constructor Summary

AccessConstructor and Description
public
Annotation(Address lowAddress, Address highAddress, String s)

The Annotation can handle the sense of lowAddress and highAddress being swapped.

Method Summary

Modifier and TypeMethod and Description
public void
computeWidthAndHeight(Graphics g)

Computes width and height for this Annotation.

public void
draw(Graphics g)

Draw the annotation at its current (x, y) position with its current color

public Rectangle
public Color
getColor()

Returns the base color of this annotation.

public int
public Address
public Interval
public Address
public int
public int
getX()

public int
getY()

public void
setColor(Color c)

Sets the base color of this annotation.

public void
setX(int x)

public void
setXAndY(int x, int y)

Set the x and y position of this annotation

public void
setY(int y)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

baseColorback to summary
private Color baseColor
heightback to summary
private int height
heightsback to summary
private List<Integer> heights
intervalback to summary
private Interval interval
stringsback to summary
private List<String> strings
widthback to summary
private int width
xback to summary
private int x
yback to summary
private int y

Constructor Detail

Annotationback to summary
public Annotation(Address lowAddress, Address highAddress, String s)

The Annotation can handle the sense of lowAddress and highAddress being swapped.

Method Detail

computeWidthAndHeightback to summary
public void computeWidthAndHeight(Graphics g)

Computes width and height for this Annotation. Retrieve the computed information using getWidth() and getHeight(). Separated because the width and height only need to be recomputed if the font changes.

drawback to summary
public void draw(Graphics g)

Draw the annotation at its current (x, y) position with its current color

getBoundsback to summary
public Rectangle getBounds()
getColorback to summary
public Color getColor()

Returns the base color of this annotation.

getHeightback to summary
public int getHeight()
getHighAddressback to summary
public Address getHighAddress()
getIntervalback to summary
public Interval getInterval()
getLowAddressback to summary
public Address getLowAddress()
getWidthback to summary
public int getWidth()
getXback to summary
public int getX()
getYback to summary
public int getY()
setColorback to summary
public void setColor(Color c)

Sets the base color of this annotation. The annotation may render sub-portions in a different color if desired.

setXback to summary
public void setX(int x)
setXAndYback to summary
public void setXAndY(int x, int y)

Set the x and y position of this annotation

setYback to summary
public void setY(int y)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.