Java Doc for LlamaChat.java in  » Chat » LlamaChat » client » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chat » LlamaChat » client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.JApplet
   client.LlamaChat

LlamaChat
public class LlamaChat extends JApplet (Code)
For use in a webpage:
 <OBJECT 
 classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
 width="615" height="360" 
 codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,mn">
 <PARAM name="code" value="LlamaChat.class">
 <PARAM name="archive" value="LlamaChat.jar">
 <PARAM name="type" value="application/x-java-applet;version=1.4">
 <PARAM name="scriptable" value="true">
 <param name="username" value="[replace with username]">
 <param name="port" value="[replace with port]">
 <COMMENT>
 <EMBED type="application/x-java-applet;version=1.4" 
 width="615" height="331" 
 code="LlamaChat.class" archive="LlamaChat.jar"
 pluginspage="http://java.sun.com/j2se/1.4.1/download.html"
 username="[replace with username]"
 port="[replace with port]">
 <NOEMBED>
 No Java 1.4 plugin
 </NOEMBED></EMBED>
 </COMMENT>
 </OBJECT>
 
This is the LlamaChat client applet; The above html needs values for username, port, site, and location; Username is the name of the connecting user, port is the port on which the server is running, site is the IP address or hostname of the server, location is the location of the client applet on the web
author:
   Joseph Monti countjoe@users.sourceforge.net
version:
   0.8

Inner Class :final protected class MyAction implements ActionListener
Inner Class :final protected class MyKeyListener implements KeyListener
Inner Class :final protected class MyMouseListener implements MouseListener
Inner Class :final protected class MyHyperlinkListener implements HyperlinkListener
Inner Class :final protected class MyCellRenderer extends DefaultListCellRenderer

Field Summary
public  intPORT
    
public  booleanadmin
    
public  ArrayListadmins
    
public  ArrayListafks
    
 JLabelbottomText
    
 JButtonbutChannel
    
 JButtonbutCreate
    
 Containerc
    
 JComboBoxcboChannels
    
public  booleanchanAdmin
    
public  Hashtablechannels
    
 JLabelconIcon
    
 ImageIconconNo
    
 ImageIconconYes
    
public  ArrayListignores
    
public  StringlocationURL
    
 ChatPanemainChat
    
 JTextFieldmessageText
    
 MyActionmyAction
    
 ColormyColors
    
 MyHyperlinkListenermyHyperlinkListener
    
 MyKeyListenermyKeyListener
    
 MyMouseListenermyMouseListener
    
 JPopupMenupopup
    
public  PrivateMsgprivates
    
 Rectanglerect
    
 JLabelsecIcon
    
 ImageIconsecNo
    
 ImageIconsecYes
    
public  booleanshowUserStatus
    
public  Stringsite
    
 JScrollPanetextScroller
    
 JListuserList
    
public  Stringusername
    
public  ArrayListusers
    


Method Summary
public  voidclose()
    
public  voiderror(String s)
    
final protected  URLgetURL(String filename)
    
public  voidinit()
    
public  voidnewChannel(String name, boolean pass)
    
public  booleanparseCommand(String cmd)
    
public  voidrecieveChat(String un, String message)
    
public  voidrecievePrivate(String un, String message)
    
public  voidrecieveWhisper(String un, String message)
    
public  voidrename(String on, String nn)
    
public  voidsendPrivate(String name, String message)
    
public  voidsendText(String un, String message, boolean whisper)
     Sends a text to the chat window.
public  voidserverMessage(String s)
    
public  voidsetAdmin()
    
public  voidsetConnected(boolean b)
    
public  voidstart()
    
public  voidstop()
    
public  voidupdateList()
    
public  voiduserAdd(String un)
    
public  voiduserDel(String un)
    

Field Detail
PORT
public int PORT(Code)



admin
public boolean admin(Code)



admins
public ArrayList admins(Code)



afks
public ArrayList afks(Code)



bottomText
JLabel bottomText(Code)



butChannel
JButton butChannel(Code)



butCreate
JButton butCreate(Code)



c
Container c(Code)



cboChannels
JComboBox cboChannels(Code)



chanAdmin
public boolean chanAdmin(Code)



channels
public Hashtable channels(Code)



conIcon
JLabel conIcon(Code)



conNo
ImageIcon conNo(Code)



conYes
ImageIcon conYes(Code)



ignores
public ArrayList ignores(Code)



locationURL
public String locationURL(Code)



mainChat
ChatPane mainChat(Code)



messageText
JTextField messageText(Code)



myAction
MyAction myAction(Code)



myColors
Color myColors(Code)



myHyperlinkListener
MyHyperlinkListener myHyperlinkListener(Code)



myKeyListener
MyKeyListener myKeyListener(Code)



myMouseListener
MyMouseListener myMouseListener(Code)



