org.tbee.swing
Class CyclingBorders

java.lang.Object
  extended by org.tbee.swing.CyclingBorders

public class CyclingBorders
extends java.lang.Object

Create a shadowed (bottom right) border. Preferable use the static createBorder methods because of the FlyWeight pattern.

Version:
$Revision: 1.13 $

Field Summary
static java.lang.String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
static javax.swing.border.Border TRANSPARENT_LINE_1
           
 
Constructor Summary
CyclingBorders(javax.swing.JComponent component, javax.swing.border.Border[] borders, int delay, int duration)
           
 
Method Summary
static CyclingBorders alert(javax.swing.JComponent component, java.awt.Color color)
          Flashing border
static CyclingBorders alert(javax.swing.JComponent component, java.awt.Color color, int duration)
          Flashing border for a fixed amount of time, ending with the transparent border
static CyclingBorders alert2(javax.swing.JComponent component, java.awt.Color color, int duration)
          Flashing border for a fixed amount of time, ending with the alert color
 javax.swing.border.Border[] getBorders()
           
 int getDelay()
           
 int getDuration()
           
 javax.swing.JComponent getJComponent()
           
static void main(java.lang.String[] args)
           
 void setBorders(javax.swing.border.Border[] borders)
          the borders to cycle through
 void setDelay(int delay)
          delay between cycles in milliseconds
 void setDuration(int delay)
          how long should the animation run (0 = forever)
 void setJComponent(javax.swing.JComponent component)
          the component to cycle through
 CyclingBorders start()
          Start the animation
 CyclingBorders stop()
          Stop the animation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final java.lang.String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values

TRANSPARENT_LINE_1

public static javax.swing.border.Border TRANSPARENT_LINE_1
Constructor Detail

CyclingBorders

public CyclingBorders(javax.swing.JComponent component,
                      javax.swing.border.Border[] borders,
                      int delay,
                      int duration)
Method Detail

setJComponent

public void setJComponent(javax.swing.JComponent component)
the component to cycle through


getJComponent

public javax.swing.JComponent getJComponent()

setBorders

public void setBorders(javax.swing.border.Border[] borders)
the borders to cycle through


getBorders

public javax.swing.border.Border[] getBorders()

setDelay

public void setDelay(int delay)
delay between cycles in milliseconds


getDelay

public int getDelay()

setDuration

public void setDuration(int delay)
how long should the animation run (0 = forever)


getDuration

public int getDuration()

start

public CyclingBorders start()
Start the animation


stop

public CyclingBorders stop()
Stop the animation


alert

public static CyclingBorders alert(javax.swing.JComponent component,
                                   java.awt.Color color)
Flashing border

Parameters:
component -
Returns:

alert

public static CyclingBorders alert(javax.swing.JComponent component,
                                   java.awt.Color color,
                                   int duration)
Flashing border for a fixed amount of time, ending with the transparent border

Parameters:
component -
Returns:

alert2

public static CyclingBorders alert2(javax.swing.JComponent component,
                                    java.awt.Color color,
                                    int duration)
Flashing border for a fixed amount of time, ending with the alert color

Parameters:
component -
Returns:

main

public static void main(java.lang.String[] args)


Copyright © 2010 KnowledgePlaza. All Rights Reserved.