|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.jfimagine.jfgraph.shape.decorate.GridFormat
GridFormat class. Grids for graph drawing.
| Field Summary | |
static int |
GRIDTYPE_CROSS
|
static int |
GRIDTYPE_DOT
|
static int |
GRIDTYPE_LINE
|
static int |
GRIDTYPE_NONE
Grid types |
static int |
SIZETYPE_CM
|
static int |
SIZETYPE_INCH
size types |
static int |
SIZETYPE_MM
|
| Constructor Summary | |
GridFormat()
Constructor for GridFormat |
|
| Method Summary | |
void |
draw(java.awt.Graphics g,
double zoom)
Draw grids on current canvas. |
static GridFormat |
getDefaultGridFormat()
get global default grid format |
java.awt.Color |
getGridColor()
Get current grid color. |
double |
getGridSize()
Get the grid size. |
double |
getGridSizeInPixels(double zoom)
get the grid size in pixels. |
int |
getGridSizeType()
Get the grid size type. |
int |
getGridType()
Get the gridType between grid. |
double |
getHeight()
Get the height of entire canvas. |
JFPoint |
getSnapPos(double newX,
double newY)
get snap position. |
double |
getSnapSize()
Get the snapSize between grid. |
double |
getSnapSizeInPixels(double zoom)
get the snap size in pixels. |
int |
getSnapSizeType()
Get the snap size type. |
boolean |
getSnapToGrid()
Get the snapToGrid between grid. |
double |
getWidth()
Get the width of entire canvas. |
static void |
setDefaultGridFormat(GridFormat gridFormat)
set global default grid format |
void |
setGridColor(java.awt.Color gridColor)
Set current grid color. |
void |
setGridSize(double gridSize)
Set the grid size. |
void |
setGridSizeType(int gridSizeType)
Set the grid size type. |
void |
setGridType(int gridType)
Set the gridType between grid. |
void |
setIsMetric(boolean isMetric)
Set a metric or english grid formats. |
void |
setSize(java.awt.Dimension d)
Set the size of entire canvas |
void |
setSize(double width,
double height)
Set the size of entire canvas |
void |
setSnapSize(double snapSize)
Set the snapSize between grid. |
void |
setSnapSizeType(int snapSizeType)
Set the snap size type. |
void |
setSnapToGrid(boolean snapToGrid)
Set the snapToGrid between grid. |
void |
setValue(GridFormat gridFormat)
Set new value for this gridFormat. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int GRIDTYPE_NONE
public static final int GRIDTYPE_LINE
public static final int GRIDTYPE_CROSS
public static final int GRIDTYPE_DOT
public static final int SIZETYPE_INCH
public static final int SIZETYPE_CM
public static final int SIZETYPE_MM
| Constructor Detail |
public GridFormat()
| Method Detail |
public static void setDefaultGridFormat(GridFormat gridFormat)
gridFormat - A new grid formatpublic static GridFormat getDefaultGridFormat()
public java.awt.Color getGridColor()
public void setGridColor(java.awt.Color gridColor)
gridColor - A new grid color.public void setIsMetric(boolean isMetric)
isMetric - True if is metric, false english.public double getGridSize()
public void setGridSize(double gridSize)
gridSize - A new grid size.public int getGridSizeType()
public void setGridSizeType(int gridSizeType)
gridSizeType - A new grid size type.public double getGridSizeInPixels(double zoom)
zoom - Zoom scale,default to 1.
public int getGridType()
public void setGridType(int gridType)
gridType - A new gridType.public double getWidth()
public double getHeight()
public void setSize(java.awt.Dimension d)
d - size of canvas.
public void setSize(double width,
double height)
width - Width of canvasheight - Height of canvaspublic boolean getSnapToGrid()
public void setSnapToGrid(boolean snapToGrid)
snapToGrid - A new snapToGrid.public double getSnapSize()
public void setSnapSize(double snapSize)
snapSize - A new snapSize.public int getSnapSizeType()
public void setSnapSizeType(int snapSizeType)
snapSizeType - A new snap size type.public double getSnapSizeInPixels(double zoom)
zoom - Zoom scale,default to 1.
public void setValue(GridFormat gridFormat)
gridFormat - A new grid format.
public void draw(java.awt.Graphics g,
double zoom)
g - A graphics context.zoom - Zoom scale,default to 1.
public JFPoint getSnapPos(double newX,
double newY)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||