public void insertHorizontalLine() { add( new HorizontalLineEntry() ); }
/** * Adds a notification message this transcript window. A notification message generally is a presence update, but * can be used for most anything related to the room. * * The message timestamp is assumed to be 'now'. * * @param message the information message to insert. * @param foregroundColor the foreground color to use. */ public synchronized void insertNotificationMessage( String message, Color foregroundColor ) { add( new CustomTextEntry( ZonedDateTime.now(), message, foregroundColor ) ); }
/** * Adds a custom text message this transcript window. * * The message timestamp is assumed to be 'now'. * * @param text the text to insert. * @param bold true to use bold text. * @param underline true to have text underlined. * @param foreground the foreground color. */ public synchronized void insertCustomText( String text, boolean bold, boolean underline, Color foreground ) { add( new CustomTextEntry( ZonedDateTime.now(), text, foreground, bold, false, underline, false ) ); }
/** * Adds a historic text message to this transcript window. These typically are messages that were added to a chat * before the local user joined the chat. * * @param userid the userid of the sender. * @param message the message to insert. * @param date the timestamp of the message. */ public void insertHistoryMessage( String userid, String message, Date date ) { final ZonedDateTime sentDate = date.toInstant().atZone( ZoneOffset.UTC ); final Color historyColor = (Color) UIManager.get( "History.foreground" ); add( new MessageEntry( sentDate, true, userid, historyColor, message, historyColor ) ); }
/** * Adds a custom text message this transcript window. * * The message timestamp is assumed to be 'now'. * * @param text the text to insert. * @param bold true to use bold text. * @param italic true to use italic text. * @param underline true to have text underlined. * @param strikeThrough true to have text strike through. * @param foreground the foreground color. */ public synchronized void insertCustomText( String text, boolean bold, boolean italic, boolean underline, boolean strikeThrough, Color foreground ) { add( new CustomTextEntry( ZonedDateTime.now(), text, foreground, bold, italic, underline, strikeThrough ) ); }
isDelayed = false; add( new MessageEntry( sentDate, isDelayed, nickname.toString(), foreground, body, (Color) UIManager.get( "Message.foreground" ), background ) );
if ( !entry.equals( startOfDayEntry ) ) add( startOfDayEntry );