Package com.dkt.graphics.elements
Class GFillableE
java.lang.Object
com.dkt.graphics.elements.GraphicE
com.dkt.graphics.elements.GFillableE
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
GArc
,GCircle
,GMultiPoint
,GOval
,GRectangle
This represents an abstract fillable element
- Author:
- Federico Vera <[email protected]>
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract GFillableE
clone()
boolean
boolean
fill()
Tells if the component must be filledRetrieves thePaint
used to render this componentabstract Area
getShape()
This method should return aArea
that represents theGFillableE
.int
hashCode()
void
setFill
(boolean fill) Tells if the component needs to be filledvoid
setFillPaint
(Paint paint) Sets thePaint
that's used to fill this component
-
Constructor Details
-
GFillableE
Copy constructor- Parameters:
e
-GFillableE
to copy- Throws:
IllegalArgumentException
- ife
isnull
-
GFillableE
protected GFillableE()
-
-
Method Details
-
getFillPaint
Retrieves thePaint
used to render this component- Returns:
- the
Paint
-
setFillPaint
Sets thePaint
that's used to fill this component- Parameters:
paint
- The newPaint
used to render this component- Throws:
IllegalArgumentException
- ifpaint
isnull
-
fill
public boolean fill()Tells if the component must be filled- Returns:
true
if the component must be filled andfalse
otherwise
-
setFill
public void setFill(boolean fill) Tells if the component needs to be filled- Parameters:
fill
-true
if the component must be filled andfalse
otherwise
-
getShape
This method should return aArea
that represents theGFillableE
. Since this is not always possible, and the implementation ofArea
isn't always easy, it should returnnull
otherwise.
InjDrawingLib
s implementation we use the default shapes for this. Note that this method is only called to create clips forGraphic
objects- Returns:
- Shape
-
clone
-
hashCode
public int hashCode() -
equals
-