Dockable getCurrentDockable() {
			return currentDockable;
		}
	}

	/** Returns the name of this desktop (used by workspace management) */
	public String getDesktopName() {
		return desktopName;
	}

	/** Updates the name of this desktop (used by workspace management) */
	public void setDesktopName(String desktopName) {
		this.desktopName = desktopName;
	}

	/**
	 * Returns the docking context used by this desktop (might be shared with
	 * other desktop).
	 * 
	 * @since 2.1
	 */
	public DockingContext getContext() {
		return context;
	}

	/**
	 * Updates the docking context used by this desktop.
	 * <p>
	 * Warning : this method should only be used by the framework itself :
	 * changing a context "live" can have unpredicted and undesired side effect.
	 * 
	 * @since 2.1
	 */
	public void setContext(DockingContext context) {
		this.context = context;
	}

	/**
	 * returns the currently maximized dockable (or null if no dockable is in
	 * that state)
	 */
	public Dockable getMaximizedDockable() {
		if (maximizedComponent == null) {
			return null;
		} else {
			SingleDockableContainer maxContainer = (SingleDockableContainer) maximizedComponent;
			return maxContainer.getDockable();
		}
	}

	/**
	 * combines a docking action event and vetoable state change event to accept
	 * or reject a docking action.
	 */
	private boolean isDockingActionAccepted(DockingActionEvent dae,
			DockableStateWillChangeEvent dse) {
		boolean accepted = context.fireAcceptDockingAction(dae);
		if (accepted) {
			if (dse != null
					&& dae.getInitialLocation() != dae.getNextLocation()) {
				return context.fireDockableStateWillChange(dse);
			} else {
				return true;
			}
		} else {
			return false;
		}
	}

	private void fireDockingAction(DockingActionEvent dae,
			DockableStateChangeEvent dse) {
		context.fireDockingActionPerformed(dae);
		if (dse != null && dae.getInitialLocation() != dae.getNextLocation()) {
			context.fireDockableStateChange(dse);
		}