19 package org.sleuthkit.autopsy.datasourcesummary.uiutils;
21 import java.awt.Graphics;
22 import javax.swing.JLabel;
37 label.setHorizontalAlignment(JLabel.CENTER);
38 label.setVerticalAlignment(JLabel.CENTER);
39 label.setOpaque(
false);
65 label.setText(String.format(
"<html><div style='text-align: center;'>%s</div></html>",
66 message == null ?
"" : message));
90 public void paintOverlay(Graphics g,
int parentWidth,
int parentHeight, Integer labelMaxWidth) {
95 int labelWidth = (labelMaxWidth == null) ? parentWidth : Math.min(labelMaxWidth, parentWidth);
96 int leftPad = (parentWidth - labelWidth) / 2;
99 g.translate(leftPad, 0);
100 label.setBounds(0, 0, labelWidth, parentHeight);
void paintOverlay(Graphics g, int width, int height)
void setMessage(String message)
void paintOverlay(Graphics g, int parentWidth, int parentHeight, Integer labelMaxWidth)
void setVisible(boolean visible)