initWidget(rootElement);
}
public void setValue(NotePostedEvent event) {
final NoteHeader noteHeader = event.getNoteDetails().getNoteHeader();
userNameLabel.setText(noteHeader.getAuthor().getUserName());
final Optional<OWLEntityData> targetAsEntityData = event.getTargetAsEntityData();
if(targetAsEntityData.isPresent()) {
entityLabel.setEntity(targetAsEntityData.get());
entityLabel.setVisible(true);
}
else {
entityLabel.setVisible(false);
}
timeLabel.setBaseTime(noteHeader.getTimestamp());
final SafeHtmlBuilder builder = new SafeHtmlBuilder();
final NoteContent noteContent = event.getNoteDetails().getNoteContent();
final Optional<String> subject = noteContent.getSubject();
if (subject.isPresent()) {
builder.appendHtmlConstant("<span style=\"font-weight: bold; padding-right: 4px;\">" + subject.or("") + ":</span>");