public DockTab(Dockable dockable) {
		super(new PrecisionLayout().setMargins(2, 4, 2, 4).setMiddleVerticalAlignment());
		mDockable = dockable;
		setOpaque(false);
		setBorder(new EmptyBorder(2, 1, 0, 1));
		addContainerListener(this);
		mTitle = new JLabel(getFullTitle(), dockable.getTitleIcon(), SwingConstants.LEFT);
		IconButton closeButton = new IconButton(StdImage.DOCK_CLOSE, CLOSE_TOOLTIP, this::attemptClose);
		add(mTitle, new PrecisionLayoutData().setGrabHorizontalSpace(true).setHeightHint(Math.max(mTitle.getPreferredSize().height, closeButton.getPreferredSize().height)));
		if (dockable instanceof CloseHandler) {
			add(closeButton, new PrecisionLayoutData().setEndHorizontalAlignment());
		}
		if (dockable instanceof Saveable) {
			((Saveable) dockable).addDataModifiedListener(this);
		}
		addMouseListener(this);
		setToolTipText(dockable.getTitleTooltip());
		DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_MOVE, this);
	}