The above code sets the cursor to a waiting cursor and sets it back to whatever it was after the code finishes. The good thing is that you don’t have to worry about the code in the try block at all. There could be exceptions happening or return statements, the finally block will be called before the execution continues.
Enums are a quite handy feature. That is, if you don’t get into the Tool Blame trap. In a sane scenario Enums are very useful. Gone are the days where you had to pass cryptic integer values to methods only to get nothing better in return. One really nice feature when using enums, is that you can decide that elements of an enumeration can be combined.