org.deegree_impl.services.wms.protocol
Class WMSGetScaleBarRequest_Impl

java.lang.Object
  extended byorg.deegree_impl.services.OGCWebServiceRequest_Impl
      extended byorg.deegree_impl.services.wms.protocol.WMSGetScaleBarRequest_Impl
All Implemented Interfaces:
OGCWebServiceRequest, WMSGetScaleBarRequest

public class WMSGetScaleBarRequest_Impl
extends OGCWebServiceRequest_Impl
implements WMSGetScaleBarRequest

class for the deegree specific WMS request: GetScaleBar

Version:
$Revision: 1.5 $
Author:
Andreas Poth, Jeronimo Wanhoff

Field Summary
private  java.awt.Color allgColor
           
private  java.awt.Color barColor
           
private  int barSize
           
private  java.lang.String barStyle
           
private  int bottomLabel
           
private  java.awt.Font font
           
private  java.lang.String format
           
private  java.awt.Color labelColor
           
private  double scale
           
private  int scaleDenominator
           
private  int topLabel
           
private  java.lang.String units
           
 
Fields inherited from class org.deegree_impl.services.OGCWebServiceRequest_Impl
id, request, service, vendorSpecificParameter, version
 
Fields inherited from interface org.deegree.services.wms.protocol.WMSGetScaleBarRequest
L_NONE, L_SCALE, L_SIZE
 
Constructor Summary
WMSGetScaleBarRequest_Impl(java.lang.String version, java.lang.String id, java.util.HashMap vendorSpecificParameter, java.lang.String units, int topLabel, int bottomLabel, java.awt.Color labelColor, java.awt.Font font, java.lang.String barStyle, java.awt.Color barColor, java.awt.Color bgColor, int size, double scale, int scaleDenominator, java.lang.String format)
          Constructor
 
Method Summary
 int getBarSize()
          return the size of the scale bar in pixel
 java.awt.Color getBGColor()
          returns the background color of the scale bar
 int getBottomLabel()
          get the label type that shall be displayed below the scale bar.
 java.awt.Color getColor()
          returns the color will be painted or null if the scale bar hasn't a unique color (depends on the style)
 java.awt.Font getFont()
          returns the font to be used for drawing the labels
 java.lang.String getFormat()
          returns the image format (MIME Type) the scale bar will be produced in.
 java.awt.Color getLabelColor()
          returns the color the scale bars label will be painted
 double getPixelSize()
          returns the pixel size in milli meter.
 java.lang.String getRequestParameter()
          returns the URI of a HTTP GET request.
 double getScale()
           
 int getScaleDenominator()
           
 int getSize()
          returns the size of the scale bar in pixel
 java.lang.String getStyle()
          returns the name of the style the scale bar should be drawed. beside 'default' and 'ALTERNATE' the available styles depends on the implementation.
 int getTopLabel()
          get the label type that shall be displayed above the scale bar.
 java.lang.String getUnits()
          returns the name of the units the scale bar should use for measuring
 void setBarSize(int barSize)
          sets the size of the scale bar in pixel
 void setBGColor(java.awt.Color bgColor)
          sets the background color of the scale bar
 void setBottomLabel(int bLabel)
          set the label type that shall be displayed below the scale bar.
 void setColor(java.awt.Color bColor)
          sets the color will be painted or null if the scale bar hasn't a unique color (depends on the style)
 void setFont(java.awt.Font font)
          sets the font to be used for drawing the labels
 void setFormat(java.lang.String format)
          sets the image format (MIME Type) the scale bar will be produced in.
 void setLabelColor(java.awt.Color lColor)
          sets the color the scale bars label will be painted
 void setScale(double s)
           
 void setScaleDenominator(int sd)
           
 void setSize(int size)
          sets the size of the scale bar in pixel
 void setStyle(java.lang.String bStyle)
          sets the name of the style the scale bar should be drawed. beside 'default' and 'ALTERNATE' the available styles depends on the implementation.
 void setTopLabel(int topLabel)
          set the label type that shall be displayed above the scale bar.
 void setUnits(java.lang.String uName)
          sets the name of the units the scale bar should use for measuring
 
Methods inherited from class org.deegree_impl.services.OGCWebServiceRequest_Impl
getId, getRequest, getService, getVendorSpecificParameter, getVendorSpecificParameters, getVersion, putVendorSpecificParameter, setId, setRequest, setService, setVendorSpecificParameter, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.services.OGCWebServiceRequest
getId, getRequest, getService, getVendorSpecificParameter, getVendorSpecificParameters, getVersion
 

Field Detail

allgColor

private java.awt.Color allgColor

barColor

private java.awt.Color barColor

labelColor

private java.awt.Color labelColor

font

private java.awt.Font font

barStyle

private java.lang.String barStyle

units

private java.lang.String units

format

private java.lang.String format

scale

private double scale

scaleDenominator

private int scaleDenominator

barSize

private int barSize

bottomLabel

private int bottomLabel

topLabel

private int topLabel
Constructor Detail

WMSGetScaleBarRequest_Impl

public WMSGetScaleBarRequest_Impl(java.lang.String version,
                                  java.lang.String id,
                                  java.util.HashMap vendorSpecificParameter,
                                  java.lang.String units,
                                  int topLabel,
                                  int bottomLabel,
                                  java.awt.Color labelColor,
                                  java.awt.Font font,
                                  java.lang.String barStyle,
                                  java.awt.Color barColor,
                                  java.awt.Color bgColor,
                                  int size,
                                  double scale,
                                  int scaleDenominator,
                                  java.lang.String format)
Constructor

Parameters:
version -
id -
vendorSpecificParameter -
topLabel -
bottomLabel -
scale -
scaleDenominator -
units -
labelColor -
barColor -
bgColor -
barStyle -
font -
Method Detail

