CLabel.shortenText

Shorten the given text <code>t</code> so that its length doesn't exceed the given width. The default implementation replaces characters in the center of the original string with an ellipsis ("..."). Override if you need a different strategy.

@param gc the gc to use for text measurement @param t the text to shorten @param width the width to shorten the text to, in pixels @return the shortened text

class CLabel
protected
String
shortenText
(
,
String t
,
int width
)

Meta