com.lowagie.rups.controller

## Class RupsController

- java.lang.Object
- - java.util.Observable
  - - com.lowagie.rups.controller.RupsController

- All Implemented Interfaces:
    PageSelectionListener, java.util.EventListener, javax.swing.event.TreeSelectionListener

      public class RupsController
      extends java.util.Observable
      implements javax.swing.event.TreeSelectionListener, PageSelectionListener

  This class controls all the GUI components that are shown in the RUPS application: the menu bar, the panels,...

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.swing.JSplitPane` | `masterComponent` Contains all other components: the page panel, the outline tree, etc.
    `protected RupsMenuBar` | `menuBar` The JMenuBar for the RUPS application.
    `protected PdfFile` | `pdfFile` The Pdf file that is currently open in the application.
    `protected PdfReaderController` | `readerController` Object with the GUI components for iText.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RupsController(java.awt.Dimension dimension)` Constructs the GUI components of the RUPS application.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Component` | `getMasterComponent()` Getter for the master component.
    `RupsMenuBar` | `getMenuBar()` Getter for the menubar.
    `int` | `gotoPage(int pageNumber)` Goes to a specific page number in a document.
    `void` | `notifyObservers(java.lang.Object obj)`
    `void` | `valueChanged(javax.swing.event.TreeSelectionEvent evt)`

    - ### Methods inherited from class java.util.Observable

      `addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### pdfFile

          protected PdfFile pdfFile

      The Pdf file that is currently open in the application.

    - #### readerController

          protected PdfReaderController readerController

      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)

    - #### menuBar

          protected RupsMenuBar menuBar

      The JMenuBar for the RUPS application.

    - #### masterComponent

          protected javax.swing.JSplitPane masterComponent

      Contains all other components: the page panel, the outline tree, etc.

  - ### Constructor Detail

    - #### RupsController

          public RupsController(java.awt.Dimension dimension)

      Constructs the GUI components of the RUPS application.

  - ### Method Detail

    - #### getMenuBar

          public RupsMenuBar getMenuBar()

      Getter for the menubar.

    - #### getMasterComponent

          public java.awt.Component getMasterComponent()

      Getter for the master component.

    - #### notifyObservers

          public void notifyObservers(java.lang.Object obj)

      Overrides:
        `notifyObservers` in class `java.util.Observable`
      See Also:
        `Observable.notifyObservers(java.lang.Object)`

    - #### valueChanged

          public void valueChanged(javax.swing.event.TreeSelectionEvent evt)

      Specified by:
        `valueChanged` in interface `javax.swing.event.TreeSelectionListener`
      See Also:
        `TreeSelectionListener.valueChanged(javax.swing.event.TreeSelectionEvent)`

    - #### gotoPage

          public int gotoPage(int pageNumber)

      Description copied from interface: `PageSelectionListener`
      Goes to a specific page number in a document.
      Specified by:
        `gotoPage` in interface `PageSelectionListener`
      Returns:
        the resulting page number. Can be different from pageNumber if pageNumber doesn't exist.
      See Also:
        `PageSelectionListener.gotoPage(int)`