Mercurial Hosting > junotu
changeset 97:babc1a1305fd
TabCalendarBoard: Tooltip for column day-of-the-week and custom column title date format
author | Fox |
---|---|
date | Tue, 21 Mar 2023 01:13:00 +0100 |
parents | d6953ebfbe7e |
children | 778130f1a4c4 |
files | src/junotu/TabCalendarBoard.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/junotu/TabCalendarBoard.java Thu Feb 23 20:50:19 2023 +0100 +++ b/src/junotu/TabCalendarBoard.java Tue Mar 21 01:13:00 2023 +0100 @@ -70,6 +70,8 @@ final static int COLUMN_CONTENT_WIDTH = 256; final static int COLUMN_WIDTH = COLUMN_CONTENT_WIDTH+16; final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + final static SimpleDateFormat TITLE_DATE_FORMAT = new SimpleDateFormat("dd MMMM, yyyy"); + final static SimpleDateFormat DAY_OF_THE_WEEK_FORMAT = new SimpleDateFormat("EEEE"); final static SimpleDateFormat DEBUG_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public final String KEY_ACTION_BACK = "back"; @@ -197,6 +199,7 @@ addCard.addActionListener(this); addCard.setToolTipText("Add card."); + this.setToolTipText( DAY_OF_THE_WEEK_FORMAT.format(date) ); if( newCard ) { return; @@ -644,7 +647,7 @@ public void insertColumn( Date date, Card card, int insertPosition ) { ColumnWidget column = new ColumnWidget(this, card, date); - column.titleSet( DateFormat.getDateInstance().format(date) ); + column.titleSet( TITLE_DATE_FORMAT.format(date) ); insertColumnRaw(column, insertPosition); }