public void setLatestPreview(Object preview) {
        if ((this.previewedThread != null) && this.previewedThread.isComplete()) {
            this.previewLabel.setText("Final result");
            Object finalResult = this.previewedThread.getFinalResult();
            this.textViewerPanel.setText(finalResult != null ? finalResult
                    .toString() : null);
            disableRefresh();
        } else {
            double grabTime = this.previewedThread != null ? this.previewedThread
                    .getLatestPreviewGrabTimeSeconds()
                    : 0.0;
            String grabString = grabTime > 0.0 ? (" ("
                    + StringUtils.secondsToDHMSString(grabTime) + ")") : "";
            this.textViewerPanel.setText(preview != null ? preview.toString()
                    : null);
            if (preview == null) {
                this.previewLabel.setText("No preview available" + grabString);
            } else {
                this.previewLabel.setText("Preview" + grabString);
            }
        }
    }