edu.gatech.cs2335.lemmings.gui
Class LFader

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.gui.LComponent
      extended byedu.gatech.cs2335.lemmings.gui.LLeafComponent
          extended byedu.gatech.cs2335.lemmings.gui.LColoredComponent
              extended byedu.gatech.cs2335.lemmings.gui.LFader

public class LFader
extends LColoredComponent

Class LFader: This little widget allows one to fade the screen to a certain color in different kinds of cool ways.

 Revision History:
     v1.0 (Apr. 15, 2004) - Created the LFader class
 

Version:
Version 1.0, Apr. 15, 2004
Author:
Vladimir Urazov

Field Summary
 
Fields inherited from class edu.gatech.cs2335.lemmings.gui.LColoredComponent
DEFAULT_BACKGROUND_COLOR, DEFAULT_FOREGROUND_COLOR
 
Constructor Summary
LFader()
          Creates a new LFader instance.
 
Method Summary
protected  void copy(LComponent component)
          Deep-copies self into the component passed in.
 void fadeToForeground(long time)
          Fades to foreground in the time specified.
 long getTimeRemaining()
          Describe getTimeRemaining method here.
 boolean isFading()
          Returns true if we are currently fading.
protected  boolean paint(java.awt.Graphics g)
          Performs all of the necessary drawing for this control only.
protected  void resetFade()
          Resets the fading to the original configuration.
protected  void update(float progress)
          Updates the fading.
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LColoredComponent
getBackground, getForeground, setBackground, setBackground, setForeground, setForeground
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LLeafComponent
makeDirty, move, renderAll
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LComponent
bringToTop, cleanUp, getBounds, getParent, initialize, isActive, isComponentDirty, isShown, setBounds, setDirty, setParent, setPosition, setShown, setSize, setSize, updateDimensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LFader

public LFader()
Creates a new LFader instance.

Method Detail

fadeToForeground

public void fadeToForeground(long time)
Fades to foreground in the time specified.

Parameters:
time - a long value

isFading

public boolean isFading()
Returns true if we are currently fading.

Returns:
a boolean value

getTimeRemaining

public long getTimeRemaining()
Describe getTimeRemaining method here.

Returns:
a long value

update

protected void update(float progress)
Updates the fading.

Parameters:
progress - the percent to completion.

resetFade

protected void resetFade()
Resets the fading to the original configuration.


copy

protected void copy(LComponent component)
Deep-copies self into the component passed in.

Specified by:
copy in class LComponent
Parameters:
component - a LComponent value

paint

protected boolean paint(java.awt.Graphics g)
Performs all of the necessary drawing for this control only. The children will be taken care of separately. This method need not concern itself with them.

Specified by:
paint in class LComponent
Parameters:
g - a Graphics value
Returns:
a boolean value