Package hamsam.api

Examples of hamsam.api.MessageComponent


    public void sendInstantMessage(Buddy buddy, Message message) {

        StringBuffer sb = new StringBuffer();
        Enumeration e = message.getComponents();
        while (e.hasMoreElements()) {
            MessageComponent comp = (MessageComponent) e.nextElement();
            if (comp instanceof TextComponent) {
                sb.append(((TextComponent) comp).getSequence());
            }
            //else if(comp instanceof SmileyComponent)
            //{
View Full Code Here


    StringBuffer ret = new StringBuffer();

    Enumeration e = message.getComponents();
    while(e.hasMoreElements())
    {
       MessageComponent comp = (MessageComponent) e.nextElement();
       if(comp instanceof TextComponent)
       {
         TextComponent txt = (TextComponent) comp;
        Color color = txt.getColor();
        if(color != null)
View Full Code Here

  private void printMessage(String header, Message msg) {
    System.out.print(header);

    Enumeration e = msg.getComponents();
    while (e.hasMoreElements()) {
      MessageComponent comp = (MessageComponent) e.nextElement();
      if (comp instanceof TextComponent) {
        TextComponent txt = (TextComponent) comp;
        System.out.print("<text>" + new String(txt.getSequence()));
      }
      else if (comp instanceof SmileyComponent) {
View Full Code Here

    StringBuffer buff = new StringBuffer();

    Enumeration e = message.getComponents();
    while(e.hasMoreElements())
    {
      MessageComponent comp = (MessageComponent) e.nextElement();
      if(comp instanceof TextComponent)
      {
        TextComponent text = (TextComponent) comp;
        if(font == null)
          font = text.getFont();
View Full Code Here

TOP

Related Classes of hamsam.api.MessageComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.