public interface JaxoPaintableGrid extends JaxoGrid, java.awt.Transparency
Modifier and Type | Field and Description |
---|---|
static int |
STYLE_CROSS
Cross style.
|
static int |
STYLE_DOT
Dot style.
|
static int |
STYLE_LINE
Line style.
|
static int |
STYLE_LINE_HONEYCOMB
Honeycomb style.
|
static int |
TYPE_HEXAGONAL
Hexagonal type.
|
static int |
TYPE_RECTANGULAR
Rectangular type.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
ChangeEvents will be fired everytime the actual image of
the grid changes (not on canvasSize changes).
|
java.awt.Dimension |
getCanvasSize()
Size of the grid canvas.
|
java.awt.Color |
getGridColor()
Color of the grid.
|
int |
getGridSize()
Returns the current size of the grid.
|
int |
getGridStyle()
Grid style (STYLE_XYZ constant).
|
int |
getGridType()
Returns the type of the grid.
|
boolean |
isPainted()
Determine if this grid gets painted.
|
boolean |
isSnapping()
Check if points are currently snapped to the grid.
|
void |
paint(java.awt.Graphics2D g)
Paints the grid.
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a change listener.
|
void |
setCanvasSize(java.awt.Dimension value)
Sets the size of the grid canvas.
|
void |
setGridColor(java.awt.Color value)
Sets the color of the grid points.
|
void |
setGridSize(int value)
Sets the size of the grid to the given value.
|
void |
setGridStyle(int value)
Set style, and repaint.
|
void |
setGridType(int value)
Sets the type of the grid (TYPE_XYZ).
|
void |
setPainted(boolean painted)
Determine if this grid gets painted.
|
void |
setSnapping(boolean snapping)
Switch on/off the snapping of this grid.
|
isSnapped, snappedPoint, snapPoint
static final int TYPE_RECTANGULAR
static final int TYPE_HEXAGONAL
static final int STYLE_DOT
static final int STYLE_CROSS
static final int STYLE_LINE
static final int STYLE_LINE_HONEYCOMB
void addChangeListener(javax.swing.event.ChangeListener l)
l
- The listener to add.void removeChangeListener(javax.swing.event.ChangeListener l)
l
- The listener to remove.void paint(java.awt.Graphics2D g)
g
- The graphics context to paint the grid.java.awt.Dimension getCanvasSize()
void setCanvasSize(java.awt.Dimension value)
value
- The size to set.void setGridSize(int value)
value
- The grid size to be set.int getGridSize()
void setGridType(int value)
value
- The gridtype to be set.int getGridType()
int getGridStyle()
void setGridStyle(int value)
value
- The style to set.java.awt.Color getGridColor()
void setGridColor(java.awt.Color value)
value
- The color to set.boolean isPainted()
void setPainted(boolean painted)
painted
- true if this grid should get painted, false otherwise.boolean isSnapping()
void setSnapping(boolean snapping)
snapping
- true if this grid should snap points, false otherwise.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.