|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.models.impl.LShape
net.sf.latexdraw.glib.models.impl.LPositionShape
net.sf.latexdraw.glib.models.impl.LAbstractGrid
net.sf.latexdraw.glib.models.impl.LGrid
class LGrid
Defines a model of a grid.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
07/05/2009
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape |
---|
IShape.BorderPos, IShape.FillingStyle, IShape.LineStyle, IShape.Position |
Field Summary | |
---|---|
protected int |
gridDots
The number of dots in the lines of the grid ( if >0, replace a plain line) |
protected java.awt.Color |
gridLabelsColour
The colour of the labels |
protected double |
gridWidth
The thickness of the main borders of the grid. |
static int |
MIN_LABELS_SIZE
The minimum possible size of the labels |
protected java.awt.Color |
subGridColour
The colour of the sub-grid. |
protected int |
subGridDiv
The number of division in a sub-grid. |
protected int |
subGridDots
The number of dots in the lines of the sub-grid ( if >0, replace a plain line) |
protected double |
subGridWidth
The thickness of the lines of the sub-grid |
protected double |
unit
The unit of the grid |
Fields inherited from class net.sf.latexdraw.glib.models.impl.LAbstractGrid |
---|
gridEndx, gridEndy, gridStartx, gridStarty, labelSize, originx, originy, xLabelSouth, yLabelWest |
Fields inherited from class net.sf.latexdraw.glib.models.impl.LShape |
---|
arrows, bordersPosition, dashSepBlack, dashSepWhite, dbleBordCol, dbleBordSep, dotSep, fillingCol, fillingStyle, gradAngle, gradColEnd, gradColStart, gradMidPt, hasDbleBord, hasShadow, hatchingsAngle, hatchingsCol, hatchingsSep, hatchingsWidth, id, lineColour, lineStyle, modified, opacity, points, rotationAngle, shadowAngle, shadowCol, shadowSize, showPts, thickness |
Fields inherited from interface net.sf.latexdraw.glib.models.interfaces.IShape |
---|
GOLDEN_ANGLE, PPC |
Constructor Summary | |
---|---|
protected |
LGrid(boolean isUniqueID,
IPoint pt)
Creates a grid with a predefined point. |
Method Summary | |
---|---|
void |
copy(IShape sh)
Copies a shape using another. |
IGrid |
duplicate()
Creates a duplicate of the shape (however id are not the same). |
int |
getGridDots()
|
java.awt.Color |
getGridLabelsColour()
|
double |
getGridWidth()
|
double |
getStep()
|
java.awt.Color |
getSubGridColour()
|
int |
getSubGridDiv()
|
int |
getSubGridDots()
|
double |
getSubGridWidth()
|
double |
getUnit()
|
boolean |
isParametersEquals(IShape sh,
boolean considerShadow)
Checks if the parameters of the shapes are equals. |
void |
scale(double x,
double y,
IShape.Position pos,
java.awt.geom.Rectangle2D bound)
Scales the shape where the move reference point is the bottom right point, and the fixation point the top left point. |
void |
setGridDots(int gridDots)
|
void |
setGridLabelsColour(java.awt.Color gridLabelsColour)
|
void |
setGridWidth(double gridWidth)
|
void |
setSubGridColour(java.awt.Color subGridColour)
|
void |
setSubGridDiv(int subGridDiv)
|
void |
setSubGridDots(int subGridDots)
|
void |
setSubGridWidth(double subGridWidth)
|
void |
setUnit(double unit)
|
Methods inherited from class net.sf.latexdraw.glib.models.impl.LAbstractGrid |
---|
getBottomRightPoint, getGridEnd, getGridEndX, getGridEndY, getGridMaxX, getGridMaxY, getGridMinX, getGridMinY, getGridStart, getGridStartX, getGridStartY, getLabelsSize, getOriginX, getOriginY, getTopLeftPoint, getTopRightPoint, isXLabelSouth, isYLabelWest, mirrorHorizontal, mirrorVertical, setGridEnd, setGridEndX, setGridEndY, setGridStart, setGridStartX, setGridStartY, setLabelsSize, setOrigin, setOriginX, setOriginY, setXLabelSouth, setYLabelWest |
Methods inherited from class net.sf.latexdraw.glib.models.impl.LPositionShape |
---|
getPosition, getX, getY, setPosition, setPosition, setX, setY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IStandardGrid |
---|
getGridEnd, getGridEndX, getGridEndY, getGridMaxX, getGridMaxY, getGridMinX, getGridMinY, getGridStart, getGridStartX, getGridStartY, getLabelsSize, getOriginX, getOriginY, isXLabelSouth, isYLabelWest, setGridEnd, setGridEndX, setGridEndY, setGridStart, setGridStartX, setGridStartY, setLabelsSize, setOrigin, setOriginX, setOriginY, setXLabelSouth, setYLabelWest |
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IPositionShape |
---|
getPosition, getX, getY, setPosition, setPosition, setX, setY |
Methods inherited from interface org.malai.properties.Modifiable |
---|
isModified, setModified |
Methods inherited from interface net.sf.latexdraw.glib.models.interfaces.IArrowable |
---|
getArrowInset, getArrowLength, getArrowSizeDim, getArrowSizeNum, getBracketNum, getDotSizeDim, getDotSizeNum, getRBracketNum, getTBarSizeDim, getTBarSizeNum, setArrowInset, setArrowLength, setArrowSizeDim, setArrowSizeNum, setBracketNum, setDotSizeDim, setDotSizeNum, setRBracketNum, setTBarSizeDim, setTBarSizeNum |
Field Detail |
---|
protected java.awt.Color subGridColour
protected int subGridDiv
protected double gridWidth
protected java.awt.Color gridLabelsColour
protected int gridDots
protected double subGridWidth
protected int subGridDots
protected double unit
public static final int MIN_LABELS_SIZE
Constructor Detail |
---|
protected LGrid(boolean isUniqueID, IPoint pt)
isUniqueID
- True: the shape will have a unique ID.pt
- The position.Method Detail |
---|
public void copy(IShape sh)
IShape
copy
in interface IShape
copy
in class LAbstractGrid
sh
- The shape to copy.public IGrid duplicate()
IShape
duplicate
in interface IGrid
duplicate
in interface IShape
duplicate
in class LShape
public boolean isParametersEquals(IShape sh, boolean considerShadow)
IShape
isParametersEquals
in interface IShape
isParametersEquals
in class LAbstractGrid
sh
- The shape to compare.considerShadow
- True if the parameters of the shadows must be considered.
public void scale(double x, double y, IShape.Position pos, java.awt.geom.Rectangle2D bound)
IShape
scale
in interface IShape
scale
in class LShape
x
- The X scale factor, in ]0,double].y
- The Y scale factor, in ]0,double].pos
- The position of the reference point: if the reference point is top-left point,
then the scale will extend or reduce the shape at the bottom-right point. If the reference
position is NORTH or SOUTH the sx parameter will not be used. If it is EAST or WEST the sy
parameter will not be used.bound
- The bound (e.g. the border of the selected shapes) used to compute the scaling.public int getGridDots()
getGridDots
in interface IGrid
public java.awt.Color getGridLabelsColour()
getGridLabelsColour
in interface IGrid
public double getGridWidth()
getGridWidth
in interface IGrid
public java.awt.Color getSubGridColour()
getSubGridColour
in interface IGrid
public int getSubGridDiv()
getSubGridDiv
in interface IGrid
public int getSubGridDots()
getSubGridDots
in interface IGrid
public double getSubGridWidth()
getSubGridWidth
in interface IGrid
public double getUnit()
getUnit
in interface IGrid
public void setGridDots(int gridDots)
setGridDots
in interface IGrid
gridDots
- The gridDots to set. Must be greater or equal than 0.public void setGridLabelsColour(java.awt.Color gridLabelsColour)
setGridLabelsColour
in interface IGrid
gridLabelsColour
- The gridLabelsColor to set.public void setGridWidth(double gridWidth)
setGridWidth
in interface IGrid
gridWidth
- The gridWidth to set. Must be greater than 0.public void setSubGridColour(java.awt.Color subGridColour)
setSubGridColour
in interface IGrid
subGridColour
- The subGridColor to set.public void setSubGridDiv(int subGridDiv)
setSubGridDiv
in interface IGrid
subGridDiv
- The subGridDiv to set. Must be greater or equal than 0.public void setSubGridDots(int subGridDots)
setSubGridDots
in interface IGrid
subGridDots
- The subGridDots to set. Must be greater or equal than 0.public void setSubGridWidth(double subGridWidth)
setSubGridWidth
in interface IGrid
subGridWidth
- The subGridWidth to set. Must be greater than 0.public void setUnit(double unit)
setUnit
in interface IGrid
unit
- The unit to set. Must be greater than 0.public double getStep()
getStep
in interface IStandardGrid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |