eTextReader
Class DiscussionWindow

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by eTextReader.DiscussionWindow
All Implemented Interfaces:
InkCallback, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.HyperlinkListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class DiscussionWindow
extends javax.swing.JFrame
implements java.awt.event.ActionListener, javax.swing.event.HyperlinkListener, InkCallback

See Also:
Serialized Form

Nested Class Summary
(package private)  class DiscussionWindow.DiscussionNotationEventHandler
          This class extends OpenExternalPopupWindowHandler to ensure that the same discussion isn't opened more than once
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JButton backBtn
           
private  int bodyOffset
           
private  javax.swing.JScrollPane bodyPane
           
private  WrappedJTextArea bodyText
           
private  javax.swing.JButton cancelBtn
           
private  DBClient client
           
private  javax.swing.JMenuItem close
           
private  javax.swing.JButton closeBtn
           
(package private)  java.lang.String course
          Which course the textbook is currently dealing with
private static java.util.Map<java.lang.Integer,DiscussionWindow> currentDiscussionWindows
          Maintains a mapping of all currently open discussion windows, which allows us to pull up a previously existing window if the user tries to open a discussion that is already open
private  int currentIndex
           
private  java.util.Vector<Notation> discussionNotations
           
private  NotationEvent discussionStart
           
private  java.lang.String discussionURL
           
private  javax.swing.JComboBox discussionView
           
private  ContentPane editor
           
private  javax.swing.JMenu file
           
private  java.lang.String fragment
           
private  java.util.Vector groupLimitList
           
private  javax.swing.JCheckBox includeReply
           
(package private)  InkAnnotationWindow inkWindow
          Used to create ink discussion items
(package private)  Browser.LogListener loglistener
           
private  javax.swing.JMenuBar menu
           
private  javax.swing.text.Document message
           
private  javax.swing.JEditorPane messageBody
           
private  javax.swing.JLabel messageLabel
           
private  javax.swing.text.Document messageList
           
private  javax.swing.JPanel messagePanel
           
private  javax.swing.JSplitPane messageReply
           
private  javax.swing.JButton nextBtn
           
private  javax.swing.text.html.HTMLEditorKit overviewKit
           
private  PasteListener pastelisten
           
(package private)  DiscussionWindow.DiscussionNotationEventHandler popupHandler
          Used to handle annotations in our scrolling content pane
private  javax.swing.JButton postBtn
           
private  AnnotationShareBox recipientsBox
           
private  javax.swing.JButton replyAllBtn
           
private  javax.swing.JButton replyBtn
           
private  javax.swing.JPanel replyBtnPanel
           
private  javax.swing.JPanel replyForm
           
private  javax.swing.JButton returnBtn
           
private  ScrollingContentPane scrollingEditor
           
private  javax.swing.JScrollPane scrollMessage
           
private  javax.swing.JButton senderBtn
           
private  java.util.Vector shareSelected
           
private  javax.swing.JTextField subjectField
           
private  java.util.Vector targetSelected
           
private  javax.swing.Box toolbar
           
private  java.util.Vector userLimitList
           
private  javax.swing.JSplitPane window
          The discussion window
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DiscussionWindow(Browser.LogListener loglistener, java.lang.String course)
           
DiscussionWindow(NotationEvent ne, Browser.LogListener loglistener, java.lang.String course)
          Constructor for DiscussionWindow class
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent action)
          Implements the ActionListener for navigation buttons.
 void cannotContactServer(java.lang.Exception e)
          Called when the InkAnnotationWindow class cannot set up a connection with the windows server
 void changeDisplayType(Notation notation)
          Called when the annotation editor has requested that the user be allowed to change the display type of the specified annotation
 void changeShareWith(Notation notation)
          Called when the annotation editor has requested that the user be allowed to change who the specified annnotation is shared with
 void closeAnnotation(Notation notation, java.awt.Dimension size)
          Called when the annotation editor has requested that the currently edited annotation be closed
private  int commonNewPost(Notation newMessage, boolean load)
          sets up information about a new posting that is common to both the ink and the text posting methods.
private  void createContentPane()
          Creates content pane object to display the context of the discussion.
private  javax.swing.text.html.HTMLEditorKit createMessagePane()
          Creates and sets up message pane which will display information and text of each discussion message.
