Back to project page blue-chat.
The source code is released under:
MIT License
If you think the Android project blue-chat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.alexkang.bluechat; /*from w w w .j a va 2 s . c o m*/ import android.graphics.Bitmap; import java.text.SimpleDateFormat; import java.util.Date; public class MessageBox { private String sender; private String message; private Bitmap image; private Date time; private boolean self; private boolean isImage; public MessageBox(String sender, String message, Date time, boolean self) { this.sender = sender; this.message = message; this.time = time; this.self = self; this.isImage = false; } public MessageBox(String sender, Bitmap image, Date time, boolean self) { this(sender, "", time, self); this.image = image; this.isImage = true; } public String getSender() { return sender; } public String getMessage() { return message; } public Bitmap getImage() { return image; } public String getTime() { SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm"); return dateFormatter.format(time); } public boolean isSelf() { return self; } public boolean isImage() { return isImage; } }