Menu

#2 Line up date/time column in balloon display

open
nobody
None
5
2016-03-28
2010-01-19
Anonymous
No

Currently the display appears staggered:

UK 5:18 PM
Amsterdam 6:18 PM

Most Swing components will accept snippets of HTML code for formatting which would be a simple way to get nicely aligned columns (and possibly other formatting). Try building a string like:

StringBuilder s = new StringBuilder();
sb.append("<html><body><table>")
for each item {
sb.append("<tr><td>"+displayName[i]+"</td><td>"+formattedTime[i]+"</td></tr>")
}
sb.append("</table></body></html>")

Discussion

  • Bernmeister

    Bernmeister - 2010-04-01

    I've looked at this and feel that the solution is not that simple. To cater for RTL languages and other choices of layout (see below), a new and more sophisticated layout mechanism is required (and is currently in the works).

    The problem is this: If I want the layout

    Sydney 10:30 AM
    Rome -8:30 PM

    with the timezones left aligned in a single column and the different day indicator and time in a single column (also left aligned), the software has no idea of the user's intention. That is, the software cannot know (currently) when to make a new column (or when to combine two or more groups of data).

     
  • Bernmeister

    Bernmeister - 2010-04-10
    • status: open --> closed
     
  • Bernmeister

    Bernmeister - 2010-04-10

    Addressed in release 1.5

     
  • Bernmeister

    Bernmeister - 2011-02-07

    As per the release notes for 1.5: HTML formatting is NOT rendered in the tooltip/bubble text and so only the Show Date/Time can be nicely formatted.

     
  • Bernmeister

    Bernmeister - 2011-02-07
    • status: closed --> open
     
  • Florian

    Florian - 2016-03-28

    Very nice little piece of software. However, I also disliked the staggered view, but found a workaround:

    Use e.g. Notepad to copy a tab character to the clipboard, then paste it to the message layout configuration menu (typically between "time zone" and "different day indicator".

    That's it! See the attached screenshot for a preview.

     
    👍
    1

Log in to post a comment.