| Package | org.aswing |
| Interface | public interface Icon extends Decorator |
| Implementors | Arrow, AssetIcon, CloseIcon, ColorRectIcon, DefaultEmptyDecoraterResource, EmptyIcon, MultipleAssetIcon, NoColorIcon, PreviewColorIcon, SimpleButtonIcon, SimpleButtonIconToggle, TreeFolderIcon, TreeLeafIcon |
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).
| Method | Defined by | ||
|---|---|---|---|
![]() |
getDisplay(c:Component):DisplayObject
Returns the display object which is used as the component decorator.
| Decorator | |
|
getIconHeight(c:Component):int
Returns the icon height.
| Icon | ||
|
getIconWidth(c:Component):int
Returuns the icon width.
| Icon | ||
|
Updates the icon.
| Icon | ||
| getIconHeight | () | method |
public function getIconHeight(c:Component):intReturns the icon height.
For same component param, this method must return same value.
Parametersc:Component — the component which owns the icon.
|
int — the height of the icon.
|
| getIconWidth | () | method |
public function getIconWidth(c:Component):intReturuns the icon width.
For same component param, this method must return same value.
Parametersc:Component — the component which owns the icon.
|
int — the width of the icon.
|
| updateIcon | () | method |
public function updateIcon(c:Component, g:Graphics2D, x:int, y:int):voidUpdates the icon.
Parametersc:Component — the component which owns the icon.
|
|
g:Graphics2D — the graphics of the component, you can paint picture onto it.
|
|
x:int — the x coordinates of the icon should be.
|
|
y:int — the y coordinates of the icon should be.
|