@Override
	public void activateFrame(JInternalFrame f) {
		if (activationBlock) {return;}
		
		//System.out.println("activateFrame " + f.getTitle());
		super.activateFrame(f);
		
		
		if (f instanceof Document) {
			Outliner.documents.setMostRecentDocumentTouched((Document) f);
		}
		
		// Move the internalframe back so it's visible if it's outside the visible rect.
		Rectangle r = Outliner.jsp.getViewport().getViewRect();
		Rectangle r2 = f.getBounds();
		
		if (!r.intersects(r2)) {
			setBoundsForFrame(f, r.x + 5, r.y + 5, f.getWidth(), f.getHeight());			
		}
	}