import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JComponent;
+import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
+import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.SwingConstants;
import javax.swing.border.Border;
"<html><div style=\"max-width:350px;overflow-wrap:break-word;display:inline-block\">"
: "<html><div style=\"width:350; text-align: justify; word-wrap: break-word;\">"
);
-
/**
* wrap a bare html safe string to around 60 characters per line using a CSS
* style class specifying word-wrap and break-word
Objects.requireNonNull(ttext,
"Tootip text to format must not be null!");
ttext = ttext.trim().replaceAll("<br/>", "<br>");
-
boolean maxLengthExceeded = false;
+
boolean isHTML = ttext.startsWith("<html>");
if (isHTML)
{
label.setToolTipText(tooltip);
}
+ // From 2.11.2 merge
+ public static void mgAddtoLayout(JPanel cpanel, String tooltip,
+ JLabel jLabel, JComponent name)
+ {
+ mgAddtoLayout(cpanel, tooltip, jLabel, name, null);
+ }
+
+ public static void mgAddtoLayout(JPanel cpanel, String tooltip,
+ JLabel jLabel, JComponent name, String params)
+ {
+ cpanel.add(jLabel);
+ if (params == null)
+ {
+ cpanel.add(name);
+ }
+ else
+ {
+ cpanel.add(name, params);
+ }
+ name.setToolTipText(tooltip);
+ jLabel.setToolTipText(tooltip);
+ }
+
/**
* standard font for labels and check boxes in dialog boxes
*