|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JaxoPaintableGrid
A grid that can be painted.
Field Summary | |
---|---|
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. |
Fields inherited from interface java.awt.Transparency |
---|
BITMASK, OPAQUE, TRANSLUCENT |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
ChangeEvents will be fired everytime the actual image of the grid changes (not on canvasSize changes). |
Dimension |
getCanvasSize()
Size of the grid canvas. |
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(Graphics2D g)
Paints the grid. |
void |
removeChangeListener(ChangeListener l)
Removes a change listener. |
void |
setCanvasSize(Dimension value)
Sets the size of the grid canvas. |
void |
setGridColor(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. |
Methods inherited from interface net.sf.jaxodraw.gui.grid.JaxoGrid |
---|
isSnapped, snappedPoint, snapPoint |
Methods inherited from interface java.awt.Transparency |
---|
getTransparency |
Field Detail |
---|
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
Method Detail |
---|
void addChangeListener(ChangeListener l)
l
- The listener to add.void removeChangeListener(ChangeListener l)
l
- The listener to remove.void paint(Graphics2D g)
g
- The graphics context to paint the grid.Dimension getCanvasSize()
void setCanvasSize(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.Color getGridColor()
void setGridColor(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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |