FileDocCategorySizeDatePackage
MessageNode.javaAPI DocExample853Mon Jun 12 17:22:50 BST 2000None

MessageNode

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

Fields Summary
Message
m
StringFormat
fromFmt
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();
		}