Package 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 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 Description RupsController(java.awt.Dimension dimension)
Constructs the GUI components of the RUPS application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
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.
-
-
Method Detail
-
getMenuBar
public RupsMenuBar getMenuBar()
Getter for the menubar.- Returns:
- the menubar
-
getMasterComponent
public java.awt.Component getMasterComponent()
Getter for the master component.- Returns:
- the master component
-
notifyObservers
public void notifyObservers(java.lang.Object obj)
- Overrides:
notifyObservers
in classjava.util.Observable
- See Also:
Observable.notifyObservers(java.lang.Object)
-
valueChanged
public void valueChanged(javax.swing.event.TreeSelectionEvent evt)
- Specified by:
valueChanged
in interfacejavax.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 interfacePageSelectionListener
- Parameters:
pageNumber
- the page number to go to- Returns:
- the resulting page number. Can be different from pageNumber if pageNumber doesn't exist.
- See Also:
PageSelectionListener.gotoPage(int)
-
-