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, setChanged
protected 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 Observable
Observable.notifyObservers(java.lang.Object)
public void valueChanged(TreeSelectionEvent evt)
valueChanged
in interface TreeSelectionListener
TreeSelectionListener.valueChanged(javax.swing.event.TreeSelectionEvent)
public int getCurrentPageNumber()
PageNavigationListener
getCurrentPageNumber
in interface PageNavigationListener
PageNavigationListener.getCurrentPageNumber()
public int getTotalNumberOfPages()
PageNavigationListener
getTotalNumberOfPages
in interface PageNavigationListener
PageNavigationListener.getTotalNumberOfPages()
public int gotoFirstPage()
PageNavigationListener
gotoFirstPage
in interface PageNavigationListener
PageNavigationListener.gotoFirstPage()
public int gotoPreviousPage()
PageNavigationListener
gotoPreviousPage
in interface PageNavigationListener
PageNavigationListener.gotoPreviousPage()
public int gotoPage(int pageNumber)
PageNavigationListener
gotoPage
in interface PageNavigationListener
PageNavigationListener.gotoPage(int)
public int gotoNextPage()
PageNavigationListener
gotoNextPage
in interface PageNavigationListener
PageNavigationListener.gotoNextPage()
public int gotoLastPage()
PageNavigationListener
gotoLastPage
in interface PageNavigationListener
PageNavigationListener.gotoLastPage()
public static JScrollPane getScrollPane(Component component)
component
- the component that has to be scrollable