edu.ou.mlfw.gui
Class TextBoxShadow

java.lang.Object
  extended by edu.ou.mlfw.gui.Shadow2D
      extended by edu.ou.mlfw.gui.TextBoxShadow

public class TextBoxShadow
extends Shadow2D

Created by IntelliJ IDEA. User: jason Date: Mar 6, 2006 Time: 1:58:33 AM To change this template use File | Settings | File Templates.


Field Summary
 
Fields inherited from class edu.ou.mlfw.gui.Shadow2D
EMPTY_ITER
 
Constructor Summary
TextBoxShadow(int width, int height)
          Initialize the shadow with a bounding box, calculate the halfwidth and halfheight
 
Method Summary
 void cleanUp()
          A convenience method that gets called after all the drawings are complete and the draw position is reset to the real position.
 void draw(java.awt.Graphics2D g)
          The actual drawing routine.
 boolean drawMe()
          Tell the Shadow2DCanvas to draw or not draw this shadow.
 Vector2D getRealPosition()
          JSpacewarComponent uses this method in conjunction with the bounding box information to determine if the graphic needs to be redrawn to account for wrapping.
 void setRealPosition(Vector2D rp)
           
 void setString(java.lang.String str)
           
 
Methods inherited from class edu.ou.mlfw.gui.Shadow2D
getDrawPosition, getHalfHeight, getHalfWidth, getHeight, getWidth, resetDrawPosition, setDrawPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextBoxShadow

public TextBoxShadow(int width,
                     int height)
Initialize the shadow with a bounding box, calculate the halfwidth and halfheight

Parameters:
width - The width of the bounding box.
height - The height of the bounding box.
Method Detail

setRealPosition

public void setRealPosition(Vector2D rp)

setString

public void setString(java.lang.String str)

getRealPosition

public Vector2D getRealPosition()
Description copied from class: Shadow2D
JSpacewarComponent uses this method in conjunction with the bounding box information to determine if the graphic needs to be redrawn to account for wrapping. Real position is the position that resetDrawPosition sets the draw position to.

Specified by:
getRealPosition in class Shadow2D
Returns:
The current "real" center position of the bounding box.

drawMe

public boolean drawMe()
Description copied from class: Shadow2D
Tell the Shadow2DCanvas to draw or not draw this shadow. This does not remove the shadow, it just keeps it from being drawn.

Specified by:
drawMe in class Shadow2D
Returns:
Whether the shadow should be drawn or not.

draw

public void draw(java.awt.Graphics2D g)
Description copied from class: Shadow2D
The actual drawing routine.

Specified by:
draw in class Shadow2D

cleanUp

public void cleanUp()
Description copied from class: Shadow2D
A convenience method that gets called after all the drawings are complete and the draw position is reset to the real position.

Specified by:
cleanUp in class Shadow2D