if(cl.getTimeZone().useDaylightTime())
h = cl.get(Calendar.HOUR_OF_DAY)+1;
else
h = cl.get(Calendar.HOUR_OF_DAY);
String t = h+":"+(cl.get(Calendar.MINUTE)<10? "0"+cl.get(Calendar.MINUTE) : ""+cl.get(Calendar.MINUTE));
RichText message = new RichText(d);
message.setCanvasWidth(getMessageForm().getForm().getWidth());
if(from)
{
times.addElement(t+" << ");
message.addContent(t+" << ", rl.getProfile().COLOR_FROM, true);
message.setDefaultCommand(getMessageForm().getQuote());
message.setItemCommandListener(getMessageForm());
}
else
{
times.addElement(t+" >> ");
message.addContent(t+" >> ", rl.getProfile().COLOR_TO, true);
}
if(rl.getProfile().getSmiles()>0)
{
//Smile processor here
Vector strs = new Vector();
strs.addElement(m);
Vector smils = new Vector();
for(int i=0; i<smiles.length; i++)
{
for(int j=0; j<strs.size(); j++)
{
int ind = -1;
String s =strs.elementAt(j).toString();
if((ind = s.indexOf(smiles[i]))!=-1)
{
String s1 = s.substring(0, ind);
String s2 = s.substring(ind+smiles[i].length());
strs.insertElementAt(s2, j+1);
strs.removeElementAt(j);
strs.insertElementAt(s1, j);
smils.insertElementAt(smilep[i], j);
}
}
}
for(int i=0; i<strs.size(); i++)
{
message.addContent(strs.elementAt(i).toString());
if(i<smils.size())
{
message.addImage(getImage("/smiles/"+smils.elementAt(i)+".png"));
}
}
}
else
message.addContent(m);
message.finish();
getMessageForm().getForm().insert(2, message);
isNew = true;
if(d.getCurrent()==getMessageForm().getForm())
{
isNew = false;