@Override
	public void endSetup(Attributes atts) {
		// Set the Window Location.
		// Get Main Window Dimension out of the prefs.
		PreferenceInt pWidth = Preferences.getPreferenceInt(Preferences.MAIN_WINDOW_W);
		PreferenceInt pHeight = Preferences.getPreferenceInt(Preferences.MAIN_WINDOW_H);
		PreferenceInt pInitialPositionX = Preferences.getPreferenceInt(Preferences.MAIN_WINDOW_X);
		PreferenceInt pInitialPositionY = Preferences.getPreferenceInt(Preferences.MAIN_WINDOW_Y);

		int minimumWidth = ((IntRangeValidator) pWidth.getValidator()).getMin();
		int minimumHeight = ((IntRangeValidator) pHeight.getValidator()).getMin();
		int minimumInitialPositionX = ((IntRangeValidator) pInitialPositionX.getValidator()).getMin();
		int minimumInitialPositionY = ((IntRangeValidator) pInitialPositionY.getValidator()).getMin();

		int initialWidth = pWidth.cur;
		int initialHeight = pHeight.cur;
		int initialPositionX = pInitialPositionX.cur;
		int initialPositionY = pInitialPositionY.cur;

		// Make sure initial position isn't off screen, or even really close to
		// the edge.
		int bottom_left_inset = 100;
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

		if (initialPositionX < minimumInitialPositionX) {
			initialPositionX = minimumInitialPositionX;
		}

		if (initialPositionX > (screenSize.width - bottom_left_inset)) {
			initialPositionX = screenSize.width - bottom_left_inset;
		}

		if (initialPositionY < minimumInitialPositionY) {
			initialPositionY = minimumInitialPositionY;
		}

		if (initialPositionY > (screenSize.height - bottom_left_inset)) {
			initialPositionY = screenSize.height - bottom_left_inset;
		}

		setLocation(initialPositionX, initialPositionY);

		addComponentListener(new WindowSizeManager(initialWidth, initialHeight, minimumWidth, minimumHeight));
		addWindowListener(new WindowAdapter() {
                        @Override
			public void windowClosing(WindowEvent e) {
				QuitMenuItem item = (QuitMenuItem) GUITreeLoader.reg.get(GUITreeComponentRegistry.QUIT_MENU_ITEM);
				item.quit();
			}
		});

		setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

		// Setup Desktop ScrollPane and set the ContentPane.
		jsp = new JScrollPane(desktop, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		jsp.addComponentListener(new DesktopScrollPaneComponentListener());
		setContentPane(jsp);

		// Set Frame Icon
		ImageIcon icon = new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("graphics/frame_icon.gif"));
		setIconImage(icon.getImage());

		// Initialize open/save_as/export/export_selection menus.
		fileProtocolManager.synchronizeDefault();
		fileProtocolManager.synchronizeMenus();

		// Setup the FindReplaceResultsDialog
		findReplaceResultsDialog = new FindReplaceResultsDialog();

		// Apply the Preference Settings
		Preferences.applyCurrentToApplication();

		setVisible(true); // Seems OK to do this now rather than at the end of
							// this method.

		Outliner.html_viewer = new HTMLViewerDialog();

		// Get rid of Splash Screen
		//Outliner.splash.dispose();

		// Generate Icons
		OutlineButton.createIcons();
	}