Class ChatRoomClientGUI

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--ChatRoomClientGUI
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ChatRoomClientGUI
extends javax.swing.JPanel

A ChatRoomClientGUI is a JPanel that displaya the UI of a chat room client

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
static java.lang.String ABOUT_BUTTON
           
static javax.swing.ImageIcon ABOUT_IMAGE
           
static java.lang.String APP_TITLE_STR
           
static java.lang.String AUTHOR_STR
           
static java.lang.String CHAT_ROOM
           
static java.lang.String CHAT_ROOM_CLIENT
           
static java.applet.AudioClip CHAT_SOUND
           
static java.lang.String CHOOSE_COLOR
           
static java.lang.String CLEAR_BUTTON
           
static javax.swing.ImageIcon CLEAR_IMAGE
           
static java.lang.String CLEAR_ROOM_STR
           
static javax.swing.ImageIcon CLIENT_ICON
           
static java.lang.String COLOR_BUTTON
           
static javax.swing.ImageIcon COLOR_IMAGE
           
static java.lang.String COLOR_SELECT_STR
           
static java.lang.String CON_INFO_STR
           
static java.lang.String CONNECT_BUTTON
           
static javax.swing.ImageIcon CONNECT_IMAGE
           
static java.lang.String CONNECT_STR
           
static java.lang.String DEC_FONT_STR
           
static java.lang.String DISCONNECT_BUTTON
           
static javax.swing.ImageIcon DISCONNECT_IMAGE
           
static java.lang.String DISCONNECT_STR
           
static java.lang.String DISPLAY_INFO_STR
           
static java.lang.String ENTER_NAME_STR
           
static java.lang.String EXIT_BUTTON
           
static java.lang.String EXIT_CLIENT_STR
           
static javax.swing.ImageIcon EXIT_IMAGE
           
static java.lang.String INC_FONT_STR
           
static java.lang.String INPUT_MESSAGE
           
static java.lang.String LARGER_BUTTON
           
static javax.swing.ImageIcon MINUS_IMAGE
           
static javax.swing.ImageIcon PLUS_IMAGE
           
static ResourceManager resources
           
static java.lang.String SERVER_REQUEST_STR
           
static java.lang.String SMALLER_BUTTON
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
 
Constructor Summary
ChatRoomClientGUI(ChatRoomClient client)
          Constructs a new ChatRoomClientGUI.
 
Method Summary
 void addMessage(java.lang.String text)
           
protected  void exit()
           
static void main(java.lang.String[] args)
          The Starting point of the application
 void playChatSound()
          Called to play a notification sound when the a user sends a message
 java.lang.String requestUserName()
          Returns the user name as entered by the user
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resources

public static ResourceManager resources

CONNECT_IMAGE

public static final javax.swing.ImageIcon CONNECT_IMAGE

DISCONNECT_IMAGE

public static final javax.swing.ImageIcon DISCONNECT_IMAGE

CLEAR_IMAGE

public static final javax.swing.ImageIcon CLEAR_IMAGE

COLOR_IMAGE

public static final javax.swing.ImageIcon COLOR_IMAGE

PLUS_IMAGE

public static final javax.swing.ImageIcon PLUS_IMAGE

MINUS_IMAGE

public static final javax.swing.ImageIcon MINUS_IMAGE

ABOUT_IMAGE

public static final javax.swing.ImageIcon ABOUT_IMAGE

EXIT_IMAGE

public static final javax.swing.ImageIcon EXIT_IMAGE

CLIENT_ICON

public static final javax.swing.ImageIcon CLIENT_ICON

CHAT_SOUND

public static final java.applet.AudioClip CHAT_SOUND

INPUT_MESSAGE

public static final java.lang.String INPUT_MESSAGE

CHAT_ROOM

public static final java.lang.String CHAT_ROOM

CHAT_ROOM_CLIENT

public static final java.lang.String CHAT_ROOM_CLIENT

CON_INFO_STR

public static final java.lang.String CON_INFO_STR

ENTER_NAME_STR

public static final java.lang.String ENTER_NAME_STR

SERVER_REQUEST_STR

public static final java.lang.String SERVER_REQUEST_STR

EXIT_CLIENT_STR

public static final java.lang.String EXIT_CLIENT_STR

DISPLAY_INFO_STR

public static final java.lang.String DISPLAY_INFO_STR

APP_TITLE_STR

public static final java.lang.String APP_TITLE_STR

AUTHOR_STR

public static final java.lang.String AUTHOR_STR

DEC_FONT_STR

public static final java.lang.String DEC_FONT_STR

INC_FONT_STR

public static final java.lang.String INC_FONT_STR

COLOR_SELECT_STR

public static final java.lang.String COLOR_SELECT_STR

CLEAR_ROOM_STR

public static final java.lang.String CLEAR_ROOM_STR

DISCONNECT_STR

public static final java.lang.String DISCONNECT_STR

CONNECT_STR

public static final java.lang.String CONNECT_STR

CHOOSE_COLOR

public static final java.lang.String CHOOSE_COLOR

CONNECT_BUTTON

public static final java.lang.String CONNECT_BUTTON

DISCONNECT_BUTTON

public static final java.lang.String DISCONNECT_BUTTON

CLEAR_BUTTON

public static final java.lang.String CLEAR_BUTTON

COLOR_BUTTON

public static final java.lang.String COLOR_BUTTON

LARGER_BUTTON

public static final java.lang.String LARGER_BUTTON

SMALLER_BUTTON

public static final java.lang.String SMALLER_BUTTON

ABOUT_BUTTON

public static final java.lang.String ABOUT_BUTTON

EXIT_BUTTON

public static final java.lang.String EXIT_BUTTON
Constructor Detail

ChatRoomClientGUI

public ChatRoomClientGUI(ChatRoomClient client)
Constructs a new ChatRoomClientGUI.

Method Detail

addMessage

public void addMessage(java.lang.String text)

requestUserName

public java.lang.String requestUserName()
Returns the user name as entered by the user


exit

protected void exit()

playChatSound

public void playChatSound()
Called to play a notification sound when the a user sends a message


main

public static void main(java.lang.String[] args)
The Starting point of the application