Skip to content

table: refine JTable overlong cell ellipsis positioning#76

Open
mbtaylor wants to merge 1 commit intoStarlink:masterfrom
mbtaylor:elision
Open

table: refine JTable overlong cell ellipsis positioning#76
mbtaylor wants to merge 1 commit intoStarlink:masterfrom
mbtaylor:elision

Conversation

@mbtaylor
Copy link
Member

@mbtaylor mbtaylor commented Mar 5, 2026

Modify the recent change that elides overlong strings displayed in JTable cells in the middle; the ellipsis may now be placed either in the middle or at the end, depending on content.

Roughly, strings with embedded whitespace (which are likely to be natural language text or similar) are elided at the end, but long strings without embedded whitespace (which are more likely to be something hierarchical like a filename or URL) are elided in the middle.

Modify the recent change that elides overlong strings displayed
in JTable cells in the middle; the ellipsis may now be placed
either in the middle or at the end, depending on content.

Roughly, strings with embedded whitespace (which are likely to
be natural language text or similar) are elided at the end,
but long strings without embedded whitespace (which are more likely
to be something hierarchical like a filename or URL) are elided
in the middle.
@mbtaylor
Copy link
Member Author

mbtaylor commented Mar 5, 2026

@fjebaker although the recent PR #75 works nicely for URLs and filenames I found myself getting annoyed by it with content like textual descriptions, where the interesting stuff is more likely at the start than the end of the string. So I put a heuristic in that tries to account for that. Whaddayathink?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant