List of usage examples for org.apache.commons.lang StringUtils abbreviateMiddle
public static String abbreviateMiddle(String str, String middle, int length)
Abbreviates a String to the length passed, replacing the middle characters with the supplied replacement String.
From source file:ste.cameracontrol.ui.CameraControlWindow.java
/** * Displays a message in the status bar. * * @param status the status message//from ww w. j av a2 s . c om * */ public void setStatus(final String status) { if (status == null) { statusLabel.setText(""); } statusLabel.setText(StringUtils.abbreviateMiddle(status, "...", 50)); }