com.jthomas.mailfaces
Class FaceBoard

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--com.jthomas.mailfaces.FaceBoard
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.lang.Runnable, java.io.Serializable

public class FaceBoard
extends java.awt.Panel
implements java.lang.Runnable

Class to handle the display of a bunch of faces representing Mail senders. This class sets up a panel that will contain a number of Face objects. There is one Face object for each unique domain/user. For each Face object there is a FaceButton. Each FaceButton is an ImageButton can contains the icon for the associated mailmsg objects and when clicked will display the list of those mailmsgs.

Author:
John Thomas MailFaces, Face, FaceButton, FaceFrame, FaceScrollablePanel, Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
 Mailmsg[] getAllMailmsgs()
          Obtain a list of all Mailmsg objects for all Face objects.
 java.awt.Dimension getMinimumSize()
          Calculates the FaceBoard dimensions
 java.awt.Dimension getPreferredSize()
          Calculates the FaceBoard dimensions
 void paint(java.awt.Graphics g)
          paint: This method is called when the system needs to repaint the window.
 void queuePut(java.lang.Object obj)
          queuePut will place the specified object into the FaceBoard Work Queue
 void refreshOptions()
          Method: refreshOptions()
 void run()
          run() watches the queue of GUI related work to do and parcels it out.
 void setup()
          setup Called by applet or application to setup the frame that will contain the face images that represent the mail in the users inbox
 void update(Mailmsg mailmsg)
          Update the FaceBoard so that a new mailmsg is represented It will be represented either by adding a new FaceButton or by adding to the count for an existing FaceButton
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

refreshOptions

public void refreshOptions()
Method: refreshOptions()

Returns:
void Invoked at startup and when user refreshes the Option file

setup

public void setup()
setup Called by applet or application to setup the frame that will contain the face images that represent the mail in the users inbox


paint

public void paint(java.awt.Graphics g)
paint: This method is called when the system needs to repaint the window. including when it has been resized and when we call it ourselves It will recognize when the scrollbar needs to be added or deleted because the user resized the screen or we have added more icons.

Overrides:
paint in class java.awt.Container

run

public void run()
run() watches the queue of GUI related work to do and parcels it out. This will read either Mailmsgs from the queue or special commands If queued object is a Mailmsg, then it is sent to the update method. If the queued object is a RESET command, then the reset method is called. If the queued object is a NOMAIL command, then the nomail method is called.

Specified by:
run in interface java.lang.Runnable
Returns:
void

queuePut

public void queuePut(java.lang.Object obj)
queuePut will place the specified object into the FaceBoard Work Queue


update

public void update(Mailmsg mailmsg)
Update the FaceBoard so that a new mailmsg is represented It will be represented either by adding a new FaceButton or by adding to the count for an existing FaceButton


getAllMailmsgs

public Mailmsg[] getAllMailmsgs()
Obtain a list of all Mailmsg objects for all Face objects.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Calculates the FaceBoard dimensions

Overrides:
getMinimumSize in class java.awt.Container

getPreferredSize

public java.awt.Dimension getPreferredSize()
Calculates the FaceBoard dimensions

Overrides:
getPreferredSize in class java.awt.Container