public class GridSettings extends Object
Constructor and Description |
---|
GridSettings()
Construct a GridSettings objects with all values set to default.
|
GridSettings(int units)
Construct a GridSettings objects and set the value of units to either RulerSettings.UNIT_INCHES or RulerSettings.UNIT_CENTIMETERS
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Get the color of the grid lines.
|
double |
getHorizontalSpacing()
Get the number of inches or centimeters between vertical grid lines.
|
double |
getLeftOffset()
Get the distance from the left side of the page where vertical grid lines will begin.
|
int |
getSubDivisions()
Get the number of subdivisions between major grid lines.
|
double |
getTopOffset()
Get the distance from the top of the page where horizontal grid lines will begin.
|
int |
getUnits()
Returns the units that this grid is using when displaying.
|
double |
getVerticalSpacing()
Get the number of inches or centimeters between horizontal grid lines.
|
void |
setColor(Color color)
Set the new color of the grid lines.
|
void |
setHorizontalSpacing(double divisionWidth)
Set the number of inches or centimeters between vertical grid lines.
|
void |
setLeftOffset(double offsetLeft)
Set the distance from the left side of the page where vertical grid lines will begin.
|
void |
setSubDivisions(int subDivisions)
Set the number of subdivisions between major grid lines.
|
void |
setTopOffset(double offsetTop)
Set the distance from the top of the page where horizontal grid lines will begin.
|
void |
setUnits(int units)
Sets the units to use when displaying the grid.
|
void |
setVerticalSpacing(double divisionHeight)
Set the number of inches or centimeters between horizontal grid lines.
|
public GridSettings()
public GridSettings(int units)
public Color getColor()
public double getVerticalSpacing()
public double getHorizontalSpacing()
public double getLeftOffset()
public double getTopOffset()
public int getSubDivisions()
public void setColor(Color color)
color
- the new color of the grid lines.public void setVerticalSpacing(double divisionHeight)
divisionHeight
- inches or centimeters between horizontal grid lines.public void setHorizontalSpacing(double divisionWidth)
divisionWidth
- inches or centimeters between vertical grid lines.public void setUnits(int units)
units
- public int getUnits()
public void setLeftOffset(double offsetLeft)
offsetLeft
- the distance from the left side of the page where vertical grid lines will
begin.public void setTopOffset(double offsetTop)
offsetTop
- the distance from the top of the page where horizontal grid lines will
begin.public void setSubDivisions(int subDivisions)
subDivisions
- the number of subdivisions between major grid lines.