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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract GraphicEclone()abstract voiddraw(Graphics2D g) Draws the component on the given graphicsbooleangetPaint()ThePaintof this componentGets theStrokeused to draw this componentinthashCode()voidSets thePaintfor this componentvoidSets a newStrokefor this componentabstract voidtraslate(int x, int y) Traslates this element on X and Y
-
Field Details
-
STROKE
Size 1 stroke
-
-
Constructor Details
-
GraphicE
Copy constructor- Parameters:
e-GraphicEto copy- Throws:
IllegalArgumentException- ifeisnull
-
GraphicE
protected GraphicE()
-
-
Method Details
-
getPaint
ThePaintof this component -
setPaint
Sets thePaintfor this component- Parameters:
paint- the paint use to render thisGraphicE- Throws:
IllegalArgumentException- if paint isnull
-
getStroke
Gets theStrokeused to draw this component- Returns:
- stroke used for this
GraphicE
-
setStroke
Sets a newStrokefor this component- Parameters:
stroke- theStroketo 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 inpxof the horizontal translationy- size inpxof the vertical translation
-
draw
Draws the component on the given graphics- Parameters:
g- where to draw
-
clone
-
hashCode
public int hashCode() -
equals
-