|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
eTextReader.AnnotationListing.NotationListing
public class NotationListing
A class to display annotations in a tabular form with the added abilities to sort and filter by various criteria. NotationListing delegates responsibility for obtaining the list of annotations to be displayed to two objects. The first, an implementation of the NotationProvider interface, determines the set of pages for which annotations should be shown. The second, an implementation of the NotationFilter interface, determines which annotations on the elibible pages should be displayed.
Nested Class Summary | |
---|---|
private static class |
NotationListing.Arrow
Creates small arrow-shaped icons to indicate sorting status in the column headers |
class |
NotationListing.MouseHandler
A custom MouseAdapter ( MouseListener ) class providing the capability to resort
the table simply by left or right clicking on column headers. |
class |
NotationListing.NotationCellEditor
This class is used in place of the CellEditor typically used by JTable |
class |
NotationListing.NotationCellRenderer
This class is used in place of the TableCellRenderer typically used by JTable facilitating the display of different notation types within the table. |
class |
NotationListing.NotationComparator
A custom comparator class that facilitates sorting based on primary and secondary sorting criteria. |
(package private) class |
NotationListing.notationLoadingThread
This class exists so that the process of loading notations can take place in a separate thread, allowing the event dispatch thread to continue to update the screen GUI |
private class |
NotationListing.SortableHeaderRenderer
This class is used in place of the TableCellRenderer typically used by JTable facilitating the display of arrows in the column header to indicate sorting order(s). |
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 java.util.ArrayList |
allNotations
|
private OEBPackageFile |
book
|
private javax.swing.Box |
bottomBox
|
private javax.swing.Box |
buttonBox
|
private DBClient |
client
|
private javax.swing.JPanel |
column
|
private java.util.ArrayList |
columnChecks
|
private javax.swing.table.DefaultTableColumnModel |
columnModel
|
private java.util.Vector<java.lang.String> |
columnNames
|
private ViewingPrefs |
columnPrefs
|
private ContentContainer |
container
|
private NotationInfo |
currentInfo
|
private CustomJTable |
display
|
private java.util.ArrayList |
displayedNotations
|
private javax.swing.table.DefaultTableModel |
displayModel
|
private java.util.HashMap |
elementMap
|
private java.lang.String |
endDate
|
private javax.swing.JPanel |
filter
|
private javax.swing.JPanel |
filterOptionsPanel
|
private boolean |
filterOptionsVisible
Keeps track of whether the filter options pane is currently visible |
private javax.swing.table.JTableHeader |
header
|
private HTMLTitleHandler |
HTMLth
|
private NotationListing.notationLoadingThread |
loadThread
|
private eTextReader.loggingInterface.Logger |
logger
|
private Browser.LogListener |
loglistener
|
private javax.swing.JSplitPane |
mainSplit
|
private NotationListing.NotationComparator |
nc
|
private NotationFilter |
notationFilter
|
private NotationProvider |
notationProvider
|
private java.util.ArrayList |
prefsCheckboxes
|
private boolean |
psortasc
|
private java.util.HashMap |
removedColumns
|
private ScrollingContentPane |
scrollNotationPane
|
private java.util.HashMap<java.lang.String,java.lang.String> |
sortingStatus
the primary and secondary sorting column names |
private java.util.HashMap<java.lang.String,java.lang.Integer> |
sortMap
|
private java.util.Iterator |
spineIterator
|
private boolean |
ssortasc
|
private java.lang.String |
startDate
|
private javax.swing.JButton |
toggleFilterButton
controls whether or not the filterOptionsPanel is showing |
private java.lang.String |
userName
|
private ViewingPrefs |
viewPrefs
|
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 | |
---|---|
NotationListing(Browser b,
java.lang.String startDate,
java.lang.String endDate,
Browser.LogListener loglistener)
Constructs a NotationListing object from the given parameters |
|
NotationListing(ContentContainer _container,
NotationProvider provider,
NotationFilter filter,
Browser.LogListener logListener)
|
|
NotationListing(ContentContainer _container,
NotationProvider provider,
NotationFilter filter,
Browser.LogListener logListener,
boolean showFilterOptionsInitially)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Performs all the actions associated with the diffent buttons and menus of this component |
private java.lang.String |
computeNetworkURL(java.lang.String url)
This method computes what the correct URL would be to load a page associated with the given annotation URL. |
private javax.swing.Icon |
getHeaderRendererIcon(java.lang.String headerName,
int size)
|
NotationFilter |
getNotationFilter()
Retrives the NotationFilter currently filtering the set of notations contained on the candidate pages |
NotationProvider |
getNotationProvider()
Retrieves the NotationProvider currently supplying the set of candidate pages to this NotationListing |
void |
hideFilterOptions()
Hides the annotation filtering options |
boolean |
isFilterOptionsVisible()
Determines whether or not the filter options panel is currently visible |
void |
openNotation(int selectedRow)
|
private void |
setAnnotations(boolean log)
|
private void |
setFilterOptionsVisible(boolean filterOptionsVisible)
|
private void |
setHeaderProperties()
|
void |
setNotationFilter(NotationFilter notationFilter)
Sets the NotationFilter object that will be used to filter out the set of annotations that are displayed from the pages identified by the NotationProvider |
void |
setNotationProvider(NotationProvider notationProvider)
Sets the NotationProvider object that determines the set of pages for which annotations will be retrieved |
void |
setSelectedRow(int row)
Selects the row specified by row |
private void |
setupBottomButtonPanel()
|
private javax.swing.JPanel |
setupColumnBox()
|
private void |
setupColumnModel()
|
private javax.swing.JPanel |
setupFilterBox()
|
private void |
setupSortFilterPanel()
|
void |
showFilterOptions()
Shows the annotation filtering options |
private void |
updateAnnotations()
|
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
Method required by the ListSelectionListener interface |
void |
waitForLoadToComplete()
This method waits for the notation loading thread to complete. |
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 |
---|
private ViewingPrefs viewPrefs
private java.lang.String userName
private Browser.LogListener loglistener
private ScrollingContentPane scrollNotationPane
private NotationInfo currentInfo
private javax.swing.JPanel column
private javax.swing.JPanel filter
private javax.swing.JPanel filterOptionsPanel
private javax.swing.Box buttonBox
private javax.swing.Box bottomBox
private javax.swing.JButton toggleFilterButton
private javax.swing.JSplitPane mainSplit
private DBClient client
private java.util.ArrayList prefsCheckboxes
private java.util.ArrayList columnChecks
private java.util.HashMap<java.lang.String,java.lang.Integer> sortMap
private java.util.HashMap elementMap
private java.util.Iterator spineIterator
private OEBPackageFile book
private HTMLTitleHandler HTMLth
private java.util.ArrayList allNotations
private java.util.ArrayList displayedNotations
private javax.swing.table.DefaultTableModel displayModel
private javax.swing.table.DefaultTableColumnModel columnModel
private CustomJTable display
private java.util.Vector<java.lang.String> columnNames
private ContentContainer container
private java.lang.String startDate
private java.lang.String endDate
private eTextReader.loggingInterface.Logger logger
private java.util.HashMap removedColumns
private ViewingPrefs columnPrefs
private javax.swing.table.JTableHeader header
private boolean filterOptionsVisible
private java.util.HashMap<java.lang.String,java.lang.String> sortingStatus
private NotationListing.NotationComparator nc
private boolean psortasc
private boolean ssortasc
private NotationProvider notationProvider
private NotationFilter notationFilter
private NotationListing.notationLoadingThread loadThread
Constructor Detail |
---|
public NotationListing(ContentContainer _container, NotationProvider provider, NotationFilter filter, Browser.LogListener logListener)
public NotationListing(Browser b, java.lang.String startDate, java.lang.String endDate, Browser.LogListener loglistener)
b
- the Browser window; it allows changes to be made in the ContentPane
of the other window.startDate
- the date at which the displayed notations beginendDate
- the date at which the displayed notations endpublic NotationListing(ContentContainer _container, NotationProvider provider, NotationFilter filter, Browser.LogListener logListener, boolean showFilterOptionsInitially)
Method Detail |
---|
public void hideFilterOptions()
public void showFilterOptions()
private void setHeaderProperties()
private void setupSortFilterPanel()
private void setupBottomButtonPanel()
private javax.swing.JPanel setupColumnBox()
private javax.swing.JPanel setupFilterBox()
private void setupColumnModel()
private javax.swing.Icon getHeaderRendererIcon(java.lang.String headerName, int size)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
private void setAnnotations(boolean log)
private void updateAnnotations()
public void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
public void openNotation(int selectedRow)
private java.lang.String computeNetworkURL(java.lang.String url)
url
-
public void setSelectedRow(int row)
row
- the 0-based integer index identifying the row to be selectedpublic NotationFilter getNotationFilter()
public void setNotationFilter(NotationFilter notationFilter)
notationFilter
- an object implementing the NotationFilter interfacepublic NotationProvider getNotationProvider()
public void setNotationProvider(NotationProvider notationProvider)
notationProvider
- an object implementing the NotationProvider interfacepublic void waitForLoadToComplete()
public boolean isFilterOptionsVisible()
private void setFilterOptionsVisible(boolean filterOptionsVisible)
filterOptionsVisible
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |