rolodex
Class ErrorMessageDialog

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

public class ErrorMessageDialog
extends mvp.View

Class ErrorMessageDialog contains labels displaying up to five error messages.

See Also:
Serialized Form

Field Summary
protected  javax.swing.JLabel[] labels
          The list of labels for displaying error messages.
protected static int NUM_MESSAGES
          Max number of error messages.
protected  javax.swing.Box outer_box
          Horizontal box for holding all of the components
protected  RolodexMenuUI rmui
          The grandparent view
protected static int VERTICAL_SPACING
          Size of vertical spacing between UI elements (in pixels)
 
Fields inherited from class mvp.View
closeAdapter, editable, model, screen, shown, widget, window
 
Constructor Summary
ErrorMessageDialog(RolodexMenuUI rumi)
          Construct this with the given grandparent view, which is used restore the pre-error display area when the user presses OK in the error dialog.
 
Method Summary
 void clearMessages()
          Clear out all messages.
 java.awt.Component compose()
          Compose this by inserting the five labes in a vertical box with some spacing in between.
 void setMessage(java.lang.String sl)
          Single-message overload of setMessages(StringList)), q.v.
protected  void setMessage(java.lang.String s, int pos)
          Put the given string into the label at the given position.
 void setMessages(StringList sl)
          Put the given elements of the given string list into the label(s), in the same order as they appear in the list.
 
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

outer_box

protected javax.swing.Box outer_box
Horizontal box for holding all of the components


rmui

protected RolodexMenuUI rmui
The grandparent view


NUM_MESSAGES

protected static final int NUM_MESSAGES
Max number of error messages.

See Also:
Constant Field Values

VERTICAL_SPACING

protected static final int VERTICAL_SPACING
Size of vertical spacing between UI elements (in pixels)

See Also:
Constant Field Values

labels

protected javax.swing.JLabel[] labels
The list of labels for displaying error messages.

Constructor Detail

ErrorMessageDialog

public ErrorMessageDialog(RolodexMenuUI rumi)
Construct this with the given grandparent view, which is used restore the pre-error display area when the user presses OK in the error dialog.

Method Detail

compose

public java.awt.Component compose()
Compose this by inserting the five labes in a vertical box with some spacing in between.

Overrides:
compose in class mvp.View

clearMessages

public void clearMessages()
Clear out all messages.


setMessages

public void setMessages(StringList sl)
Put the given elements of the given string list into the label(s), in the same order as they appear in the list.


setMessage

public void setMessage(java.lang.String sl)
Single-message overload of setMessages(StringList)), q.v.


setMessage

protected void setMessage(java.lang.String s,
                          int pos)
Put the given string into the label at the given position. Used by setMessages(StringList) and setMessages(String).