caltool.view_ui
Class ItemEditor

java.lang.Object
  extended by mvp.View
      extended by caltool.view_ui.ItemEditor
All Implemented Interfaces:
java.io.Serializable, java.util.Observer

public class ItemEditor
extends mvp.View

Class ItemEditor is a dispatching class for the currently selected item. The update and show methods ask the workspace for the currently selected item, then dispatch to the update and show methods of the appropriate item-editor subclasss, namely one of AppointmentEditor, MeetingEditor, TaskEditor, or EventEditor.

There's no particularly elegant way to avoid the explicit dispatch via dyanic binding, since the dispatch is to view classes, not model classes. In order to use dynamic-binding dispatch from an instance of ScheduledItem, we would have to implement update and show methods in the model classes, which goes against the style of view-ignorant model design we're using.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class mvp.View
closeAdapter, editable, model, screen, shown, widget, window
 
Constructor Summary
ItemEditor(ViewUI viewUI)
           
 
Method Summary
 void show()
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class mvp.View
compose, getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemEditor

public ItemEditor(ViewUI viewUI)
Method Detail

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Overrides:
update in class mvp.View

show

public void show()
Overrides:
show in class mvp.View