class RupsController extends Observable
        implements TreeSelectionListener, PageSelectionListener {

    // member variables

    /* file and controller */
    /**
     * The Pdf file that is currently open in the application.
     */
    protected PdfFile pdfFile;
    /**
     * Object with the GUI components for iText.
     *
     * @since iText 5.0.0 (renamed from reader which was confusing because reader is normally used for a PdfReader
     * instance)
     */
    protected PdfReaderController readerController;

    /* main components */
    /**
     * The JMenuBar for the RUPS application.
     */
    protected RupsMenuBar menuBar;
    /**
     * Contains all other components: the page panel, the outline tree, etc.
     */
    protected JSplitPane masterComponent;

    // constructor

    /**
     * Constructs the GUI components of the RUPS application.
     *
     * @param dimension the Dimension of the GUi components
     */
    public RupsController(Dimension dimension) {
        // creating components and controllers
        menuBar = new RupsMenuBar(this);
        addObserver(menuBar);
        Console console = Console.getInstance();
        addObserver(console);
        readerController = new PdfReaderController(this, this);
        addObserver(readerController);

        // creating the master component
        masterComponent = new JSplitPane();
        masterComponent.setOrientation(JSplitPane.VERTICAL_SPLIT);
        masterComponent.setDividerLocation((int) (dimension.getHeight() * .70));
        masterComponent.setDividerSize(2);

        JSplitPane content = new JSplitPane();
        masterComponent.add(content, JSplitPane.TOP);
        JSplitPane info = new JSplitPane();
        masterComponent.add(info, JSplitPane.BOTTOM);

        content.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
        content.setDividerLocation((int) (dimension.getWidth() * .6));
        content.setDividerSize(1);
        content.add(new JScrollPane(readerController.getPdfTree()), JSplitPane.LEFT);
        content.add(readerController.getNavigationTabs(), JSplitPane.RIGHT);

        info.setDividerLocation((int) (dimension.getWidth() * .3));
        info.setDividerSize(1);
        info.add(readerController.getObjectPanel(), JSplitPane.LEFT);
        JTabbedPane editorPane = readerController.getEditorTabs();
        JScrollPane cons = new JScrollPane(console.getTextArea());
        editorPane.addTab("Console", null, cons, "Console window (System.out/System.err)");
        editorPane.setSelectedComponent(cons);
        info.add(editorPane, JSplitPane.RIGHT);

    }

    /**
     * Getter for the menubar.
     *
     * @return the menubar
     */
    public RupsMenuBar getMenuBar() {
        return menuBar;
    }

    /**
     * Getter for the master component.
     *
     * @return the master component
     */
    public Component getMasterComponent() {
        return masterComponent;
    }

    // Observable

    /**
     * @see java.util.Observable#notifyObservers(java.lang.Object)
     */
    @Override
    public void notifyObservers(Object obj) {<FILL_FUNCTION_BODY>}

    // tree selection

    /**
     * @see javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)
     */
    public void valueChanged(TreeSelectionEvent evt) {
        Object selectednode = readerController.getPdfTree().getLastSelectedPathComponent();
        if (selectednode instanceof PdfTrailerTreeNode) {
            menuBar.update(this, RupsMenuBar.FILE_MENU);
            return;
        }
        if (selectednode instanceof PdfObjectTreeNode) {
            readerController.update(this, selectednode);
        }
    }

    // page navigation

    /**
     * @see com.lowagie.rups.view.PageSelectionListener#gotoPage(int)
     */
    public int gotoPage(int pageNumber) {
        readerController.gotoPage(pageNumber);
        return pageNumber;
    }
}

        if (obj instanceof FileChooserAction) {
            File file = ((FileChooserAction) obj).getFile();
            try {
                pdfFile = new PdfFile(file);
                setChanged();
                super.notifyObservers(RupsMenuBar.OPEN);
                readerController.startObjectLoader(pdfFile);
            } catch (IOException | DocumentException ioe) {
                JOptionPane.showMessageDialog(masterComponent, ioe.getMessage(), "Dialog", JOptionPane.ERROR_MESSAGE);
            }
            return;
        }
        if (obj instanceof FileCloseAction) {
            pdfFile = null;
            setChanged();
            super.notifyObservers(RupsMenuBar.CLOSE);
            return;
        }
    
<methods>public void <init>() ,public synchronized void addObserver(java.util.Observer) ,public synchronized int countObservers() ,public synchronized void deleteObserver(java.util.Observer) ,public synchronized void deleteObservers() ,public synchronized boolean hasChanged() ,public void notifyObservers() ,public void notifyObservers(java.lang.Object) <variables>private boolean changed,private Vector<java.util.Observer> obs