Class WRasterFavicon
WFavicon using a WRasterImage as resource.
This is a WFavicon that uses a WRasterImage as resource.
In its default state, it shows an image present in the docroot, and in its updated state, it shows the same image with a circle.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aWRasterFavicon.WRasterFavicon(WAbstractDataInfo info, WLength width) Constructs aWRasterFavicon.WRasterFavicon(WAbstractDataInfo info, WLength width, WLength height) Constructs aWRasterFavicon.WRasterFavicon(WAbstractDataInfo info, WLength width, WLength height, String type) Constructs aWRasterFavicon.WRasterFavicon(WAbstractDataInfo info, String type) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoReset()Resets the favicon.protected voiddoUpdate()Updates the favicon.Returns the data info of the default favicon.protected WRasterPaintDeviceReturns the WRasterImage.Returns the brush used to fill the circle.Returns the brush used to paint the outline of the circle.getUrl()Returns the url to the favicon.voidSets the default favicon.voidsetFillBrush(WBrush brush) Sets the brush used to fill the circle.voidsetOutlineBrush(WBrush brush) Sets the brush used to paint the outline of the circle.
-
Constructor Details
-
WRasterFavicon
Constructs aWRasterFavicon.Constructs a
WRasterFaviconof given imagetype,width, andheightand using the image described byinfoas default favicon.By default,
typeis "png" andwidthandheightare of 256 pixels.Note: Like for WRasterImage, the mime type of the favicon is
"image/"type. -
WRasterFavicon
Constructs aWRasterFavicon.Calls
this(info, new WLength (256), new WLength (256), "png") -
WRasterFavicon
Constructs aWRasterFavicon. -
WRasterFavicon
Constructs aWRasterFavicon. -
WRasterFavicon
-
-
Method Details
-
setdefaultFavicon
Sets the default favicon.Sets the image described by
infoas the new default favicon. -
getDefaultFavicon
Returns the data info of the default favicon.- See Also:
-
getUrl
Returns the url to the favicon.This returns the url to the WRasterImage, updating the WRasterImage will therefor automatically update the favicon on the client side.
-
setOutlineBrush
Sets the brush used to paint the outline of the circle.This sets the brush used to paint the outline of the circle added to the favicon when in updated state.
- See Also:
-
getOutlineBrush
Returns the brush used to paint the outline of the circle.- See Also:
-
setFillBrush
Sets the brush used to fill the circle.This sets the brush used to the circle added to the favicon when in updated state.
- See Also:
-
getFillBrush
Returns the brush used to fill the circle.- See Also:
-
getFavicon
Returns the WRasterImage.- See Also:
-
doUpdate
protected void doUpdate()Updates the favicon.Draw the circle on the WRasterImage.
You can override this function to change what is drawn on the favicon when update is called.
-
doReset
protected void doReset()Resets the favicon.Clear the WRasterImage and repaint the default favicon on it.
-