// TODO list table tree
if (text == null) { text = getString(mouseinside, "tooltip", null); }
else { tooltipowner = insidepart; }
if (text != null) {
FontMetrics fm = getFontMetrics(font);
int width = fm.stringWidth(text) + 4;
int height = fm.getAscent() + fm.getDescent() + 4;
if (tooltipowner == null) { tooltipowner = mouseinside; }
Rectangle bounds = getRectangle(content, "bounds");
int tx = Math.max(0, Math.min(mousex + 10, bounds.width - width));
int ty = Math.max(0, Math.min(mousey + 10, bounds.height - height));