mWaba.gui.graphics
Class AniImage

java.lang.Object
  |
  +--mWaba.DataValue
        |
        +--mWaba.gui.mImage
              |
              +--mWaba.gui.graphics.AniImage

public class AniImage
extends mImage


Field Summary
 waba.fx.Rect limits
          Gets the bounds of the hot area.
 Mosaic mosaic
           
 
Fields inherited from class mWaba.gui.mImage
CompletelyIn, DrawBorderOnly, drawMode, DrawNotStill, DrawStill, HasBorder, HasChanged, HasMoved, HasPriority, image, InUse, IsEmpty, IsInvisible, IsLocked, IsMoveable, IsNotHot, IsNotStill, IsPrepared, IsPreparing, location, mask, properties
 
Constructor Summary
AniImage()
           
AniImage(java.lang.String image, java.lang.String mask)
           
 
Method Summary
 boolean canGo(Point where)
           
 void change(waba.fx.Image newImage)
          Changes the image.
 void change(waba.fx.Image newImage, waba.fx.Image newMask)
          Changes the image.
 void change(mImage newImage)
           
 void changed()
          Marks the image as having been changed in some way.
 waba.fx.Rect getMovedBounds()
           
 java.lang.Object getNew()
           
 boolean isCompletelyWithin(AniImage other)
          Returns if this AniImage is completely within the other AniImage.
 boolean isTouching(AniImage other)
          Returns if this AniImage is touching the other AniImage.
 boolean isWithin(AniImage other)
          Returns if this AniImage is "within" the other AniImage - where "within" is "touching" if CompletelyIn property is not set, otherwise it is "isCompletelyWithin".
 void move(int x, int y)
          Moves the image.
 void refresh()
           
 void resize(int width, int height)
          Resize the image.
 void setLocation(int x, int y)
          This resets the location of the image.
 void translate(int dx, int dy)
          Translates the image.
 void updated()
          Marks the image as not having been changed.
 
Methods inherited from class mWaba.gui.mImage
copyFrom, doDraw, draw, draw, drawBorder, getDim, getHotArea, imageSet, invert, onHotArea, setImage, setImage, setImage, setImage
 
Methods inherited from class mWaba.DataValue
getCopy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

limits

public waba.fx.Rect limits
Gets the bounds of the hot area.

mosaic

public Mosaic mosaic
Constructor Detail

AniImage

public AniImage()

AniImage

public AniImage(java.lang.String image,
                java.lang.String mask)
Method Detail

getNew

public java.lang.Object getNew()
Overrides:
getNew in class mImage

canGo

public boolean canGo(Point where)

isTouching

public boolean isTouching(AniImage other)
Returns if this AniImage is touching the other AniImage.

isCompletelyWithin

public final boolean isCompletelyWithin(AniImage other)
Returns if this AniImage is completely within the other AniImage.

isWithin

public final boolean isWithin(AniImage other)
Returns if this AniImage is "within" the other AniImage - where "within" is "touching" if CompletelyIn property is not set, otherwise it is "isCompletelyWithin".

changed

public void changed()
Marks the image as having been changed in some way. This will cause the image to be refreshed when calling updateImage()/updateImages()

updated

public void updated()
Marks the image as not having been changed.

move

public void move(int x,
                 int y)
Moves the image. If the new location is different to the current location then the HasMoved bit in properties will be set. It will NOT clear this bit if the image actually has not moved. This bit must be cleared manually.

change

public void change(waba.fx.Image newImage)
Changes the image. If it has changed then HasChanged will be set in the properties. If it has not changed there is no effect on this bit.

change

public void change(waba.fx.Image newImage,
                   waba.fx.Image newMask)
Changes the image. If it has changed then HasChanged will be set in the properties. If it has not changed there is no effect on this bit.

change

public void change(mImage newImage)

resize

public void resize(int width,
                   int height)
Resize the image. Do not do this while the image is being displayed. It should be used before adding the image to the mosaic if for example the image is a buffer which is larger than actually needed.

translate

public void translate(int dx,
                      int dy)
Translates the image. The variable previous will hold a list of the locations of the image before it was moved. If the new location is different to the current location then the HasMoved bit in properties will be set. It will NOT clear this bit if the image actually has not moved. This bit must be cleared manually.

setLocation

public void setLocation(int x,
                        int y)
This resets the location of the image. The HasMoved bit in properties will be cleared.

getMovedBounds

public waba.fx.Rect getMovedBounds()

refresh

public void refresh()