public class RupsController extends Observable implements TreeSelectionListener, PageNavigationListener
| Modifier and Type | Field and Description |
|---|---|
protected JSplitPane |
masterComponent
Contains all other components: the page panel, the outline tree, etc.
|
protected RupsMenuBar |
menuBar
The JMenuBar for the Trapeze application.
|
protected PdfFile |
pdfFile
The Pdf file that is currently open in the application.
|
protected PdfReaderController |
reader
Object with the GUI components for iText.
|
protected PdfRendererController |
renderer
Object with the GUI components for SUN's PDF Renderer.
|
| Constructor and Description |
|---|
RupsController(Dimension dimension)
Constructs the GUI components of the Trapeze application.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentPageNumber()
Returns the current page number of a document.
|
Component |
getMasterComponent()
Getter for the master component.
|
RupsMenuBar |
getMenuBar()
Getter for the menubar.
|
static JScrollPane |
getScrollPane(Component component)
Adds a component to a ScrollPane.
|
int |
getTotalNumberOfPages()
Returns the total number of pages in a document.
|
int |
gotoFirstPage()
Goes to the first page in a document.
|
int |
gotoLastPage()
Goes to the last page in a document.
|
int |
gotoNextPage()
Goes to the previous page in a document.
|
int |
gotoPage(int pageNumber)
Goes to a specific page number in a document.
|
int |
gotoPreviousPage()
Goes to the previous page in a document.
|
void |
notifyObservers(Object obj) |
void |
valueChanged(TreeSelectionEvent evt) |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChangedprotected PdfFile pdfFile
protected RupsMenuBar menuBar
protected JSplitPane masterComponent
protected PdfRendererController renderer
protected PdfReaderController reader
public RupsController(Dimension dimension)
public RupsMenuBar getMenuBar()
public Component getMasterComponent()
public void notifyObservers(Object obj)
notifyObservers in class ObservableObservable.notifyObservers(java.lang.Object)public void valueChanged(TreeSelectionEvent evt)
valueChanged in interface TreeSelectionListenerTreeSelectionListener.valueChanged(javax.swing.event.TreeSelectionEvent)public int getCurrentPageNumber()
PageNavigationListenergetCurrentPageNumber in interface PageNavigationListenerPageNavigationListener.getCurrentPageNumber()public int getTotalNumberOfPages()
PageNavigationListenergetTotalNumberOfPages in interface PageNavigationListenerPageNavigationListener.getTotalNumberOfPages()public int gotoFirstPage()
PageNavigationListenergotoFirstPage in interface PageNavigationListenerPageNavigationListener.gotoFirstPage()public int gotoPreviousPage()
PageNavigationListenergotoPreviousPage in interface PageNavigationListenerPageNavigationListener.gotoPreviousPage()public int gotoPage(int pageNumber)
PageNavigationListenergotoPage in interface PageNavigationListenerPageNavigationListener.gotoPage(int)public int gotoNextPage()
PageNavigationListenergotoNextPage in interface PageNavigationListenerPageNavigationListener.gotoNextPage()public int gotoLastPage()
PageNavigationListenergotoLastPage in interface PageNavigationListenerPageNavigationListener.gotoLastPage()public static JScrollPane getScrollPane(Component component)
component - the component that has to be scrollable