|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mvp.View | +--rolodex.RolodexTextEditor
Class RolodexTextEditor is a purely textual view of the Rolodex model class. It presents a UNIX-like (Notepad-like) plain text editor in which the textual version of the complete rolodex is displayed and may be edited in a restricted fashion. The RolodexTextEditor window is a java JTextArea.
It is noteworthy this textual rolodex view uses exactly the same Rolodex model API as the GUI rolodex view in RolodexMenuUI.
It is also noteworthy that this view is an observer of its companion Rolodex model. This means that this' update method will be called whenever the Rolodex has changed. The determination of when the model object has actually changed is made by the model itself, when it calls the setChanged method. In the Rolodex Model, setChanged is called in Rolodex.add , Rolodex.delete , and Rolodex.change, q.q.v. The determination of when to notify observers is made in View objects that call Model objects that may (potentially) change the model. In the Rolodex Tool, notifying View classes are the button listeners that confirm one of the Rolodex changing operations, viz., OKAddButtonListener.actionPerformed, OKDeleteButtonListener.actionPerformed, and OKChangeButtonListener.actionPerformed, q.q.v.
Field Summary | |
protected javax.swing.JTextArea |
jta
The representation of this is a JTextArea. |
protected RolodexMultiViewMenuUI |
rmui
The grandparent view. |
Fields inherited from class mvp.View |
closeAdapter, editable, model, screen, shown, widget, window |
Constructor Summary | |
RolodexTextEditor(mvp.Screen s,
RolodexMultiViewMenuUI rmui,
Rolodex r)
Construct this with the given Screen, RolodexMultiViewMenuUI grandparent view, and Rolodex model. |
Method Summary | |
java.awt.Component |
compose()
Compose the window of this by adding the JTextArea and commit button. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Respond to a change in the companion model. |
Methods inherited from class mvp.View |
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show, show |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.JTextArea jta
protected RolodexMultiViewMenuUI rmui
Constructor Detail |
public RolodexTextEditor(mvp.Screen s, RolodexMultiViewMenuUI rmui, Rolodex r)
Method Detail |
public java.awt.Component compose()
compose
in class mvp.View
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
update
in class mvp.View
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |