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
Constructors -
Method Summary
-
Constructor Details
-
GGrid
Copy constructor- Parameters:
e-GGridto copy- Throws:
IllegalArgumentException- ifeisnull
-
GGrid
- Parameters:
w- width of the gridh- height of the gridhd- horizontal distance between lines, if0there will be no horizontal linesvd- vertical distance between lines, if0there will be no vertical lines.- Throws:
InvalidArgumentException- ifw <= 0orh <= 0
-
GGrid
- Parameters:
x-xcoordinate of the centery-ycoordinate of the centerw- width of the gridh- height of the gridhd- horizontal distance between lines, if0there will be no horizontal linesvd- vertical distance between lines, if0there will be no vertical lines.- Throws:
InvalidArgumentException- ifw <= 0orh <= 0
-
-
Method Details
-
traslate
public void traslate(int x, int y) Description copied from class:GraphicETraslates this element on X and Y -
setStroke
Description copied from class:GraphicESets a newStrokefor this component -
setPaint
Description copied from class:GraphicESets thePaintfor this component -
draw
Description copied from class:GraphicEDraws the component on the given graphics -
clone
-