com.michaelbaranov.microba.jgraph.birdview

Class Birdview


public class Birdview
extends JPanel

A JFC/Swing component that displays a bird-eyes (thumbnail) view of a JGraph in combination with JScrollPane. Also allows to pan view with the mouse.
Author:
Michael Baranov

Field Summary

static Color
BACKGROUND_COLOR
Color constant
static Color
PAN_RECT_COLOR
Color constant

Constructor Summary

Birdview()
Constructor.

Method Summary

void
paint(Graphics g)
void
setTrackingFor(JGraph graph, JScrollPane scroller)
Makes this component track the provided graph and scroller.

Field Details

BACKGROUND_COLOR

public static final Color BACKGROUND_COLOR
Color constant

PAN_RECT_COLOR

public static final Color PAN_RECT_COLOR
Color constant

Constructor Details

Birdview

public Birdview()
Constructor.
Parameters:

Method Details

paint

public void paint(Graphics g)

setTrackingFor

public void setTrackingFor(JGraph graph,
                           JScrollPane scroller)
Makes this component track the provided graph and scroller. Set parameters to null to unbind thie component.
Parameters:
graph - the graph component. May be null
scroller - the croller, usually the one that holds the graph. May be null