public void clear() {
		dockingPanel.removeAll();
		for (int i = 0; i < borderPanes.length; i++) {
			borderPanes[i].removeAll();
			borderPanes[i].setVisible(false);
		}

		boolean wasHeavyMaximized = false;
		if (maximizedComponent != null) { // clean up maximization state
			if (DockingPreferences.isLightWeightUsageEnabled()) {
				remove(maximizedComponent); // remove the single dockable
											// container
			} else {
				remove(maximizedComponent.getParent()); // remove the awt panel
				wasHeavyMaximized = true;
			}
			maximizedComponent = null; // 2006/11/20 ooops !
		}

		autoHideButtons.clear();
		expandPanel.collapse();

		expandPanel.clear();

		previousFloatingDockableStates.clear();

		tabbedGroups.clear();

		// clear the floatables windows
		ArrayList<Dockable> floatingDockables = context.getDockablesByState(
				this, DockableState.Location.FLOATING);
		for (int i = 0; i < floatingDockables.size(); i++) {
			Dockable d = (Dockable) floatingDockables.get(i);
			remove(d);
		}

	}