com.lowagie.rups.controller

Class RupsController

public class RupsController extends Observable implements TreeSelectionListener, PageNavigationListener

This class controls all the GUI components that are shown in the Trapeze application: the menu bar, the panels,...
Field Summary
protected JSplitPanemasterComponent
Contains all other components: the page panel, the outline tree, etc.
protected RupsMenuBarmenuBar
The JMenuBar for the Trapeze application.
protected PdfFilepdfFile
The Pdf file that is currently open in the application.
protected PdfReaderControllerreader
Object with the GUI components for iText.
protected PdfRendererControllerrenderer
Object with the GUI components for SUN's PDF Renderer.
Constructor Summary
RupsController(Dimension dimension)
Constructs the GUI components of the Trapeze application.
Method Summary
intgetCurrentPageNumber()
ComponentgetMasterComponent()
Getter for the master component.
RupsMenuBargetMenuBar()
Getter for the menubar.
static JScrollPanegetScrollPane(Component component)
Adds a component to a ScrollPane.
intgetTotalNumberOfPages()
intgotoFirstPage()
intgotoLastPage()
intgotoNextPage()
intgotoPage(int pageNumber)
intgotoPreviousPage()
voidnotifyObservers(Object obj)
voidvalueChanged(TreeSelectionEvent evt)

Field Detail

masterComponent

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

menuBar

protected RupsMenuBar menuBar
The JMenuBar for the Trapeze application.

pdfFile

protected PdfFile pdfFile
The Pdf file that is currently open in the application.

reader

protected PdfReaderController reader
Object with the GUI components for iText.

renderer

protected PdfRendererController renderer
Object with the GUI components for SUN's PDF Renderer.

Constructor Detail

RupsController

public RupsController(Dimension dimension)
Constructs the GUI components of the Trapeze application.

Method Detail

getCurrentPageNumber

public int getCurrentPageNumber()

See Also: getCurrentPageNumber

getMasterComponent

public Component getMasterComponent()
Getter for the master component.

getMenuBar

public RupsMenuBar getMenuBar()
Getter for the menubar.

getScrollPane

public static JScrollPane getScrollPane(Component component)
Adds a component to a ScrollPane.

Parameters: component the component that has to be scrollable

Returns: a JScrollPane

Since: 2.1.0

getTotalNumberOfPages

public int getTotalNumberOfPages()

See Also: getTotalNumberOfPages

gotoFirstPage

public int gotoFirstPage()

See Also: gotoFirstPage

gotoLastPage

public int gotoLastPage()

See Also: gotoLastPage

gotoNextPage

public int gotoNextPage()

See Also: gotoNextPage

gotoPage

public int gotoPage(int pageNumber)

See Also: PageNavigationListener

gotoPreviousPage

public int gotoPreviousPage()

See Also: gotoPreviousPage

notifyObservers

void notifyObservers(Object obj)

See Also: java.util.Observable#notifyObservers(java.lang.Object)

valueChanged

public void valueChanged(TreeSelectionEvent evt)

See Also: javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)