org.geotools.styling
Class FillImpl

java.lang.Object
  extended by org.geotools.styling.FillImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.style.Fill

public class FillImpl
extends java.lang.Object
implements Fill, org.opengis.util.Cloneable

Version:
$Id: FillImpl.java 33833 2009-09-04 12:26:28Z jive $
Author:
James Macgill, CCG

Field Summary
 
Fields inherited from interface org.geotools.styling.Fill
DEFAULT, NULL
 
Constructor Summary
protected FillImpl()
          Creates a new instance of DefaultFill
  FillImpl(org.opengis.filter.FilterFactory factory)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object data)
           
 java.lang.Object clone()
          Returns a clone of the FillImpl.
 boolean equals(java.lang.Object oth)
          Compares a FillImpl with another for equality.
 org.opengis.filter.expression.Expression getBackgroundColor()
          This parameter gives the solid color that will be used as a background for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign.
 org.opengis.filter.expression.Expression getColor()
          This parameter gives the solid color that will be used for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign.
 Graphic getGraphicFill()
          This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.
 org.opengis.filter.expression.Expression getOpacity()
          This specifies the level of translucency to use when rendering the fill.
 int hashCode()
          Generates a hashcode for the FillImpl.
 void setBackgroundColor(org.opengis.filter.expression.Expression rgb)
          This parameter gives the solid color that will be used as a background for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign.
 void setBackgroundColor(java.lang.String rgb)
           
 void setColor(org.opengis.filter.expression.Expression rgb)
          This parameter gives the solid color that will be used for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign.
 void setColor(java.lang.String rgb)
           
 void setFilterFactory(org.opengis.filter.FilterFactory factory)
           
 void setGraphicFill(org.opengis.style.Graphic graphicFill)
          Setter for property graphic.
 void setOpacity(org.opengis.filter.expression.Expression opacity)
          Setter for property opacity.
 void setOpacity(java.lang.String opacity)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FillImpl

protected FillImpl()
Creates a new instance of DefaultFill


FillImpl

public FillImpl(org.opengis.filter.FilterFactory factory)
Method Detail

setFilterFactory

public void setFilterFactory(org.opengis.filter.FilterFactory factory)

getColor

public org.opengis.filter.expression.Expression getColor()
This parameter gives the solid color that will be used for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks). The default color is defined to be 50% gray ("#808080"). Note: in CSS this parameter is just called Fill and not Color.

Specified by:
getColor in interface org.opengis.style.Fill
Returns:
The color of the Fill encoded as a hexidecimal RGB value.

setColor

public void setColor(org.opengis.filter.expression.Expression rgb)
This parameter gives the solid color that will be used for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks). Note: in CSS this parameter is just called Fill and not Color.

Parameters:
rgb - The color of the Fill encoded as a hexidecimal RGB value.

setColor

public void setColor(java.lang.String rgb)

getBackgroundColor

public org.opengis.filter.expression.Expression getBackgroundColor()
This parameter gives the solid color that will be used as a background for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks). The default color is defined to be transparent.

Returns:
The color of the Fill encoded as a hexidecimal RGB value.

setBackgroundColor

public void setBackgroundColor(org.opengis.filter.expression.Expression rgb)
This parameter gives the solid color that will be used as a background for a Fill.
The color value is RGB-encoded using two hexidecimal digits per primary-color component, in the order Red, Green, Blue, prefixed with the hash (#) sign. The hexidecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks).

Parameters:
rgb - The color of the Fill encoded as a hexidecimal RGB value.

setBackgroundColor

public void setBackgroundColor(java.lang.String rgb)

getOpacity

public org.opengis.filter.expression.Expression getOpacity()
This specifies the level of translucency to use when rendering the fill.
The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque, with a linear scale of translucency for intermediate values.
For example, "0.65" would represent 65% opacity. The default value is 1.0 (opaque).

Specified by:
getOpacity in interface org.opengis.style.Fill
Returns:
The opacity of the fill, where 0.0 is completely transparent and 1.0 is completely opaque.

setOpacity

public void setOpacity(org.opengis.filter.expression.Expression opacity)
Setter for property opacity.

Parameters:
opacity - New value of property opacity.

setOpacity

public void setOpacity(java.lang.String opacity)

getGraphicFill

public Graphic getGraphicFill()
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.

Specified by:
getGraphicFill in interface org.opengis.style.Fill
Returns:
graphic The graphic to use as a stipple fill. If null then no Stipple fill should be used.

setGraphicFill

public void setGraphicFill(org.opengis.style.Graphic graphicFill)
Setter for property graphic.

Parameters:
graphicFill - New value of property graphic.

accept

public java.lang.Object accept(org.opengis.style.StyleVisitor visitor,
                               java.lang.Object data)
Specified by:
accept in interface org.opengis.style.Fill

accept

public void accept(StyleVisitor visitor)

clone

public java.lang.Object clone()
Returns a clone of the FillImpl.

Overrides:
clone in class java.lang.Object
See Also:
org.geotools.styling.Fill#clone()

hashCode

public int hashCode()
Generates a hashcode for the FillImpl.

Overrides:
hashCode in class java.lang.Object
Returns:
The hashcode.

equals

public boolean equals(java.lang.Object oth)
Compares a FillImpl with another for equality.

Two FillImpls are equal if they contain the same, color, backgroundcolor, opacity and graphicFill.

Overrides:
equals in class java.lang.Object
Parameters:
oth - The other FillImpl
Returns:
True if this FillImpl is equal to oth.


Copyright © 1996-2010 Geotools. All Rights Reserved.