rolodex
Class ConfirmChangeDialog

java.lang.Object
  |
  +--mvp.View
        |
        +--rolodex.AddCardDialog
              |
              +--rolodex.ConfirmChangeDialog
All Implemented Interfaces:
java.util.Observer, java.io.Serializable

public class ConfirmChangeDialog
extends AddCardDialog

Class ChangeCardDialog is a view for displaying a selected card to be changed. Since it is very similar in content to the dialog for adding a new card, ChangeCardDialog extends AddCardDialog, q.v. The differences in the change vs add dialogs are the message at the top of the dialog, and the use of ChangeCardButtons instead of AddCardButtons. The OK button listener in ChangeCardButtons calls Rolodex.change instead of Rolodex.add.

See Also:
Serialized Form

Field Summary
protected  ConfirmChangeButtons ccb
          Subview containing add card buttons OK, Clear, and Cancel
protected  Id id
          Id of card to changed entered by user.
 
Fields inherited from class rolodex.AddCardDialog
acb, addr_jtf, age_jtf, fields_box, id_jtf, labeled_fields_box, labels_box, name_jtf, outer_box, sex_jtf, TEXT_FIELD_WIDTH, VERTICAL_SPACING
 
Fields inherited from class mvp.View
closeAdapter, editable, model, screen, shown, widget, window
 
Constructor Summary
ConfirmChangeDialog(Rolodex r, RolodexMenuUI rmui)
           
 
Method Summary
 java.awt.Component compose()
          Compose this simply by calling the parent compose changing the message label at the top of the dialog.
 Id getOriginalId()
          Return the id of the card to be changed.
 void showCardAndSaveId(Card c, Id id)
          Display the card selected by the user for changing.
 
Methods inherited from class rolodex.AddCardDialog
addLabel, clear, composeLabels, composePair, composeTextFields, getAddr, getAge, getId, getName, getSex
 
Methods inherited from class mvp.View
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setExitOnClose, setModel, show, show, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Id id
Id of card to changed entered by user.


ccb

protected ConfirmChangeButtons ccb
Subview containing add card buttons OK, Clear, and Cancel

Constructor Detail

ConfirmChangeDialog

public ConfirmChangeDialog(Rolodex r,
                           RolodexMenuUI rmui)
Method Detail

compose

public java.awt.Component compose()
Compose this simply by calling the parent compose changing the message label at the top of the dialog.

Overrides:
compose in class AddCardDialog

showCardAndSaveId

public void showCardAndSaveId(Card c,
                              Id id)
Display the card selected by the user for changing. Also, save the card id entered by the user in the change card dialog. This id value will be used subsequently by OKConfirmChangeButtonListener.actionPerformed, q.v.


getOriginalId

public Id getOriginalId()
Return the id of the card to be changed. This is the original card id entered by the user in the change card dialog.