private String getPlaceholderText ( Graphics g , int availTextWidth ) { JTextComponent c = getComponent ( ) ; FontMetrics fm = SwingUtilities2 . getFontMetrics ( c , g ) ; return SwingUtilities2 . clipStringIfNecessary ( c , fm , placeholderText , availTextWidth ) ; }
Get the placeholder text clipped if necessary .