Module org.apache.wicket.core
Class DefaultButtonImageResource
java.lang.Object
org.apache.wicket.request.resource.AbstractResource
org.apache.wicket.request.resource.DynamicImageResource
org.apache.wicket.markup.html.image.resource.RenderedDynamicImageResource
org.apache.wicket.markup.html.image.resource.DefaultButtonImageResource
- All Implemented Interfaces:
Serializable
,IResource
,IClusterable
Automatically generates a basic button image. The model for the component determines the label
displayed on the button.
- Author:
- Jonathan Locke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.AbstractResource
AbstractResource.ContentRangeType, AbstractResource.ResourceResponse, AbstractResource.WriteCallback
Nested classes/interfaces inherited from interface org.apache.wicket.request.resource.IResource
IResource.Attributes
-
Field Summary
Fields inherited from class org.apache.wicket.request.resource.AbstractResource
CONTENT_DISPOSITION_HEADER_NAME, CONTENT_RANGE_ENDBYTE, CONTENT_RANGE_STARTBYTE, INTERNAL_HEADERS
-
Constructor Summary
ConstructorDescriptionDefaultButtonImageResource
(int width, int height, String label) DefaultButtonImageResource
(String label) -
Method Summary
Modifier and TypeMethodDescriptionint
int
getColor()
getFont()
protected boolean
render
(Graphics2D graphics, IResource.Attributes attributes) Renders button image.void
setArcHeight
(int arcHeight) void
setArcWidth
(int arcWidth) void
setBackgroundColor
(Color backgroundColor) void
static void
setDefaultHeight
(int defaultHeight) static void
setDefaultWidth
(int defaultWidth) void
void
setTextColor
(Color textColor) Methods inherited from class org.apache.wicket.markup.html.image.resource.RenderedDynamicImageResource
getHeight, getImageData, getType, getWidth, invalidate, render, setHeight, setType, setWidth
Methods inherited from class org.apache.wicket.request.resource.DynamicImageResource
configureResponse, getFormat, newResourceResponse, setFormat, setLastModifiedTime, toImageData
Methods inherited from class org.apache.wicket.request.resource.AbstractResource
configureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaders
-
Constructor Details
-
DefaultButtonImageResource
- Parameters:
label
- The label for this button imagewidth
- Width of image in pixelsheight
- Height of image in pixels
-
DefaultButtonImageResource
- Parameters:
label
- The label for this button image
-
-
Method Details
-
setDefaultHeight
- Parameters:
defaultHeight
- The defaultHeight to set.
-
setDefaultWidth
- Parameters:
defaultWidth
- The defaultWidth to set.
-
getArcHeight
- Returns:
- Returns the arcHeight.
-
getArcWidth
- Returns:
- Returns the arcWidth.
-
getBackgroundColor
- Returns:
- Returns the backgroundColor.
-
getColor
- Returns:
- Returns the color.
-
getFont
- Returns:
- Returns the font.
-
getTextColor
- Returns:
- Returns the textColor.
-
setArcHeight
- Parameters:
arcHeight
- The arcHeight to set.
-
setArcWidth
- Parameters:
arcWidth
- The arcWidth to set.
-
setBackgroundColor
- Parameters:
backgroundColor
- The backgroundColor to set.
-
setColor
- Parameters:
color
- The color to set.
-
setFont
- Parameters:
font
- The font to set.
-
setTextColor
- Parameters:
textColor
- The textColor to set.
-
render
Renders button image.- Specified by:
render
in classRenderedDynamicImageResource
- Parameters:
graphics
- The graphics context to render on.attributes
- the current request attributes- Returns:
true
if the image was rendered.false
if the image size was changed by the rendering implementation and the image should be re-rendered at the new size.- See Also:
-