public class JadiceBackgroundIcon extends Object implements Icon
Use the paint-Method to paint the image.
Constructor and Description |
---|
JadiceBackgroundIcon()
Creates a new JadiceBackgroundIcon with default parameters
|
JadiceBackgroundIcon(Color centerColor,
Color leftColor,
Color rightColor,
Dimension desiredSize)
Full constructor - colors and desired size of the icons can be modified.
|
JadiceBackgroundIcon(Dimension desiredSize)
Creates a new JadiceBackgroundIcon with the given desired size.
|
JadiceBackgroundIcon(int width,
int height)
Creates a new JadiceBackgroundIcon with the given desired size.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
int |
getOrigHeight()
Returns the height of the bounding box of the original SVG image.
|
int |
getOrigWidth()
Returns the width of the bounding box of the original SVG image.
|
int |
getOrigX()
Returns the X of the bounding box of the original SVG image.
|
int |
getOrigY()
Returns the Y of the bounding box of the original SVG image.
|
void |
paint(Graphics2D g,
Dimension areaSize)
Paints the icon on the given Graphics2D with a maximum of 80% of the given Dimension.
|
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
void |
setDesiredSize(Dimension desiredSize)
Sets the desired size of this icon.
|
public JadiceBackgroundIcon()
public JadiceBackgroundIcon(int width, int height)
width
- - desired widthheight
- - desired heightpublic JadiceBackgroundIcon(Dimension desiredSize)
desiredSize
- - the desired sizepublic JadiceBackgroundIcon(Color centerColor, Color leftColor, Color rightColor, Dimension desiredSize)
centerColor
- - the center color (the "inside" of the letters)leftColor
- - the color on the left side of a letter (shadow edge)rightColor
- - the color on the left side of a letter (light edge)desiredSize
- - the desired size of the image, if null the default will be used (original size)public void paint(Graphics2D g, Dimension areaSize)
g
- - graphicsareaSize
- - area sizepublic int getOrigX()
public int getOrigY()
public int getOrigWidth()
public int getOrigHeight()
public int getIconWidth()
getIconWidth
in interface Icon
public int getIconHeight()
getIconHeight
in interface Icon
public void setDesiredSize(Dimension desiredSize)
desiredSize
- - the desired sizeCopyright © 2024 levigo holding gmbh. All rights reserved.