/** * Performs label layout and returns clipped or full label text. * * @param label label to process * @param fm label font metrics * @param text label text * @param icon label icon * @param viewR rectangle limited by label insets * @param iconR icon rectangle dummy * @param textR text rectangle dummy * @return clipped or full label text */ protected String layoutCL( final E label, final FontMetrics fm, final String text, final Icon icon, final Rectangle viewR, final Rectangle iconR, final Rectangle textR) { return SwingUtilities.layoutCompoundLabel( label, fm, text, icon, label.getVerticalAlignment(), label.getHorizontalAlignment(), label.getVerticalTextPosition(), label.getHorizontalTextPosition(), viewR, iconR, textR, label.getIconTextGap()); }