com.valhalla.jbother
Class Emoticons

java.lang.Object
  extended bycom.valhalla.jbother.Emoticons

public class Emoticons
extends java.lang.Object

Replaces different emote symbols with images

Version:
1.0
Author:
Adam Olsen

Nested Class Summary
(package private)  class Emoticons.EmoteClickListener
          Listens for an emoticon to get clicked
 
Method Summary
 void displayEmoticonChooser(javax.swing.JFrame window, java.awt.Component component, javax.swing.JTextArea area)
          Shows a small window displaying all available emoticons.
static Emoticons getInstance()
           
 java.lang.String replaceIcons(java.lang.String text)
          Replaces the different symbols with the images defined in the emote data file
 void switchTheme(java.lang.String theme)
          Switches the emoticon theme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Emoticons getInstance()
Returns:
the Emoticons singleton

switchTheme

public void switchTheme(java.lang.String theme)
Switches the emoticon theme

Parameters:
theme - the theme to switch to

replaceIcons

public java.lang.String replaceIcons(java.lang.String text)
Replaces the different symbols with the images defined in the emote data file

Parameters:
text - the text to modify
Returns:
the modified text

displayEmoticonChooser

public void displayEmoticonChooser(javax.swing.JFrame window,
                                   java.awt.Component component,
                                   javax.swing.JTextArea area)
Shows a small window displaying all available emoticons.

Parameters:
window - the parent window
component - the Component to display this frame over
area - the text area that the emoticons will be placed on when the user clicks an image