org.grinvin.gred.guides
Class AbstractGuides
java.lang.Object
org.grinvin.gred.guides.AbstractGuides
- Guides
public abstract class AbstractGuides
extends java.lang.Object
Abstract implementation of
Guides
. Contains common functionality for
Guides.
Icon | getButtonIcon() - Return an icon for a button representing this kind of guide.
|
abstract void | paint(Graphics2D g2, double scale, double maxX, double maxY) - Draw guides onto the panel background.
|
abstract void | snap(double[] coords) - Adjust the given coordinate array to correspond with 'guide'
positions.
|
GUIDE_COLOR
protected static final Color GUIDE_COLOR
GUIDE_STROKE
protected static final Stroke GUIDE_STROKE
buttonIcon
protected Icon buttonIcon
AbstractGuides
protected AbstractGuides()
getButtonIcon
public Icon getButtonIcon()
Return an icon for a button representing this kind of guide.
- getButtonIcon in interface Guides
paint
public abstract 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 abstract void snap(double[] coords)
Adjust the given coordinate array to correspond with 'guide'
positions.
- snap in interface Guides