private  void createReplyPane()
          Creates and sets up reply pane which will allow the user to reply to a discussion message
 void deleteAnnotation(Notation notation, java.awt.Dimension size)
          Called when the annotation editor has requested the specified annotation to be deleted
private  void displayMessage(Notation msg, Notation prevMsg)
          Displays the header information and body of a message in the message detail window.
private  void displayNextMessage()
          Prepares the window to display the next message in the discussion.
private  void displayPreviousMessage()
          Prepares the window to display the previous message in the discussion.
private  OEBPackageFile getCurrentBook()
          Refactored method that eliminates a local package file reference and retrieves it from the user class
 int getCurrentNotationID()
           
private  java.lang.String getUserName()
          Refactored method that eliminates a local user name reference and retrieves it from the user class
private  ViewingPrefs getViewPrefs()
          Refactored method that eliminates a local ViewingPreferences reference and retrieves it from the user class
 void go(java.lang.String address)
          Loads a web page into the ContentPage object.
 void hyperlinkUpdate(javax.swing.event.HyperlinkEvent event)
          Processes all hyperlink events that occur in the discussion window.
private  boolean isInkAnnotation(Notation note)
           
private  void loadDiscussionMessages(NotationEvent start, Criteria select)
          Gets all messages in current discussion from the database and stores them in a Vector.
 java.lang.String makeHTML(java.util.Vector notations)
          Creates the html syntax necessary to display an overview of the messages in a discussion.
private  java.lang.String makeParagraphs(java.lang.String text)
          Makes HTML paragraphs out of plain text, replacing line breaks with end paragraph tags.
private  java.lang.String makeTableRow(java.lang.String label, java.lang.String labelAttrs, java.lang.String body, java.lang.String bodyAttrs)
          helper method for displayMessage that creates an HTML table row with one cell for a label, and one cell for the body
 void openDiscussion(NotationEvent ne)
           
private  boolean postNewMessage()
          Reconnects to the database and posts a new message to the end of the current discussion.
private  void postNotationModes(Notation newMessage)
          Posts the correct entries into the NotationModes table based on the type of reply.
static boolean queryCreateInkAnnotation()
           
private  void recipientsOK()
           
 void saveAnnotation(Notation notation, java.lang.String subject, byte[] isfData, byte[] pngData, java.awt.Dimension size)
          Called when the annotation editor has requested the specified annotation to be saved
 void setFontSize(float size)
           
private  void setRecipients(boolean replyToAuthor)
           
private  void setupInkAnnotation(Notation notation)
          called when we are creating a new reply.
 void setupReplyForm()
          Creates form into which user will enter a reply to a discussion.
 void showDetails(Notation notation)
          Called when the annotation editor has requested that the details of the specified annotation be shown
 void showRecipientsBox()
           
private  void showReplyForm()
           
private  void updateButtons()
          Reset enabled properties of back and next buttons, according to whether the current message is the beginning or the end of the discussion message Vector.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

currentDiscussionWindows

private static java.util.Map<java.lang.Integer,DiscussionWindow> currentDiscussionWindows
Maintains a mapping of all currently open discussion windows, which allows us to pull up a previously existing window if the user tries to open a discussion that is already open


window

private javax.swing.JSplitPane window
The discussion window


editor

private ContentPane editor

scrollingEditor

private ScrollingContentPane scrollingEditor

messagePanel

private javax.swing.JPanel messagePanel

messageReply

private javax.swing.JSplitPane messageReply

scrollMessage

private javax.swing.JScrollPane scrollMessage

overviewKit

private javax.swing.text.html.HTMLEditorKit overviewKit

messageBody

private javax.swing.JEditorPane messageBody

messageList

private javax.swing.text.Document messageList

message

private javax.swing.text.Document message

replyBtnPanel

private javax.swing.JPanel replyBtnPanel

replyForm

private javax.swing.JPanel replyForm

bodyOffset

private int bodyOffset

toolbar

private javax.swing.Box toolbar

nextBtn

private javax.swing.JButton nextBtn

backBtn

private javax.swing.JButton backBtn

replyBtn

private javax.swing.JButton replyBtn

replyAllBtn

private javax.swing.JButton replyAllBtn

returnBtn

private javax.swing.JButton returnBtn

senderBtn

