interface org.aswing.Icon extends Decorator

A small fixed size picture, typically used to decorate components.

You can either return a display object to be the icon or just return null and paint the picture in updateIcon method use the component g(Graphics).

But, you'd better to return a display object here, because if you just paint graphics to the target component graphics, there's a situation that your painted graphics maybe not eyeable, that is when the component has a background decorator with a display object, it will cover this graphics. If you return a display object here, it will be no problem of this case.

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from Decorator

function getDisplay(c:Component):DisplayObject

function getIconHeight(c:Component): Int

Returns the icon height.

For same component param, this method must return same value.

c

the component which owns the icon.

returns

the height of the icon.

function getIconWidth(c:Component): Int

Returuns the icon width.

For same component param, this method must return same value.

c

the component which owns the icon.

returns

the width of the icon.

function updateIcon(c:Component, g:Graphics2D, x:Int, y:Int): Void

Updates the icon.

c

the component which owns the icon.

g

the graphics of the component, you can paint picture onto it.

x

the x coordinates of the icon should be.

y

the y coordinates of the icon should be.