DocumentComponent's title truncate

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

DocumentComponent's title truncate

Postby cage78 » Tue Oct 28, 2014 8:06 pm

I have a component which extends DocumentComponent class. However, I always have document's title truncated when the title is too long (>30 characters). The truncation is happened in the middle of the title (e.g., "xxxTitle...1yyy").
My question is that is there anyway to change the position of truncation (e.g., truncate from the begin of title or truncate at the end of the title)? Or in the worst case, can we set it to NOT truncate the title at all?
cage78
 
Posts: 2
Joined: Tue Oct 28, 2014 7:40 pm

Re: DocumentComponent's title truncate

Postby JIDE Support » Tue Oct 28, 2014 8:30 pm

You can change how it is truncated using DocumentPane#setTitleConverter. You can use a instance of DefaultStringConverter(Integer.MAX_VALUE, 0) if no truncated at all or DefaultStringConverter(30, 0) if truncating at the end only.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36107
Joined: Sun Sep 14, 2003 10:49 am

Re: DocumentComponent's title truncate

Postby cage78 » Wed Oct 29, 2014 3:45 pm

Thanks. It works perfectly
cage78
 
Posts: 2
Joined: Tue Oct 28, 2014 7:40 pm


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 1 guest