         self.arrangesAllSubviews = true
     }
     
-        
     // MARK: - Overrides
     
     override public var postsFrameChangedNotifications: Bool {

        return false
    }
    
    public override func viewDidMoveToWindow() {
        super.viewDidMoveToWindow()
        if (self.selectedPaneView == nil) {
            self.select(paneView: self.lastSubPaneView())
        }
    }
    
    // MARK: - Selection

    public override func mouseUp(theEvent: NSEvent) {
        let downPoint = self.convertPoint(theEvent.locationInWindow, fromView:nil)
        self.select(paneView: self.allSubPaneViews().filter({ NSPointInRect(downPoint, $0.frame) }).first)
        super.mouseUp(theEvent)
    }
    
    private func select(paneView pane: PaneView?) {
        self.selectedPaneView = pane
        for subPaneView in self.allSubPaneViews() { subPaneView.select(subPaneView == pane) }
        self.window?.makeFirstResponder(pane)
    }
    
    // MARK: - Adding & Removing Subviews

    public func canAddSubview(vertically: Bool) -> Bool {
        guard self.delegate != nil, let delegate = self.delegate as! PressureSplitViewDelegate? else {
            return true
        }
        
        let viewCount = max(1, (vertically == true) ? self.horizontalPressure : self.verticalPressure)
        let minimumCurrentExtension = CGFloat(viewCount) * ((vertically == true) ? delegate.minimumWidth : delegate.minimumHeight)
        let minimumAdditionalExtension = (vertically == true) ? delegate.minimumWidth : delegate.minimumHeight;
        let currentExtension = (vertically == true) ? CGRectGetWidth(self.frame) : CGRectGetHeight(self.frame);
        
        return (currentExtension - minimumCurrentExtension >= minimumAdditionalExtension);
    }

    override public func addSubview(view: NSView) {
        super.addSubview(view);
        if view.isKindOfClass(PaneView) {
            self.updatePressuresWithView(view, sign:1);
        }
    }

    override public func addSubview(view: NSView, positioned place: NSWindowOrderingMode, relativeTo otherView: NSView?) {
        super.addSubview(view, positioned: place, relativeTo: otherView)
        if view.isKindOfClass(PaneView) {
            self.updatePressuresWithView(view, sign: 1);
        }
    }
    
    override public func addArrangedSubview(view: NSView) {
        super.addArrangedSubview(view)
        if view.isKindOfClass(PaneView) {
            self.updatePressuresWithView(view, sign: 1)
        }
    }
    
    override public func insertArrangedSubview(view: NSView, atIndex index: Int) {
        super.insertArrangedSubview(view, atIndex: index)
        if view.isKindOfClass(PaneView) {
            self.updatePressuresWithView(view, sign: 1)
        }
    }
    
    private func updatePressuresWithView(view: NSView, sign: Int) {
        // I'm sure there must be something a lot simpler for this.
        if (self.vertical) {
            self.horizontalPressure += sign
            if view.isKindOfClass(NSSplitView) {
                let sv = view as! NSSplitView
                self.verticalPressure += sign*sv.subviews.count
            }
        }
        else {
            self.verticalPressure += sign
            if view.isKindOfClass(NSSplitView) {
                let sv = view as! NSSplitView
                self.horizontalPressure += sign*sv.subviews.count
            }
        }
    }
    
    override public func removeArrangedSubview(view: NSView) {
        super.removeArrangedSubview(view)
        self.updatePressuresWithView(view, sign: -1)
    }

    // MARK: - Close & Split

    func close(paneView pane: PaneView) {
        if self.allSubPaneViews().count == 1 {
            let alert = NSAlert()
            alert.alertStyle = .WarningAlertStyle
            alert.messageText = NSLocalizedString("Be careful!", comment: "")

        let optionsKey = NSEventModifierFlags(rawValue: theEvent!.modifierFlags.rawValue & NSEventModifierFlags.AlternateKeyMask.rawValue)
        let vertical = (optionsKey == .AlternateKeyMask)
        
        if self.canAddSubview() == true {
            self.splitPaneView(pane, vertically: vertical)
        }
        else {