popup
JPopupMenu popup(Code)



privates
public PrivateMsg privates(Code)



rect
Rectangle rect(Code)



secIcon
JLabel secIcon(Code)



secNo
ImageIcon secNo(Code)



secYes
ImageIcon secYes(Code)



showUserStatus
public boolean showUserStatus(Code)



site
public String site(Code)



textScroller
JScrollPane textScroller(Code)



userList
JList userList(Code)



username
public String username(Code)



users
public ArrayList users(Code)





Method Detail
close
public void close()(Code)
cleans up a connection by removing all user from all maintained lists



error
public void error(String s)(Code)
signifies an error and reports it to the user
Parameters:
  s - the error message



getURL
final protected URL getURL(String filename)(Code)
Method to take a filename and return a URL object
Parameters:
  filename - the name of the file to be turned into URL the url representing filename



init
public void init()(Code)
Initializes the graphical components



newChannel
public void newChannel(String name, boolean pass)(Code)
creates a new channel, if the channel exists it is removed (this method doubles as a removeChannel)
Parameters:
  name - the name of the channel



parseCommand
public boolean parseCommand(String cmd)(Code)
Method to parse a command and perform the specified action
Parameters:
  cmd - the command that the user typed a status indicator to tell if the command was valid



recieveChat
public void recieveChat(String un, String message)(Code)
Recieving method for a chat message
Parameters:
  un - the name of the user sending the chat
Parameters:
  message - the message that was sent



recievePrivate
public void recievePrivate(String un, String message)(Code)
Recieving method for private
Parameters:
  un - the name of the user sending the message
Parameters:
  message - the message that was sent



recieveWhisper
public void recieveWhisper(String un, String message)(Code)
Reciving method for a whisper
Parameters:
  un - the name of the user sending the whisper
Parameters:
  message - the message that was sent



rename
public void rename(String on, String nn)(Code)
changes the name of a user, updating list of admins, afks, ignoes, and master user list
Parameters:
  on - old username
Parameters:
  nn - new username



sendPrivate
public void sendPrivate(String name, String message)(Code)



sendText
public void sendText(String un, String message, boolean whisper)(Code)
Sends a text to the chat window. Parses the message to pick out emoticons.
Parameters:
  un - the name of the user sending the message
Parameters:
  message - the message to be sent
Parameters:
  whisper - indicates the message was a wisper and makes the message italic



serverMessage
public void serverMessage(String s)(Code)
A shortcut to be used when a message from the server (or any automated message) must ben sent to the client
Parameters:
  s - the message



setAdmin
public void setAdmin()(Code)
sets this user to be an admin



setConnected
public void setConnected(boolean b)(Code)
used to manage the connection icons to signify connection and secure status
Parameters:
  b - true if connected



start
public void start()(Code)



stop
public void stop()(Code)



updateList
public void updateList()(Code)
sorts the user list and rebuilds the user list from the sorted user vector,



userAdd
public void userAdd(String un)(Code)
adds a new user to the interal list of users
Parameters:
  un - the name of the user to be added



userDel
public void userDel(String un)(Code)
removes a user from the user list
Parameters:
  un - the name of the user to be removed



Fields inherited from javax.swing.JApplet
protected AccessibleContext accessibleContext(Code)(Java Doc)
protected JRootPane rootPane(Code)(Java Doc)
protected boolean rootPaneCheckingEnabled(Code)(Java Doc)

Methods inherited from javax.swing.JApplet
protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc)
protected JRootPane createRootPane()(Code)(Java Doc)
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public Container getContentPane()(Code)(Java Doc)
public Component getGlassPane()(Code)(Java Doc)
public Graphics getGraphics()(Code)(Java Doc)
public JMenuBar getJMenuBar()(Code)(Java Doc)
public JLayeredPane getLayeredPane()(Code)(Java Doc)
public JRootPane getRootPane()(Code)(Java Doc)
public TransferHandler getTransferHandler()(Code)(Java Doc)
protected boolean isRootPaneCheckingEnabled()(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
public void remove(Component comp)(Code)(Java Doc)
public void repaint(long time, int x, int y, int width, int height)(Code)(Java Doc)
public void setContentPane(Container contentPane)(Code)(Java Doc)
public void setGlassPane(Component glassPane)(Code)(Java Doc)
public void setJMenuBar(JMenuBar menuBar)(Code)(Java Doc)
public void setLayeredPane(JLayeredPane layeredPane)(Code)(Java Doc)
public void setLayout(LayoutManager manager)(Code)(Java Doc)
protected void setRootPane(JRootPane root)(Code)(Java Doc)
protected void setRootPaneCheckingEnabled(boolean enabled)(Code)(Java Doc)
public void setTransferHandler(TransferHandler newHandler)(Code)(Java Doc)
public void update(Graphics g)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.