Here's my problem. I've got a somewhat complex domain object, which, based on its condition, responds to particular actions. I believe the condition pattern is virtually the answer for your. However, I have to display which actions are possible at any time within the UI.
Ex: The domain object is definitely an audio player. Some tunes can not be missed (like advertisements), so I have to disable the "next" and "previous" buttons within the GUI therefore the user possess some type of feedback which action he is able to execute.
I have checked out Swing's Action class (note: this isn't a Java project), however i think I will have to keep every Actions during my domain object class (audio player), therefore it can enable or disable them depending by itself condition (thus, affecting the UI).
Could it be the best way to get it done?
The way in which I'd do that in C#-winforms is as simple as binding the Enabled property from the control with a property in the industry object. Control.DataBinding.Add("Enabled", , "property of BO")