SocialCommitmentHTMLFormatter
is a class which can be used to
format
SocialCommitment
objects using HTML tages. This formatter is
intended to be used when social commitments are in
JList
s. The text
describing the social commitment results from a call to
SocialCommitment.toString()
. The text is formatted as plain black
text with the following modifications:
- If the commitment has been fulfilled or canceled, the entire commitment
is formatted with strike-through (using the
<strike>
tag).
- If the commitment has been violated, the font colour is changed to red.
- If the commitment has ended (fulfilled, canceled or violated), it is
faded in proportion to the amount of time that has passed since the
commitment ended. The speed of the fading is controlled by a parameter.