Package com.dkt.graphics.extras
Class GGrid
java.lang.Object
com.dkt.graphics.elements.GraphicE
com.dkt.graphics.extras.GGrid
- All Implemented Interfaces:
Cloneable
This class creates a simple line grid
- Author:
- Federico Vera <[email protected]>
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
GGrid
Copy constructor- Parameters:
e
-GGrid
to copy- Throws:
IllegalArgumentException
- ife
isnull
-
GGrid
- Parameters:
w
- width of the gridh
- height of the gridhd
- horizontal distance between lines, if0
there will be no horizontal linesvd
- vertical distance between lines, if0
there will be no vertical lines.- Throws:
InvalidArgumentException
- ifw <= 0
orh <= 0
-
GGrid
- Parameters:
x
-x
coordinate of the centery
-y
coordinate of the centerw
- width of the gridh
- height of the gridhd
- horizontal distance between lines, if0
there will be no horizontal linesvd
- vertical distance between lines, if0
there will be no vertical lines.- Throws:
InvalidArgumentException
- ifw <= 0
orh <= 0
-
-
Method Details
-
traslate
public void traslate(int x, int y) Description copied from class:GraphicE
Traslates this element on X and Y -
setStroke
Description copied from class:GraphicE
Sets a newStroke
for this component -
setPaint
Description copied from class:GraphicE
Sets thePaint
for this component -
draw
Description copied from class:GraphicE
Draws the component on the given graphics -
clone
-