xinca.components
Class XChat

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--xinca.components.XChat
All Implemented Interfaces:
javax.accessibility.Accessible, edu.gatech.coc.inca.arch.module.Accessor, edu.gatech.coc.inca.arch.constants.AttributeConstants, edu.gatech.coc.inca.arch.module.Capturer, Constants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class XChat
extends javax.swing.JPanel
implements edu.gatech.coc.inca.arch.module.Capturer, edu.gatech.coc.inca.arch.module.Accessor, Constants

The xINCA xChat component - a text message exchange system.

Copyright (c) 2002 ICMC-USP.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

Since:
JDK1.4
Author:
Renan Gonçalves Cattelan
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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 edu.gatech.coc.inca.arch.constants.AttributeConstants
ATTRIBUTE_NAME__APPLICATION, ATTRIBUTE_NAME__APPLICATION_EVENT, ATTRIBUTE_NAME__CONTEXT_TYPE, ATTRIBUTE_NAME__DATA_TYPE, ATTRIBUTE_NAME__EVENT, ATTRIBUTE_NAME__LOCATION, ATTRIBUTE_NAME__PERSON, ATTRIBUTE_NAME__TIMESTAMP, ATTRIBUTE_VALUE__AUDIO_DATA, ATTRIBUTE_VALUE__PEOPLE_PRESENT_CONTEXT, ATTRIBUTE_VALUE__VIDEO_DATA
 
Fields inherited from interface xinca.constants.Constants
CHAT_TOKEN, DEFAULT_BOARD_HEIGHT, DEFAULT_BOARD_WIDTH, DEFAULT_INCAD_HOST, DEFAULT_SESSION_ID, DEFAULT_SLIDE_ID, DEFAULT_STROKE_ID, DEFAULT_STROKE_WIDTH, JUMP_TO_TOKEN, NEW_SLIDE_TOKEN, PROXY_PORT, RECEIVE_STROKE_TOKEN, SLIDE_FROM_IMAGE_URL_TOKEN, SOUND_TOKEN, SOUND_TRANSMISSION_PACKAGE_SIZE, THICK_STROKE, THIN_STROKE, VIDEO_TOKEN, VIDEO_TRANSMISSION_PACKAGE_SIZE, WEBLOG_TOKEN, WHITEBOARD_TOKEN
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
XChat(int sessionID, xinca.components.XChatListener xChatListener, int port, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XChat(int sessionID, xinca.components.XChatListener xChatListener, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XChat(int sessionID, xinca.components.XChatListener xChatListener, java.lang.String host, int port, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XChat(int sessionID, xinca.components.XChatListener xChatListener, java.lang.String host, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
XChat(xinca.components.XChatListener xChatListener, java.lang.String username, boolean captureOn, boolean accessOn)
          Constructor
 
Method Summary
 common.data.Chatml getChatml()
          This method gets the chatml member
 void handle(edu.gatech.coc.inca.arch.data.DataObject data_object)
          Callback method to handle a data_object this accessor is being notified of
 void handle(edu.gatech.coc.inca.arch.data.DataVector data_vector)
          Callback method to handle a data_vector this accessor is being notified of
 void setChatml(common.data.Chatml chatml)
          This method sets the chatml member
 void stateChanged(edu.gatech.coc.inca.arch.module.AccessModule module, boolean ready)
          Callback method to the state change of the access module
 void stateChanged(edu.gatech.coc.inca.arch.module.CaptureModule module, boolean ready)
          Callback method to the state change of the capture module
 void update(edu.gatech.coc.inca.arch.data.DataObject old_data, edu.gatech.coc.inca.arch.data.DataObject new_data)
          Callback method to indicate a update event in the capture module
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, 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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XChat

public XChat(xinca.components.XChatListener xChatListener,
             java.lang.String username,
             boolean captureOn,
             boolean accessOn)
Constructor

Parameters:
xChatListener - is the XChatListener listening this module
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XChat

public XChat(int sessionID,
             xinca.components.XChatListener xChatListener,
             java.lang.String username,
             boolean captureOn,
             boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xChatListener - is the XChatListener listening this module
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XChat

public XChat(int sessionID,
             xinca.components.XChatListener xChatListener,
             int port,
             java.lang.String username,
             boolean captureOn,
             boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xChatListener - is the XChatListener listening this module
port - is the InCAd port
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XChat

public XChat(int sessionID,
             xinca.components.XChatListener xChatListener,
             java.lang.String host,
             java.lang.String username,
             boolean captureOn,
             boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xChatListener - is the XChatListener listening this module
host - is the InCAd host
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag

XChat

public XChat(int sessionID,
             xinca.components.XChatListener xChatListener,
             java.lang.String host,
             int port,
             java.lang.String username,
             boolean captureOn,
             boolean accessOn)
Constructor

Parameters:
sessionID - is the current session's ID
xChatListener - is the XChatListener listening this module
host - is the InCAd host
port - is the InCAd port
username - is the user UID
captureOn - is the capture On/Off flag
accessOn - is the access On/Off flag
Method Detail

getChatml

public common.data.Chatml getChatml()
This method gets the chatml member

Returns:
the chatml member

setChatml

public void setChatml(common.data.Chatml chatml)
This method sets the chatml member


stateChanged

public void stateChanged(edu.gatech.coc.inca.arch.module.CaptureModule module,
                         boolean ready)
Callback method to the state change of the capture module

Specified by:
stateChanged in interface edu.gatech.coc.inca.arch.module.Capturer
Parameters:
module - is the capture module
ready - is the boolean state of the capture module

stateChanged

public void stateChanged(edu.gatech.coc.inca.arch.module.AccessModule module,
                         boolean ready)
Callback method to the state change of the access module

Specified by:
stateChanged in interface edu.gatech.coc.inca.arch.module.Accessor
Parameters:
module - is the access module
ready - is the boolean state of the access module

handle

public void handle(edu.gatech.coc.inca.arch.data.DataObject data_object)
Callback method to handle a data_object this accessor is being notified of

Parameters:
data_object - is the DataObject to handle

handle

public void handle(edu.gatech.coc.inca.arch.data.DataVector data_vector)
Callback method to handle a data_vector this accessor is being notified of

Specified by:
handle in interface edu.gatech.coc.inca.arch.module.Accessor
Parameters:
data_vector - is the DataVector to handle

update

public void update(edu.gatech.coc.inca.arch.data.DataObject old_data,
                   edu.gatech.coc.inca.arch.data.DataObject new_data)
Callback method to indicate a update event in the capture module

Specified by:
update in interface edu.gatech.coc.inca.arch.module.Accessor
Parameters:
old_data - is the old DataObject
new_data - is the updated DataObject