private javax.swing.JButton senderBtn

closeBtn

private javax.swing.JButton closeBtn

includeReply

private javax.swing.JCheckBox includeReply

discussionView

private javax.swing.JComboBox discussionView

messageLabel

private javax.swing.JLabel messageLabel

menu

private javax.swing.JMenuBar menu

file

private javax.swing.JMenu file

close

private javax.swing.JMenuItem close

client

private DBClient client

discussionStart

private NotationEvent discussionStart

discussionURL

private java.lang.String discussionURL

fragment

private java.lang.String fragment

discussionNotations

private java.util.Vector<Notation> discussionNotations

currentIndex

private int currentIndex

popupHandler

DiscussionWindow.DiscussionNotationEventHandler popupHandler
Used to handle annotations in our scrolling content pane


subjectField

private javax.swing.JTextField subjectField

bodyText

private WrappedJTextArea bodyText

bodyPane

private javax.swing.JScrollPane bodyPane

postBtn

private javax.swing.JButton postBtn

cancelBtn

private javax.swing.JButton cancelBtn

recipientsBox

private AnnotationShareBox recipientsBox

shareSelected

private java.util.Vector shareSelected

targetSelected

private java.util.Vector targetSelected

userLimitList

private java.util.Vector userLimitList

groupLimitList

private java.util.Vector groupLimitList

pastelisten

private PasteListener pastelisten

loglistener

Browser.LogListener loglistener

inkWindow

InkAnnotationWindow inkWindow
Used to create ink discussion items


course

java.lang.String course
Which course the textbook is currently dealing with

Constructor Detail

DiscussionWindow

public DiscussionWindow(Browser.LogListener loglistener,
                        java.lang.String course)

DiscussionWindow

public DiscussionWindow(NotationEvent ne,
                        Browser.LogListener loglistener,
                        java.lang.String course)
Constructor for DiscussionWindow class

Method Detail

openDiscussion

public void openDiscussion(NotationEvent ne)

createContentPane

private void createContentPane()
Creates content pane object to display the context of the discussion.


createReplyPane

private void createReplyPane()
Creates and sets up reply pane which will allow the user to reply to a discussion message


createMessagePane

private javax.swing.text.html.HTMLEditorKit createMessagePane()
Creates and sets up message pane which will display information and text of each discussion message. Also sets up for displaying an overview of the entire discussion.


setupReplyForm

public void setupReplyForm()
Creates form into which user will enter a reply to a discussion.


recipientsOK

private void recipientsOK()

showRecipientsBox

public void showRecipientsBox()

makeHTML

public java.lang.String makeHTML(java.util.Vector notations)
Creates the html syntax necessary to display an overview of the messages in a discussion.

Parameters:
notations - the Vector of messages that make up the discussion.
Returns:
html the formatted html

displayNextMessage

private void displayNextMessage()
Prepares the window to display the next message in the discussion. Handles updating message label, navigation buttons, etc.


displayPreviousMessage

private void displayPreviousMessage()
Prepares the window to display the previous message in the discussion. Handles updating message label, navigation buttons, etc.


makeTableRow

private java.lang.String makeTableRow(java.lang.String label,
                                      java.lang.String labelAttrs,
                                      java.lang.String body,
                                      java.lang.String bodyAttrs)
helper method for displayMessage that creates an HTML table row with one cell for a label, and one cell for the body


displayMessage

private void displayMessage(Notation msg,
                            Notation prevMsg)
                     throws javax.swing.text.BadLocationException
Displays the header information and body of a message in the message detail window.

Parameters:
msg - the Notation containing the information for the message to be displayed.
Throws:
javax.swing.text.BadLocationException - thrown if we try to insert text/html at an invalid location in the Document

makeParagraphs

private java.lang.String makeParagraphs(java.lang.String text)
Makes HTML paragraphs out of plain text, replacing line breaks with end paragraph tags. Necessary because the editing of discussions is done in a JTextArea, but we are always displaying them as HTML now. Using PRE doesn't work, because if a long message is created (which is wrapped by the editor, making it look fine to the author), it will display as one big long line in the DiscussionWindow, which is less than appealing


updateButtons

private void updateButtons()
Reset enabled properties of back and next buttons, according to whether the current message is the beginning or the end of the discussion message Vector.


loadDiscussionMessages

