eu.webtoolkit.jwt
Class WBrush

java.lang.Object
  extended by eu.webtoolkit.jwt.WBrush

public class WBrush
extends java.lang.Object

A value class that defines the style for filling a path.

A brush defines the properties of how areas (the interior of shapes) are filled. A brush is defined using a color and a fill type (currently only solid fills are supported).

See Also:
WPainter.setBrush(WBrush b), WPen

Constructor Summary
WBrush()
          Creates a brush.
WBrush(BrushStyle style)
          Creates a black brush with given style.
WBrush(WColor color)
          Creates a solid brush of a given color.
 
Method Summary
 WBrush clone()
          Clone method.
 boolean equals(WBrush other)
          Indicates whether some other object is "equal to" this one.
 WColor getColor()
          Returns the brush color.
 BrushStyle getStyle()
          Returns the fill style.
 void setColor(WColor color)
          Sets the brush color.
 void setStyle(BrushStyle style)
          Sets the brush style.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBrush

public WBrush()
Creates a brush.

Creates a brush with a NoBrush fill style.


WBrush

public WBrush(BrushStyle style)
Creates a black brush with given style.

Creates a black brush with the indicated style.


WBrush

public WBrush(WColor color)
Creates a solid brush of a given color.

Creates a solid brush with the indicated color.

Method Detail

clone

public WBrush clone()
Clone method.

Clones this brush.

Overrides:
clone in class java.lang.Object

equals

public boolean equals(WBrush other)
Indicates whether some other object is "equal to" this one.

Returns true if the brushes are exactly the same.


setStyle

public void setStyle(BrushStyle style)
Sets the brush style.

See Also:
getStyle()

getStyle

public BrushStyle getStyle()
Returns the fill style.

See Also:
setStyle(BrushStyle style)

setColor

public void setColor(WColor color)
Sets the brush color.

See Also:
getColor()

getColor

public WColor getColor()
Returns the brush color.

See Also:
getColor()