|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet | +--Chatlet
This is the Chatlet applet. It a simple user interface with a common IRC client styled layout.
Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static char |
bold
Bold delimiter. |
static char |
color
Color delimiter. |
static char |
reverse
Reverse delimiter. |
static char |
underline
Underline delimiter. |
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 | |
Chatlet()
|
Method Summary | |
void |
append(java.lang.String str)
Used to append a String to the textfield in the chat. |
void |
beep()
Used to sound the system bell. |
java.lang.String |
colorName(int cidx)
Gets the name of a color with a certain index. |
void |
execute(java.lang.String data)
Used to execute a command sent to the client from the servlet. |
java.lang.Object |
getConnectionData()
Used when handshaking to get the connection data. |
void |
handleData(java.lang.Object data)
Used to handle data recieved by the ServletConnection. |
java.awt.Color |
hexColor(java.lang.String hexString)
Used to convert a color string (fe84c2) to a Color object. |
void |
init()
The initalization of the Chatlet is done here. |
boolean |
isConnected()
Used to retrieve the current connection status. |
java.lang.String |
parse(java.lang.String str)
Used to parse color and bold controls in the incoming message. |
void |
setConnected(boolean connected)
Used to set the connection status. |
void |
setConnectionResponse(java.lang.Object response)
The response given in a handshake procedure. |
void |
start()
Reinitialize some things when started/restarted. |
void |
stop()
When the applet is stopped a disconnection is forced. |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final char reverse
public static final char underline
public static final char color
public static final char bold
Constructor Detail |
public Chatlet()
Method Detail |
public java.awt.Color hexColor(java.lang.String hexString)
hexString
- The color given as a string
of eight hexadecimal digits.public void init()
init
in class java.applet.Applet
public void start()
start
in class java.applet.Applet
public void stop()
stop
in class java.applet.Applet
public void beep()
public void append(java.lang.String str)
str
- The String to be appended.public java.lang.Object getConnectionData()
getConnectionData
in interface ConnectionHandler
public void setConnectionResponse(java.lang.Object response)
setConnectionResponse
in interface ConnectionHandler
response
- The response from a handshake.public boolean isConnected()
isConnected
in interface ConnectionHandler
public void setConnected(boolean connected)
setConnected
in interface ConnectionHandler
connected
- true or false.public void handleData(java.lang.Object data)
handleData
in interface ConnectionHandler
data
- The data to be handled.public void execute(java.lang.String data)
data
- The command data from the server.public java.lang.String parse(java.lang.String str) throws java.lang.NumberFormatException
str
- The unparsed String.public java.lang.String colorName(int cidx)
cidx
- The index of the color.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |