wicket.markup.html.image.resource
Class DefaultButtonImageResource
java.lang.Object
wicket.Resource
wicket.markup.html.WebResource
wicket.markup.html.DynamicWebResource
wicket.markup.html.image.resource.DynamicImageResource
wicket.markup.html.image.resource.RenderedDynamicImageResource
wicket.markup.html.image.resource.DefaultButtonImageResource
- All Implemented Interfaces:
- java.io.Serializable, IRequestListener, IResourceListener
public class DefaultButtonImageResource
- extends RenderedDynamicImageResource
Automatically generates a basic button image. The model for the component
determines the label displayed on the button.
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultButtonImageResource
public DefaultButtonImageResource(int width,
int height,
java.lang.String label)
- Parameters:
label - The label for this button imagewidth - Width of image in pixelsheight - Height of image in pixels
DefaultButtonImageResource
public DefaultButtonImageResource(java.lang.String label)
- Parameters:
label - The label for this button image
setDefaultHeight
public static void setDefaultHeight(int defaultHeight)
- Parameters:
defaultHeight - The defaultHeight to set.
setDefaultWidth
public static void setDefaultWidth(int defaultWidth)
- Parameters:
defaultWidth - The defaultWidth to set.
getArcHeight
public int getArcHeight()
- Returns:
- Returns the arcHeight.
getArcWidth
public int getArcWidth()
- Returns:
- Returns the arcWidth.
getBackgroundColor
public java.awt.Color getBackgroundColor()
- Returns:
- Returns the backgroundColor.
getColor
public java.awt.Color getColor()
- Returns:
- Returns the color.
getFont
public java.awt.Font getFont()
- Returns:
- Returns the font.
getTextColor
public java.awt.Color getTextColor()
- Returns:
- Returns the textColor.
setArcHeight
public void setArcHeight(int arcHeight)
- Parameters:
arcHeight - The arcHeight to set.
setArcWidth
public void setArcWidth(int arcWidth)
- Parameters:
arcWidth - The arcWidth to set.
setBackgroundColor
public void setBackgroundColor(java.awt.Color backgroundColor)
- Parameters:
backgroundColor - The backgroundColor to set.
setColor
public void setColor(java.awt.Color color)
- Parameters:
color - The color to set.
setFont
public void setFont(java.awt.Font font)
- Parameters:
font - The font to set.
setTextColor
public void setTextColor(java.awt.Color textColor)
- Parameters:
textColor - The textColor to set.
render
protected boolean render(java.awt.Graphics2D graphics)
- Renders button image.
- Specified by:
render in class RenderedDynamicImageResource
- Parameters:
graphics - The graphics context to render on
- 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:
RenderedDynamicImageResource.render(Graphics2D)
Copyright © 2004-2007 Wicket developers. All Rights Reserved.