In the inventory demo each item slot is a widget. It has it's own AnimationState which uses the following states (in that demo):
"dragActive" - that item is currently being dragged around
"dropOk" - the currently dragged item can be dropped in this slot
"dropBlocked" - the currently dragged item can NOT be dropped in this slot
You can add as many animation states as you want. It is common to declare them as public private final fields at the top of the class
which uses them.
And the AnimationState is also used for drawing the icons in paintWidget
But the icons in the demo theme do not check for any states.
The application/widgets should expose as much state as possible to give the theme designer maximum flexibility.