net.java.balloontip.styles
Class TexturedBalloonStyle
java.lang.Object
net.java.balloontip.styles.BalloonTipStyle
net.java.balloontip.styles.TexturedBalloonStyle
- All Implemented Interfaces:
- javax.swing.border.Border
public class TexturedBalloonStyle
- extends BalloonTipStyle
A balloon tip with rounded corners and an image as background
- Author:
- Tim Molderez
Constructor Summary |
TexturedBalloonStyle(int arcWidth,
int arcHeight,
java.net.URL background,
java.awt.Color borderColor)
Constructor |
Method Summary |
java.awt.Insets |
getBorderInsets(java.awt.Component c)
Retrieve the balloon tip's border insets |
int |
getMinimalHorizontalOffset()
Get the minimum value of the horizontal offset
(Also useful as a maximum; maximum horizontaloffset = balloon tip width - minimum horizontal offset) |
boolean |
isBorderOpaque()
Is this balloon tip opaque? |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TexturedBalloonStyle
public TexturedBalloonStyle(int arcWidth,
int arcHeight,
java.net.URL background,
java.awt.Color borderColor)
throws java.io.IOException
- Constructor
- Parameters:
arcWidth
- width of the rounded cornerarcHeight
- height of the rounded cornerbackground
- the background image that's used (it's used as a pattern, so the image will repeat...)borderColor
- line color
- Throws:
java.io.IOException
- in case something went wrong when opening the background image
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Description copied from class:
BalloonTipStyle
- Retrieve the balloon tip's border insets
- Specified by:
getBorderInsets
in interface javax.swing.border.Border
- Specified by:
getBorderInsets
in class BalloonTipStyle
- Returns:
- The balloon tip's border insets
isBorderOpaque
public boolean isBorderOpaque()
- Description copied from class:
BalloonTipStyle
- Is this balloon tip opaque?
- Specified by:
isBorderOpaque
in interface javax.swing.border.Border
- Overrides:
isBorderOpaque
in class BalloonTipStyle
- Returns:
- True if opaque, false if the border uses transparency
paintBorder
public void paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
getMinimalHorizontalOffset
public int getMinimalHorizontalOffset()
- Description copied from class:
BalloonTipStyle
- Get the minimum value of the horizontal offset
(Also useful as a maximum; maximum horizontaloffset = balloon tip width - minimum horizontal offset)
- Overrides:
getMinimalHorizontalOffset
in class BalloonTipStyle
- Returns:
- Minimul horizontal offset
http://balloontip.java.net/