acm.graphics
Interface GFillable

All Known Implementing Classes:
GPolygon, GRect, GOval, GArc

public interface GFillable

Specifies the characteristics of a graphical object that supports filling.


Method Summary
Color getFillColor()
Returns the color used to display the filled region of this object.
boolean isFilled()
Returns whether this object is filled.
void setFillColor(Color c)
Sets the color used to display the filled region of this object.
void setFilled(boolean fill)
Sets whether this object is filled.
 

Method Detail

public Color getFillColor()

Returns the color used to display the filled region of this object. If none has been set, getFillColor returns the color of the object.

 
Usage: Color color = gobj.getFillColor(); 
Returns: The color used to display the filled region of this object
 

public boolean isFilled()

Returns whether this object is filled.

 
Usage: if (gobj.isFilled()) . . . 
Returns: The color used to display the object
 

public void setFillColor(Color c)

Sets the color used to display the filled region of this object.

 
Usage: gobj.setFillColor(color); 
Parameter: 
color  The color used to display the filled region of this object
 

public void setFilled(boolean fill)

Sets whether this object is filled.

 
Usage: gobj.setFilled(fill); 
Parameter: 
fill  true if the object should be filled, false for an outline