|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
eTextReader.ScrollingContentPane
public class ScrollingContentPane
Nested Class Summary | |
---|---|
(package private) class |
ScrollingContentPane.gotoAddressThread
|
Nested classes/interfaces inherited from class javax.swing.JScrollPane |
---|
javax.swing.JScrollPane.AccessibleJScrollPane, javax.swing.JScrollPane.ScrollBar |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
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 ContentPane |
content
|
private javax.swing.JViewport |
contentView
|
private java.util.Vector |
docListeners
|
private eTextReader.loggingInterface.Logger |
log
|
private Browser.LogListener |
loglistener
|
private Browser.LogListener.PageScrollListener |
pagescrolllistener
|
private PasteListener |
pastelisten
|
private boolean |
popupsEnabled
|
(package private) PopupWindowNotationHandler |
popupWindowHandler
Facilitates popping up QuickNoteWindows when the mouse is over an annotation |
private java.util.Vector |
scrollListeners
|
private int |
viewableThreshold
|
Fields inherited from class javax.swing.JScrollPane |
---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.ScrollPaneConstants |
---|
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ScrollingContentPane(ContentPane content,
int vertBar,
int horizBar,
Browser.LogListener loglistener)
|
|
ScrollingContentPane(ContentPane content,
int vertBar,
int horizBar,
Browser.LogListener loglistener,
Browser.LogListener.PageScrollListener pagescrolllistener)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addDocEventListener(java.lang.Object listener)
|
void |
addScrollEventListener(java.lang.Object listener)
|
protected boolean |
completelyVisible(int offset)
determines whether the character located at offset is completely visible (vertically) in the current viewport |
void |
disableTypes(Notation.AnnotationType[] types,
boolean enableOthers)
Delegate method for the popupWindowHandler method of the same name |
void |
enableTypes(Notation.AnnotationType[] types,
boolean disableOthers)
Delegate method for the popupWindowHandler method of the same name |
protected int |
ensureVisibleBottom(int offset)
scrolls the viewport so that offset is completely visible at the bottom of the content pane |
void |
fireDocEvent(DocEvent de)
|
void |
fireScrollEvent(ScrollEvent se)
|
ContentPane |
getContent()
|
float |
getFontSize()
|
void |
gotoAddress(java.lang.String address)
scrolls the document so that the position requested is at the top of the ContentPane |
boolean |
isPopupsEnabled()
Determines whether or not popup windows are shown when the mouse hovers over an annotation icon |
boolean |
isTypeEnabled(Notation.AnnotationType type)
Delegate method for the popupWindowHandler method of the same name |
protected boolean |
largerThanViewport(int offset)
determines whether the element represented by offset is larger than the currently viewable content area. |
void |
scrollEventOccurred(ScrollEvent se)
|
protected void |
scrollPage(java.lang.String direction)
moves to the next or previous page in the current document. |
void |
setPage(java.lang.String address)
|
void |
setPage(java.lang.String address,
boolean reload)
loads a new page and notifies listeners when loading is complete. |
void |
setPopupsEnabled(boolean popupsEnabled)
Specifies whether or not popup windows are shown when the mouse hovers over an annotation icon |
void |
setViewableThreshold(int newThreshold)
sets the number of pixels by which a character can exceed the viewable windows bounds before it is determined to be not completely visible |
Methods inherited from class javax.swing.JScrollPane |
---|
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private javax.swing.JViewport contentView
private java.util.Vector scrollListeners
private java.util.Vector docListeners
private eTextReader.loggingInterface.Logger log
PopupWindowNotationHandler popupWindowHandler
private boolean popupsEnabled
private ContentPane content
private Browser.LogListener loglistener
private PasteListener pastelisten
private Browser.LogListener.PageScrollListener pagescrolllistener
private int viewableThreshold
Constructor Detail |
---|
public ScrollingContentPane(ContentPane content, int vertBar, int horizBar, Browser.LogListener loglistener, Browser.LogListener.PageScrollListener pagescrolllistener)
public ScrollingContentPane(ContentPane content, int vertBar, int horizBar, Browser.LogListener loglistener)
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public float getFontSize()
public void addScrollEventListener(java.lang.Object listener)
public void fireScrollEvent(ScrollEvent se)
public void scrollEventOccurred(ScrollEvent se)
scrollEventOccurred
in interface ScrollEventListener
public void addDocEventListener(java.lang.Object listener)
public void fireDocEvent(DocEvent de)
public ContentPane getContent()
public void setViewableThreshold(int newThreshold)
newThreshold
- new value for threshold valuecompletelyVisible(int)
protected void scrollPage(java.lang.String direction)
getTextExtentSize
method of the JViewport class. If the top (bottom) of the
document is currently being displayed when the user attempts
to scroll up (down), the previous (next) document in the current
publication is displayed
direction
- the direction in which to scroll; valid values
are PageScrollButton.PAGE_UP and PageScrollButton.PAGE_DOWNprotected boolean largerThanViewport(int offset) throws javax.swing.text.BadLocationException
offset
- the offset in question
javax.swing.text.BadLocationException
- if the offset does not represent
a valid location in the current documentprotected boolean completelyVisible(int offset) throws javax.swing.text.BadLocationException
offset
- a character offset into the content
javax.swing.text.BadLocationException
- if offset is an invalid
location in the current documentJViewport.getViewRect()
,
setViewableThreshold(int)
protected int ensureVisibleBottom(int offset) throws javax.swing.text.BadLocationException
offset
- the offset into the content to make visible
javax.swing.text.BadLocationException
- if offset is an invalid
location in the current documentpublic void gotoAddress(java.lang.String address)
address
- the address identifying the offset in questionpublic void setPage(java.lang.String address)
public void setPage(java.lang.String address, boolean reload)
address
- the page to loadreload
- if the currently displayed page and the specified address
are the same, true causes the page to reloadpublic boolean isPopupsEnabled()
public void setPopupsEnabled(boolean popupsEnabled)
popupsEnabled
- public void disableTypes(Notation.AnnotationType[] types, boolean enableOthers)
PopupWindowNotationHandler.disableTypes(eTextReader.clientInterface.Notation.AnnotationType[], boolean)
public void enableTypes(Notation.AnnotationType[] types, boolean disableOthers)
types
- disableOthers
- PopupWindowNotationHandler#enableTypes(AnnotationType[], boolean)
public boolean isTypeEnabled(Notation.AnnotationType type)
type
-
PopupWindowNotationHandler#isTypeEnabled(AnnotationType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |