public Dimension calculatePreferredHeaderSize(TreePanel panel) {
		Font font = getHeaderFont();
		int width = getWidth();
		if (panel.isUserSortable()) {
			width -= SORTER_WIDTH;
		}
		Dimension size = TextDrawing.getPreferredSize(font, TextDrawing.wrapToPixelWidth(font, getName(), width));
		if (panel.isUserSortable()) {
			size.width += SORTER_WIDTH;
		}
		return size;
	}