*/
public RupsController(Dimension dimension) {
// creating components and controllers
menuBar = new RupsMenuBar(this);
addObserver(menuBar);
Console console = Console.getInstance();
addObserver(console);
renderer = new PdfRendererController(this);
addObserver(renderer);
reader = new PdfReaderController(this, this);
addObserver(reader);
// creating the master component
masterComponent = new JSplitPane();
masterComponent.setOrientation(JSplitPane.VERTICAL_SPLIT);
masterComponent.setDividerLocation((int)(dimension.getHeight() * .70));
masterComponent.setDividerSize(2);
JSplitPane content = new JSplitPane();
masterComponent.add(content, JSplitPane.TOP);
JSplitPane info = new JSplitPane();
masterComponent.add(info, JSplitPane.BOTTOM);
content.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
content.setDividerLocation((int)(dimension.getWidth() * .75));
content.setDividerSize(1);
JSplitPane viewers = new JSplitPane();
content.add(viewers, JSplitPane.LEFT);
content.add(reader.getNavigationTabs(), JSplitPane.RIGHT);
viewers.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
viewers.setDividerLocation((int)(dimension.getWidth() * .35));
viewers.setDividerSize(1);
viewers.add(renderer, JSplitPane.RIGHT);
viewers.add(RupsController.getScrollPane(reader.getPdfTree()), JSplitPane.LEFT);
info.setDividerLocation((int) (dimension.getWidth() * .3));
info.setDividerSize(1);
info.add(reader.getObjectPanel(), JSplitPane.LEFT);
JTabbedPane editorPane = reader.getEditorTabs();
JScrollPane cons = RupsController.getScrollPane(console.getTextArea());
editorPane.addTab("Console", null, cons, "Console window (System.out/System.err)");
editorPane.setSelectedComponent(cons);
info.add(editorPane, JSplitPane.RIGHT);
}