bibliothek.extension.gui.dock.theme.bubble
Class BubbleColorAnimation.Entry

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.bubble.BubbleColorAnimation.Entry
Enclosing class:
BubbleColorAnimation

private class BubbleColorAnimation.Entry
extends java.lang.Object

One pair of colors.

Author:
Benjamin Sigg

Field Summary
private  int age
          The age of the current transition from source to destination
private  java.lang.String destination
          Key of the color to which the animation runs
private  java.awt.Color intermediate
          Replacement of source for special circumstances
private  java.lang.String source
          Key of the color which is abandoned by the animation
 
Constructor Summary
private BubbleColorAnimation.Entry()
           
 
Method Summary
 java.awt.Color getColor()
          Gets the current color represented by this pair.
 void setColors(java.lang.String source, java.lang.String destination)
          Replaces source and destination color immediately
 void setDestination(java.lang.String color)
          Sets all properties such that an animation from the current color to color can happen.
 boolean step(int delta)
          Makes another step of the animation towards destination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

private java.lang.String source
Key of the color which is abandoned by the animation


destination

private java.lang.String destination
Key of the color to which the animation runs


intermediate

private java.awt.Color intermediate
Replacement of source for special circumstances


age

private int age
The age of the current transition from source to destination

Constructor Detail

BubbleColorAnimation.Entry

private BubbleColorAnimation.Entry()
Method Detail

getColor

public java.awt.Color getColor()
Gets the current color represented by this pair.

Returns:
the color

step

public boolean step(int delta)
Makes another step of the animation towards destination.

Parameters:
delta - the time passed since the last call in milliseconds
Returns:
true if the animation is still running, false if the animation is finished

setColors

public void setColors(java.lang.String source,
                      java.lang.String destination)
Replaces source and destination color immediately

Parameters:
source - the new source
destination - the new destination

setDestination

public void setDestination(java.lang.String color)
Sets all properties such that an animation from the current color to color can happen.

Parameters:
color - the new destination