edu.gatech.cs2335.lemmings.gui
Class LIcon

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

public final class LIcon
extends LLeafComponent

Class LIcon: This class will display an image.

 Revision History:
     v1.0 (Mar. 14, 2004) - Created the LIcon class
 

Version:
Version 1.0, Mar. 14, 2004
Author:
Vladimir Urazov

Constructor Summary
LIcon()
          Creates a new LIcon instance.
LIcon(TileSet set)
          Creates a new LIcon instance.
 
Method Summary
protected  void copy(LComponent component)
          Deep-copies self into the component passed in.
 AnimatedSprite getAnimation()
          Returns the animation associated with this icon.
 Looping getLoopingMode()
          Returns the looping mode used by this animation.
protected  boolean paint(java.awt.Graphics g)
          Performs all of the necessary drawing for this control only.
 void setAnimation(AnimatedSprite newSprite)
          Sets up a new icon image.
 void setLoopingMode(Looping mode)
          Sets up a new looping mode for this icon.
 
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

LIcon

public LIcon()
Creates a new LIcon instance.


LIcon

public LIcon(TileSet set)
Creates a new LIcon instance.

Parameters:
set - set
Method Detail

getAnimation

public AnimatedSprite getAnimation()
Returns the animation associated with this icon.

Returns:
an AnimatedSprite value

setAnimation

public void setAnimation(AnimatedSprite newSprite)
Sets up a new icon image.

Parameters:
newSprite - an AnimatedSprite value

getLoopingMode

public Looping getLoopingMode()
Returns the looping mode used by this animation.

Returns:
a Looping value

setLoopingMode

public void setLoopingMode(Looping mode)
Sets up a new looping mode for this icon.

Parameters:
mode - a Looping value

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