public class Manifold
extends java.lang.Object
Glyphish
methods in
large IOPGraph
objects. The two methods being:
Glyphish getGlyphThing(Point2D p2d) void paint(Graphics2D g2d, Rectangle2D rect2d)The underlying graph bounds is overlain with a grid of smaller rectangles, called charts. The dimension of these charts are configurable via the fields:
public static int CHART_W = 1000; public static int CHART_H = 1000;or by the parameters to the sole contructor. Currently manifolds are automatically used if the size of the graph exceeds
public static int THRESHOLD = 200;All these fields need to be set to the desired values before the graph is laid out.
Modifier and Type | Field and Description |
---|---|
static int |
CHART_H
The default chart height.
|
static int |
CHART_W
The default chart width.
|
static int |
COLUMN
Just for code reduction -- used to indicate we are processing columns.
|
static int |
ROW
Just for code reduction -- used to indicate we are processing rows.
|
static int |
THRESHOLD
The threshold, in graph size, when manifolds are used automatically.
|
Constructor and Description |
---|
Manifold(int width,
int height,
int w,
int h)
Constructs a Manifold object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Glyphish glyph)
Adds glyphish thing to the appropriate charts.
|
Glyphish |
getGlyphThing(java.awt.geom.Point2D p2d)
One of the optimized methods, returns the glyph located at the
specified point, or null if none exists.
|
void |
paint(java.awt.Graphics2D g2d,
java.awt.geom.Rectangle2D rect2d)
One of the optimimized methods, paints only those charts that intersect
with the given rectangle.
|
public static final int ROW
public static final int COLUMN
public static int THRESHOLD
public static int CHART_W
public static int CHART_H
public Manifold(int width, int height, int w, int h)
width
- an int specifying the width of the rectangle being covered.height
- an int specifying the height of the rectangle being covered.w
- an int specifying the width of the covering charts.h
- an int specifying the height of the covering charts.public Glyphish getGlyphThing(java.awt.geom.Point2D p2d)
p2d
- a point of interest.public void paint(java.awt.Graphics2D g2d, java.awt.geom.Rectangle2D rect2d)
g2d
- a Graphics2D object, to be used in the painting process.rect2d
- a Rectangle2D object, the area to be painted.public void add(Glyphish glyph)
glyph
- a Glyphish object