setTopLabel

public void setTopLabel(int topLabel)
set the label type that shall be displayed above the scale bar. Possible values are WMSGetScaleBarRequest.L_SCALE, WMSGetScaleBarRequest.L_SIZE WMSGetScaleBarRequest.and L_NONE.

Parameters:
topLabel - type of label to display above the scale bar

getTopLabel

public int getTopLabel()
get the label type that shall be displayed above the scale bar. Possible values are WMSGetScaleBarRequest.L_SCALE, WMSGetScaleBarRequest.L_SIZE and WMSGetScaleBarRequest.L_NONE.

Specified by:
getTopLabel in interface WMSGetScaleBarRequest
Returns:
type of label to display above the scale bar

setBottomLabel

public void setBottomLabel(int bLabel)
set the label type that shall be displayed below the scale bar. Possible values are WMSGetScaleBarRequest.L_SCALE, WMSGetScaleBarRequest.L_SIZE and WMSGetScaleBarRequest.L_NONE

Parameters:
bLabel - type of label to display below the scale bar

getBottomLabel

public int getBottomLabel()
get the label type that shall be displayed below the scale bar. Possible values are WMSGetScaleBarRequest.L_SCALE, WMSGetScaleBarRequest.L_SIZE and WMSGetScaleBarRequest.L_NONE

Specified by:
getBottomLabel in interface WMSGetScaleBarRequest
Returns:
type of label to display below the scale bar

setScale

public void setScale(double s)
Parameters:
s -

getScale

public double getScale()
Specified by:
getScale in interface WMSGetScaleBarRequest
Returns:

setScaleDenominator

public void setScaleDenominator(int sd)
Parameters:
sd -

getScaleDenominator

public int getScaleDenominator()
Specified by:
getScaleDenominator in interface WMSGetScaleBarRequest
Returns:

setUnits

public void setUnits(java.lang.String uName)
sets the name of the units the scale bar should use for measuring

Parameters:
uName - name of the units

getUnits

public java.lang.String getUnits()
returns the name of the units the scale bar should use for measuring

Specified by:
getUnits in interface WMSGetScaleBarRequest
Returns:
name of the units

setSize

public void setSize(int size)
sets the size of the scale bar in pixel

Parameters:
size - of the scale bar in pixel

getSize

public int getSize()
returns the size of the scale bar in pixel

Specified by:
getSize in interface WMSGetScaleBarRequest
Returns:
size of the scale bar in pixel

setColor

public void setColor(java.awt.Color bColor)
sets the color will be painted or null if the scale bar hasn't a unique color (depends on the style)

Parameters:
bColor - color of the scale bar

getColor

public java.awt.Color getColor()
returns the color will be painted or null if the scale bar hasn't a unique color (depends on the style)

Specified by:
getColor in interface WMSGetScaleBarRequest
Returns:
color of the scale bar

setBGColor

public void setBGColor(java.awt.Color bgColor)
sets the background color of the scale bar

Parameters:
bgColor - background color

getBGColor

public java.awt.Color getBGColor()
returns the background color of the scale bar

Specified by:
getBGColor in interface WMSGetScaleBarRequest
Returns:
background color

setLabelColor

public void setLabelColor(java.awt.Color lColor)
sets the color the scale bars label will be painted

Parameters:
lColor - color of the labels

getLabelColor

public java.awt.Color getLabelColor()
returns the color the scale bars label will be painted

Specified by:
getLabelColor in interface WMSGetScaleBarRequest
Returns:
color of the labels

getStyle

public java.lang.String getStyle()
returns the name of the style the scale bar should be drawed. beside 'default' and 'ALTERNATE' the available styles depends on the implementation.

Specified by:
getStyle in interface WMSGetScaleBarRequest
Returns:
style of the scale bar

setStyle

public void setStyle(java.lang.String bStyle)
sets the name of the style the scale bar should be drawed. beside 'default' and 'ALTERNATE' the available styles depends on the implementation.

Parameters:
bStyle - style of the scale bar

getFormat

public java.lang.String getFormat()
returns the image format (MIME Type) the scale bar will be produced in.

Specified by:
getFormat in interface WMSGetScaleBarRequest
Returns:
image format of the scale bar

setFormat

public void setFormat(java.lang.String format)
sets the image format (MIME Type) the scale bar will be produced in.

Parameters:
format -

getPixelSize

public double getPixelSize()
returns the pixel size in milli meter. This value is needed for calculating scale of the map. For usual the exact pixel size isn't known or different pixels size at different clients are used at the same time. So in most cases this method returns the default pixels size of 0.28 mm.

Specified by:
getPixelSize in interface WMSGetScaleBarRequest
Returns:
client pixel size in milli meter

getRequestParameter

public java.lang.String getRequestParameter()
                                     throws WebServiceException
Description copied from interface: OGCWebServiceRequest
returns the URI of a HTTP GET request. If the request doesn't support HTTP GET a WebServiceException will be thrown

Specified by:
getRequestParameter in interface OGCWebServiceRequest
Overrides:
getRequestParameter in class OGCWebServiceRequest_Impl
Returns:
Throws:
WebServiceException

getBarSize

public int getBarSize()
return the size of the scale bar in pixel

Specified by:
getBarSize in interface WMSGetScaleBarRequest
Returns:

setBarSize

public void setBarSize(int barSize)
sets the size of the scale bar in pixel

Parameters:
barSize -

getFont

public java.awt.Font getFont()
returns the font to be used for drawing the labels

Specified by:
getFont in interface WMSGetScaleBarRequest
Returns:

setFont

public void setFont(java.awt.Font font)
sets the font to be used for drawing the labels