com.jmex.bui.icon
Class ImageIcon

java.lang.Object
  extended by com.jmex.bui.icon.BIcon
      extended by com.jmex.bui.icon.ImageIcon

public class ImageIcon
extends BIcon

Displays an image as an icon.


Field Summary
protected  BImage _image
           
 
Constructor Summary
ImageIcon(BImage image)
          Creates an icon from the supplied source image.
ImageIcon(Icon icon)
          Converts the supplied AWT icon into a BUI icon.
 
Method Summary
 int getHeight()
          Returns the height of this icon.
 int getWidth()
          Returns the width of this icon.
 void render(Renderer renderer, int x, int y, float alpha)
          Renders this icon.
 void wasAdded()
          Called when the component that contains this icon is was added to the interface hierarchy.
 void wasRemoved()
          Called when the component that contains this icon is no longer part of a user interface hierarchy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_image

protected BImage _image
Constructor Detail

ImageIcon

public ImageIcon(BImage image)
Creates an icon from the supplied source image.


ImageIcon

public ImageIcon(Icon icon)
Converts the supplied AWT icon into a BUI icon.

Method Detail

getWidth

public int getWidth()
Description copied from class: BIcon
Returns the width of this icon.

Specified by:
getWidth in class BIcon

getHeight

public int getHeight()
Description copied from class: BIcon
Returns the height of this icon.

Specified by:
getHeight in class BIcon

wasAdded

public void wasAdded()
Description copied from class: BIcon
Called when the component that contains this icon is was added to the interface hierarchy.

Overrides:
wasAdded in class BIcon

wasRemoved

public void wasRemoved()
Description copied from class: BIcon
Called when the component that contains this icon is no longer part of a user interface hierarchy.

Overrides:
wasRemoved in class BIcon

render

public void render(Renderer renderer,
                   int x,
                   int y,
                   float alpha)
Description copied from class: BIcon
Renders this icon.

Overrides:
render in class BIcon


Copyright © 2008 Michael Bayne. All Rights Reserved.