StyledLabel - Multiple lines

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

StyledLabel - Multiple lines

Postby ravipathak » Wed Aug 29, 2007 11:24 pm

Hi,

The StyledLabel is really impressive. However, I still have to use the HTML support of JLabel to show a line of text on a new line by using the <br> tag. Is it possible to include such a feature as part of StyledLabel? I noticed you used Jlabel in AlertDemo as well.
ravipathak
 
Posts: 155
Joined: Thu Jul 06, 2006 5:44 am

Postby JIDE Support » Thu Aug 30, 2007 7:12 am

We not just want to more flexible label but also want it to be fast. One reason html verison of JLabel is slow is because the complex renderer it has to do such as line breaks. If we go that far on StyledLabel, why don't users just use html JLabel instead? So I am OK if you are using html JLabel. We even used it internally. It's just when you don't need line break and only extra styles, StyledLabel is a better choice than html JLabel.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36404
Joined: Sun Sep 14, 2003 10:49 am

Re: StyledLabel - Multiple lines

Postby abiffmaster » Tue Jul 21, 2009 7:09 am

I believe Ravipathak request is valid as we also would like to see this implemented.

I agree that it could slow down rendering etc. but you could have it implemented such that the developer could turn on and off the "complex" rendering and only use it as needed.

Thanks.
abiffmaster
 
Posts: 39
Joined: Mon Mar 17, 2008 8:22 am

Re: StyledLabel - Multiple lines

Postby JIDE Support » Tue Jul 21, 2009 8:53 am

We will put it as a RFE but it is still not a short term commitment. Since StyledLabel is on the open source project https://jide-oss.dev.java.net/, you could implement it by your own effort if you cannot wait.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36404
Joined: Sun Sep 14, 2003 10:49 am

Re: StyledLabel - Multiple lines

Postby JIDE Support » Tue Mar 27, 2012 4:34 pm

Just so you know, StyledLabel now supports line wrap and line breaks in the latest release. Please give it a try.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36404
Joined: Sun Sep 14, 2003 10:49 am

Re: StyledLabel - Multiple lines

Postby powersolutions » Sun Jul 01, 2012 9:07 pm

Do you have to specify any special tags in the text to get the styled label to wrap the text?

It would be nice if we could just have some really long text with "\n" and at this point the the text would create a new line, I cant see another obvious way of specifying where you would specify a specific line break.

Could you provide an example of using StyledLabel with really long text that specifies where the line breaks would occur.

Should I be using StyledLabel for multiline text or should I be using something else? Standard JLabel with html?
powersolutions
 
Posts: 127
Joined: Mon May 29, 2006 5:28 am

Re: StyledLabel - Multiple lines

Postby JIDE Support » Mon Jul 02, 2012 10:40 am

Yes, simply adding a line break in StyledLabel's text would make the line wrap feature work. If there is no line break, StyledLabel#isLineWrap() needs to be true to start the word wrapping. The related APIs include StyledLabel#setPreferredWidth()/setRows()/seMaxRows()/setMinRows()/etc. Please check out the latest StyledLabelDemo for the implementations.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36404
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests

cron