* */
	public void maximize(Dockable dockable) {
		if (dockable.getDockKey().getLocation() != DockableState.Location.DOCKED) {
			// development error (could have been an assertion).
			throw new IllegalArgumentException(
					"Dockable isn't currently in the DOCKED state : "
							+ dockable);
		}

		DockableState currentState = getDockableState(dockable);
		boolean stateChange = currentState == null
				|| !currentState.isMaximized();

		DockableState newState = new DockableState(this, dockable,
				DockableState.Location.MAXIMIZED);

		DockableState.Location currentLocation = getLocation(currentState);
		DockableStateWillChangeEvent dswe = new DockableStateWillChangeEvent(
				currentState, newState);
		DockingActionEvent dae = new DockingActionSimpleStateChangeEvent(this,
				dockable, currentLocation, DockableState.Location.MAXIMIZED);

		if (!isDockingActionAccepted(dae, dswe)) {
			return; // vetoed
		}

		// v2.1 : if the currently maximized dockable is a compound dockable,
		// than its children
		// can still be maximized.
		// to avoid "stacking" maximized component, we just "restore" the
		// compound dockable
		SingleDockableContainer currentMaximizedContainer = (SingleDockableContainer) maximizedComponent;
		if (currentMaximizedContainer != null
				&& currentMaximizedContainer.getDockable() != dockable) {
			// there's already a dockable which is maximized : restore it first
			restore(currentMaximizedContainer.getDockable());
		}

		SingleDockableContainer sdc = DockingUtilities
				.findSingleDockableContainer(dockable);
		Component dockableContainer = (Component) sdc;
		DockingUtilities.replaceChild(dockableContainer.getParent(),
				dockableContainer, dummyMaximedReplacer);
		SingleDockableContainer maxDockableContainer = DockableContainerFactory
				.getFactory().createDockableContainer(dockable,
						DockableContainerFactory.ParentType.PARENT_DESKTOP);

		maxDockableContainer.installDocking(this);

		this.maximizedComponent = (Component) maxDockableContainer;
		Insets i = getDockingPanelInsets();
		if (DockingPreferences.isLightWeightUsageEnabled()) {
			maximizedComponent.setBounds(i.left, i.top, getWidth() - i.left
					- i.right, getHeight() - i.top - i.bottom);
			add(maximizedComponent, JLayeredPane.PALETTE_LAYER);
		} else {
			this.currentMaximizedComponentIsHeavyWeight = false;
			if (DockingPreferences.isSingleHeavyWeightComponent()) {
				// first, check if the heavyweight component IS this dockable
				Component comp = dockable.getComponent(); // 2005/10/20 support
															// for single
															// heavyweight
				if (DockingUtilities.isHeavyWeightComponent(comp)) {
					// it's the heavyweight component (and the only one)
					// so we just have to put it there (no need for an
					// in-between awt panel)
					maximizedComponent.setBounds(i.left, i.top, getWidth()
							- i.left - i.right, getHeight() - i.top - i.bottom);
					add(maximizedComponent, JLayeredPane.PALETTE_LAYER);
					currentMaximizedComponentIsHeavyWeight = true;
				} else {
					// this one is not the heavyweight : we have to put it on
					// top of a fresh awt Panel
					Panel awtPanel = new Panel(new BorderLayout());
					awtPanel.setBounds(i.left, i.top, getWidth() - i.left
							- i.right, getHeight() - i.top - i.bottom);
					awtPanel.add(maximizedComponent, BorderLayout.CENTER);
					awtPanel.validate();
					add(awtPanel, JLayeredPane.PALETTE_LAYER);
				}
			} else {
				// if there are heavyweight components around, we need to add an
				// in-between
				// awt Panel to avoid those components to be drawn on top of the
				// maximized component
				Panel awtPanel = new Panel(new BorderLayout());
				awtPanel.setBounds(i.left, i.top,
						getWidth() - i.left - i.right, getHeight() - i.top
								- i.bottom);
				awtPanel.add(maximizedComponent, BorderLayout.CENTER);
				awtPanel.validate();
				add(awtPanel, JLayeredPane.PALETTE_LAYER);
			}
		}

		context.setDockableState(dockable, newState);

		dockable.getDockKey().setLocation(DockableState.Location.MAXIMIZED);
		fireDockingAction(dae, new DockableStateChangeEvent(currentState,
				newState));

		dockable.getComponent().requestFocus();

		repaint();

	}