net.java.balloontip.styles
Class BalloonTipStyle

java.lang.Object
  extended by net.java.balloontip.styles.BalloonTipStyle
All Implemented Interfaces:
javax.swing.border.Border
Direct Known Subclasses:
EdgedBalloonStyle, IsometricBalloonStyle, MinimalBalloonStyle, ModernBalloonStyle, RoundedBalloonStyle, TexturedBalloonStyle, ToolTipBalloonStyle

public abstract class BalloonTipStyle
extends java.lang.Object
implements javax.swing.border.Border

A balloon tip style defines what a balloon tip should look like

Author:
Tim Molderez

Field Summary
protected  boolean flipX
           
protected  boolean flipY
           
protected  int horizontalOffset
           
protected  int verticalOffset
           
 
Constructor Summary
BalloonTipStyle()
           
 
Method Summary
 void flip(boolean flipX, boolean flipY)
          Which mirror effect should be applied to the balloon tip
 void flipX(boolean flipX)
          Flip around the vertical axis
 void flipY(boolean flipY)
          Flip around the horizontal axis
abstract  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 setHorizontalOffset(int px)
          Sets a new value for the horizontal offset.
 void setVerticalOffset(int px)
          Sets a new value for the vertical offset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.border.Border
paintBorder
 

Field Detail

horizontalOffset

protected int horizontalOffset

verticalOffset

protected int verticalOffset

flipX

protected boolean flipX

flipY

protected boolean flipY
Constructor Detail

BalloonTipStyle

public BalloonTipStyle()
Method Detail

setHorizontalOffset

public void setHorizontalOffset(int px)
Sets a new value for the horizontal offset.

Parameters:
px - horizontal offset (in pixels)

setVerticalOffset

public void setVerticalOffset(int px)
Sets a new value for the vertical offset.

Parameters:
px - horizontal offset (in pixels)

getMinimalHorizontalOffset

public int getMinimalHorizontalOffset()
Get the minimum value of the horizontal offset (Also useful as a maximum; maximum horizontaloffset = balloon tip width - minimum horizontal offset)

Returns:
Minimul horizontal offset

flipX

public void flipX(boolean flipX)
Flip around the vertical axis

Parameters:
flipX - if true, the balloon tip is flipped horizontally

flipY

public void flipY(boolean flipY)
Flip around the horizontal axis

Parameters:
flipY - if true, the balloon tip is flipped vertically

flip

public void flip(boolean flipX,
                 boolean flipY)
Which mirror effect should be applied to the balloon tip

Parameters:
flipX - if true, the balloon tip is flipped horizontally
flipY - if true, the balloon tip is flipped vertically

isBorderOpaque

public boolean isBorderOpaque()
Is this balloon tip opaque?

Specified by:
isBorderOpaque in interface javax.swing.border.Border
Returns:
True if opaque, false if the border uses transparency

getBorderInsets

public abstract java.awt.Insets getBorderInsets(java.awt.Component c)
Retrieve the balloon tip's border insets

Specified by:
getBorderInsets in interface javax.swing.border.Border
Returns:
The balloon tip's border insets


http://balloontip.java.net/