public class DefaultButtonImageResource extends RenderedDynamicImageResource
AbstractResource.ContentRangeType, AbstractResource.ResourceResponse, AbstractResource.WriteCallbackIResource.AttributesCONTENT_DISPOSITION_HEADER_NAME, CONTENT_RANGE_ENDBYTE, CONTENT_RANGE_STARTBYTE, INTERNAL_HEADERS| Constructor and Description |
|---|
DefaultButtonImageResource(int width,
int height,
String label) |
DefaultButtonImageResource(String label) |
| Modifier and Type | Method and Description |
|---|---|
int |
getArcHeight() |
int |
getArcWidth() |
Color |
getBackgroundColor() |
Color |
getColor() |
Font |
getFont() |
Color |
getTextColor() |
protected boolean |
render(Graphics2D graphics,
IResource.Attributes attributes)
Renders button image.
|
void |
setArcHeight(int arcHeight) |
void |
setArcWidth(int arcWidth) |
void |
setBackgroundColor(Color backgroundColor) |
void |
setColor(Color color) |
static void |
setDefaultHeight(int defaultHeight) |
static void |
setDefaultWidth(int defaultWidth) |
void |
setFont(Font font) |
void |
setTextColor(Color textColor) |
getHeight, getImageData, getType, getWidth, invalidate, render, setHeight, setType, setWidthconfigureResponse, getFormat, newResourceResponse, setFormat, setLastModifiedTime, toImageDataconfigureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaderspublic DefaultButtonImageResource(int width,
int height,
String label)
label - The label for this button imagewidth - Width of image in pixelsheight - Height of image in pixelspublic DefaultButtonImageResource(String label)
label - The label for this button imagepublic static void setDefaultHeight(int defaultHeight)
defaultHeight - The defaultHeight to set.public static void setDefaultWidth(int defaultWidth)
defaultWidth - The defaultWidth to set.public int getArcHeight()
public int getArcWidth()
public Color getBackgroundColor()
public Color getColor()
public Font getFont()
public Color getTextColor()
public void setArcHeight(int arcHeight)
arcHeight - The arcHeight to set.public void setArcWidth(int arcWidth)
arcWidth - The arcWidth to set.public void setBackgroundColor(Color backgroundColor)
backgroundColor - The backgroundColor to set.public void setColor(Color color)
color - The color to set.public void setFont(Font font)
font - The font to set.public void setTextColor(Color textColor)
textColor - The textColor to set.protected boolean render(Graphics2D graphics, IResource.Attributes attributes)
render in class RenderedDynamicImageResourcegraphics - The graphics context to render on.attributes - the current request attributestrue 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.RenderedDynamicImageResource#render(java.awt.Graphics2D, Attributes)Copyright © 2006–2021 Apache Software Foundation. All rights reserved.