org.grinvin.gred.guides
Class NullGuides
java.lang.Objectorg.grinvin.gred.guides.NullGuides
- Guides
public class NullGuides
extends java.lang.Object
Trivial implementation of
Guides which paints no background and
which prefers vertices to keep their requested positions.
Icon | getButtonIcon()- Return a small icon representing this type of graph.
|
void | paint(Graphics2D g2, double scale, double maxX, double maxY)- Draw guides onto the panel background.
|
void | snap(double[] coords)- Adjust the given coordinate array to correspond with 'guide'
positions.
|
NullGuides
public NullGuides()
getButtonIcon
public Icon getButtonIcon()
Return a small icon representing this type of graph.
- getButtonIcon in interface Guides
paint
public void paint(Graphics2D g2,
double scale,
double maxX,
double maxY) Draw guides onto the panel background.
- paint in interface Guides
g2 - Graphics environment with origin in the center of the panelscale - Number of pixels to one unitmaxX - Maximum X-value that is still in the visible region of the panelmaxY - Maximum Y-value that is still in the visible region of the panel
snap
public void snap(double[] coords)
Adjust the given coordinate array to correspond with 'guide'
positions.
- snap in interface Guides