classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for SwingUtilities.clipString()


From: Roman Kennke
Subject: Re: Looking for SwingUtilities.clipString()
Date: Mon, 05 Sep 2005 10:43:00 +0200

Hi Thorsten,

> I couldn't find any mechanism that clips the string based on the width of 
> the parent's container it resists in. I was looking in the 
> BasicLabelUI-class and looked at SwingUtilities.java, but couldn't find 
> anything related. However, the SwingUtilities.layoutCompundLabel()-docBlock 
> tells me
> <quote>
> [...]
> * @return The string of characters, possibly truncated with an elipsis,
> * which is laid out in this label
> [...]
> </quote>
> Is support for this missing or am I looking at the wrong place?

This should be the correct place for this purpose. If this method does
not do what it promises, then this it might be a bug. You should check
it against the behaviour of Sun's JDK, and file a bug report if you feel
that we do something wrong here. If you are familiar with programming,
you could also write a small testcase that shows where we are wrong.

BTW: Another good place to look for such a mechanism could be
javax.swing.text.Utilities.

Kind regards,
Roman






reply via email to

[Prev in Thread] Current Thread [Next in Thread]