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
ConstructorsModifierConstructorDescriptionprotectedprotectedCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract GFillableEclone()booleanbooleanfill()Tells if the component must be filledRetrieves thePaintused to render this componentabstract AreagetShape()This method should return aAreathat represents theGFillableE.inthashCode()voidsetFill(boolean fill) Tells if the component needs to be filledvoidsetFillPaint(Paint paint) Sets thePaintthat's used to fill this component
-
Constructor Details
-
GFillableE
Copy constructor- Parameters:
e-GFillableEto copy- Throws:
IllegalArgumentException- ifeisnull
-
GFillableE
protected GFillableE()
-
-
Method Details
-
getFillPaint
Retrieves thePaintused to render this component- Returns:
- the
Paint
-
setFillPaint
Sets thePaintthat's used to fill this component- Parameters:
paint- The newPaintused to render this component- Throws:
IllegalArgumentException- ifpaintisnull
-
fill
public boolean fill()Tells if the component must be filled- Returns:
trueif the component must be filled andfalseotherwise
-
setFill
public void setFill(boolean fill) Tells if the component needs to be filled- Parameters:
fill-trueif the component must be filled andfalseotherwise
-
getShape
This method should return aAreathat represents theGFillableE. Since this is not always possible, and the implementation ofAreaisn't always easy, it should returnnullotherwise.
InjDrawingLibs implementation we use the default shapes for this. Note that this method is only called to create clips forGraphicobjects- Returns:
- Shape
-
clone
-
hashCode
public int hashCode() -
equals
-