Example usage for org.apache.commons.lang StringUtils abbreviateMiddle

List of usage examples for org.apache.commons.lang StringUtils abbreviateMiddle

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils abbreviateMiddle.

Prototype

public static String abbreviateMiddle(String str, String middle, int length) 

Source Link

Document

Abbreviates a String to the length passed, replacing the middle characters with the supplied replacement String.

Usage

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));
}