* */
	public void remove(Dockable dockable) {
		// TODO : check this : split this method in two (removeImpl() should be
		// used form inside the framework, and
		// remove should trigger CLOSE state change events

		// if (dockingPanel.isAncestorOf(dockable.getComponent())){ //2005/10/06
		// ...
		DockableState.Location dockLocation = dockable.getDockKey()
				.getLocation();
		SingleDockableContainer dockableContainer = null;
		Container parentOfSdc = null;

		boolean isChildOfCompoundDockable = false; // v2.1

		if (dockLocation == DockableState.Location.DOCKED
				|| dockLocation == DockableState.Location.FLOATING) { // ...2005/10/06

			// we must guess that before removing the dockable from its
			// parent...
			isChildOfCompoundDockable = DockingUtilities
					.isChildOfCompoundDockable(dockable);

			dockableContainer = DockingUtilities
					.findSingleDockableContainer(dockable);
			parentOfSdc = ((JComponent) dockableContainer).getParent();
			removeContainer(dockableContainer);
		}

		if (dockLocation == DockableState.Location.FLOATING) {
			FloatingDockableContainer fdc = (FloatingDockableContainer) SwingUtilities
					.getWindowAncestor(dockable.getComponent());
			if (parentOfSdc instanceof TabbedDockableContainer) {
				// dockable was contained in a tab on the floatable : we must
				// not dispose the window
			} else if (isChildOfCompoundDockable) {
				// dockable was a child of a compound dockable : don't dispose
			} else {
				DockingUtilities.dispose(fdc);
				// ((JDialog)dlg).dispose();
			}
		} else if (dockLocation == DockableState.Location.HIDDEN) {
			// DockableState state = (DockableState)
			// dockableStates.get(dockable);

			// if (state.isHidden()) {
			// component is removed from the auto-hide list
			// dockableStates.put(dockable, new DockableState(dockable,
			// DockableState.CLOSED));
			// 2005/10/10 removed this : wrong place to change a dockable state

			AutoHideButton btn = autoHideButtons.get(dockable.getDockKey());

			if (btn == null) {
				// (v2.1) no button : that means this dockable is a child of a
				// hidden compound dockable

				// so we just use the standard removing pattern
				dockableContainer = DockingUtilities
						.findSingleDockableContainer(dockable);
				parentOfSdc = ((JComponent) dockableContainer).getParent();
				removeContainer(dockableContainer);
			} else {
				// single auto-hide dockable
				btn.setVisible(false);
				expandPanel.remove(dockable); // in case the dockable was the
												// current visible dockable
			}

			revalidate();
			/*
			 * } else if (state.isFloating()){
			 * 
			 * Window w =
			 * SwingUtilities.getWindowAncestor(dockable.getComponent());
			 * w.dispose(); } else { // well, it's not shown, and not hidden...
			 * // nop }
			 */
		}