ewe.fx
Class DisabledIcon

java.lang.Object
  extended byewe.fx.mImage
      extended byewe.fx.DisabledIcon
All Implemented Interfaces:
ByteEncodable, IImage, OnScreenImage

public class DisabledIcon
extends mImage

This is a mImage that displays one of two images (the normal and disabled image) depending on whether it is asked to draw the image in normal or Disabled mode. Disabled mode is selected when a draw() method call is done with the DISABLED option selected. A normal mImage would display a grayed version of the image when disabled, but this mImage will display the disabled image instead.


Field Summary
 IImage disabled
          The image to display when disabled.
 boolean dontFreeImages
          If this is true then a call to free() will not free the supplied normal and disabled images, but it will still call super.free().
 IImage normal
          The image to display normally.
 
Fields inherited from class ewe.fx.mImage
AlwaysOnTop, backgroundColor, bitmask, CompletelyIn, drawable, drawMode, HasBorder, HasChanged, HasMoved, hotArea, hotPolygon, image, imageMayChange, InUse, IsAnimated, IsEmpty, IsInvisible, IsLocked, IsMoveable, IsNotHot, IsNotStill, IsPrepared, IsPreparing, KeepOnScreen, lastDrawn, location, mask, MouseMustBeOver, properties, RelativeToOrigin, sourceImage, sourceMask, transparentColor
 
Fields inherited from interface ewe.fx.IImage
DISABLED, OUTLINED
 
Constructor Summary
DisabledIcon(IImage normal, IImage disabled)
           
 
Method Summary
 void doDraw(Graphics g, int options)
          Bottom level draw.
 void free()
          This frees system resources associated with the Image.
 int getHeight()
          This returns the height of the normal image.
 int getWidth()
          This returns the width of the normal image.
 
Methods inherited from class ewe.fx.mImage
changeRefresher, compareTo, copyFrom, decodeBytes, draw, draw, drawBorder, drawn, encodeBytes, fixColors, freeIfNotOriginal, freeSource, getBackground, getBrokenImage, getCopy, getDefaultImage, getDim, getFullCopy, getHotArea, getLocation, getNew, getPixels, getRefresher, getSize, getUnknownImage, getUnusedColor, imageSet, makeOpaqueHotArea, onHotArea, refresh, scale, setHotAreaInImage, setImage, setImage, setImage, setImage, setImage, setImage, setImage, setMImage, setRefresher, toAlphaImage, toCursor, toString, usesAlpha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 

Field Detail

normal

public IImage normal
The image to display normally.


disabled

public IImage disabled
The image to display when disabled.


dontFreeImages

public boolean dontFreeImages
If this is true then a call to free() will not free the supplied normal and disabled images, but it will still call super.free().

Constructor Detail

DisabledIcon

public DisabledIcon(IImage normal,
                    IImage disabled)
Parameters:
normal - The image to display normally.
disabled - The image to display when disabled.
Method Detail

doDraw

public void doDraw(Graphics g,
                   int options)
Description copied from class: mImage
Bottom level draw. Override to change how the image is drawn. Will still allow borders to be drawn and allow invisible to have effect.

Overrides:
doDraw in class mImage

getWidth

public int getWidth()
This returns the width of the normal image.

Specified by:
getWidth in interface IImage
Overrides:
getWidth in class mImage

getHeight

public int getHeight()
This returns the height of the normal image.

Specified by:
getHeight in interface IImage
Overrides:
getHeight in class mImage

free

public void free()
Description copied from interface: IImage
This frees system resources associated with the Image.

Specified by:
free in interface IImage
Overrides:
free in class mImage