FileDocCategorySizeDatePackage
MessageNode.javaAPI DocExample894Sat May 31 17:18:36 BST 2003None

MessageNode

public class MessageNode extends DefaultMutableTreeNode
A Mutable Tree Node that is also a Message.

Fields Summary
Message
m
com.darwinsys.lang.StringFormat
fromFmt
com.darwinsys.lang.StringFormat
subjFmt
Constructors Summary
MessageNode(Message m)


	  
		this.m = m;
	
Methods Summary
public java.lang.StringtoString()

		try {
			Address from = m.getFrom()[0];

			String fromAddress;
			if (from instanceof InternetAddress)
				fromAddress = ((InternetAddress)from).getAddress();
			else
				fromAddress = from.toString();

			StringBuffer sb = new StringBuffer();
			fromFmt.format(fromAddress, sb, null);
			sb.	append("  ");
			subjFmt.format(m.getSubject(), sb, null);
			return sb.toString();
		} catch (Exception e) {
			return e.toString();
		}