Package com.dkt.graphics.elements
Class GraphicE
java.lang.Object
com.dkt.graphics.elements.GraphicE
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
AbstractTimer
,GAxis
,GClip
,GFillableE
,GGrid
,GImage
,GLine
,GPixMap
,GPoint
,GPVector
,Graphic
,GSprite
,GString
,GTransform
,GVector
,GVectorPolygon
This class represents an abstract Graphical Element
- Author:
- Federico Vera <[email protected]>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract GraphicE
clone()
abstract void
draw
(Graphics2D g) Draws the component on the given graphicsboolean
getPaint()
ThePaint
of this componentGets theStroke
used to draw this componentint
hashCode()
void
Sets thePaint
for this componentvoid
Sets a newStroke
for this componentabstract void
traslate
(int x, int y) Traslates this element on X and Y
-
Field Details
-
STROKE
Size 1 stroke
-
-
Constructor Details
-
GraphicE
Copy constructor- Parameters:
e
-GraphicE
to copy- Throws:
IllegalArgumentException
- ife
isnull
-
GraphicE
protected GraphicE()
-
-
Method Details
-
getPaint
ThePaint
of this component -
setPaint
Sets thePaint
for this component- Parameters:
paint
- the paint use to render thisGraphicE
- Throws:
IllegalArgumentException
- if paint isnull
-
getStroke
Gets theStroke
used to draw this component- Returns:
- stroke used for this
GraphicE
-
setStroke
Sets a newStroke
for this component- Parameters:
stroke
- theStroke
to use- Throws:
IllegalArgumentException
- if stroke isnull
-
traslate
public abstract void traslate(int x, int y) Traslates this element on X and Y- Parameters:
x
- size inpx
of the horizontal translationy
- size inpx
of the vertical translation
-
draw
Draws the component on the given graphics- Parameters:
g
- where to draw
-
clone
-
hashCode
public int hashCode() -
equals
-