private void loadDiscussionMessages(NotationEvent start,
                                    Criteria select)
Gets all messages in current discussion from the database and stores them in a Vector.

Parameters:
start - the NotationEvent that was clicked to open the discussion window.

postNewMessage

private boolean postNewMessage()
Reconnects to the database and posts a new message to the end of the current discussion. The message data is read from the reply form. The updated discussion is reloaded from the database and redisplayed.

Returns:
true if message has been successfully posted. false if user desires to change message data before posting.

commonNewPost

private int commonNewPost(Notation newMessage,
                          boolean load)
sets up information about a new posting that is common to both the ink and the text posting methods.

Parameters:
newMessage - a notation object that will be modified to contain the appropriate information
load - if true, the discussion will be loaded into the list, otherwise it won't (used to only look at one version of the message for an ink posting)
Returns:
the id of the posted annotation

postNotationModes

private void postNotationModes(Notation newMessage)
Posts the correct entries into the NotationModes table based on the type of reply. Shared by both the ink and text posting methods Note that it is required that newMessage have already been posted to the database and contain an id attribute


hyperlinkUpdate

public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent event)
Processes all hyperlink events that occur in the discussion window. Is used to display a specific message directly from the discussion overview document.

Specified by:
hyperlinkUpdate in interface javax.swing.event.HyperlinkListener
Parameters:
event - the hyperlink event being processed.

go

public void go(java.lang.String address)
Loads a web page into the ContentPage object.

Parameters:
address - the web page to be loaded

showReplyForm

private void showReplyForm()

setRecipients

private void setRecipients(boolean replyToAuthor)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent action)
Implements the ActionListener for navigation buttons. Allows user to change discussion view, etc.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
action - action performed by user

queryCreateInkAnnotation

public static boolean queryCreateInkAnnotation()

setupInkAnnotation

private void setupInkAnnotation(Notation notation)
called when we are creating a new reply. Note that you can not edit discussion postings, so this will always be a new notation


isInkAnnotation

private boolean isInkAnnotation(Notation note)

setFontSize

public void setFontSize(float size)

getCurrentNotationID

public int getCurrentNotationID()

saveAnnotation

public void saveAnnotation(Notation notation,
                           java.lang.String subject,
                           byte[] isfData,
                           byte[] pngData,
                           java.awt.Dimension size)
Called when the annotation editor has requested the specified annotation to be saved

Specified by:
saveAnnotation in interface InkCallback
Parameters:
notation -

deleteAnnotation

public void deleteAnnotation(Notation notation,
                             java.awt.Dimension size)
Called when the annotation editor has requested the specified annotation to be deleted

Specified by:
deleteAnnotation in interface InkCallback

showDetails

public void showDetails(Notation notation)
Called when the annotation editor has requested that the details of the specified annotation be shown

Specified by:
showDetails in interface InkCallback

changeShareWith

public void changeShareWith(Notation notation)
Called when the annotation editor has requested that the user be allowed to change who the specified annnotation is shared with

Specified by:
changeShareWith in interface InkCallback

closeAnnotation

public void closeAnnotation(Notation notation,
                            java.awt.Dimension size)
Called when the annotation editor has requested that the currently edited annotation be closed

Specified by:
closeAnnotation in interface InkCallback

changeDisplayType

public void changeDisplayType(Notation notation)
Description copied from interface: InkCallback
Called when the annotation editor has requested that the user be allowed to change the display type of the specified annotation

Specified by:
changeDisplayType in interface InkCallback

cannotContactServer

public void cannotContactServer(java.lang.Exception e)
Called when the InkAnnotationWindow class cannot set up a connection with the windows server

Specified by:
cannotContactServer in interface InkCallback
Parameters:
e - an exception describing the problem

getCurrentBook

private OEBPackageFile getCurrentBook()
Refactored method that eliminates a local package file reference and retrieves it from the user class

Returns:
the OEBPackageFile object associated with the current user

getViewPrefs

private ViewingPrefs getViewPrefs()
Refactored method that eliminates a local ViewingPreferences reference and retrieves it from the user class

Returns:
the ViewingPrefs object associated with the current user

getUserName

private java.lang.String getUserName()
Refactored method that eliminates a local user name reference and retrieves it from the user class

Returns:
the current user's user name