org.crosswire.bibledesktop.book
Class DictionaryPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JSplitPane
org.crosswire.bibledesktop.book.DictionaryPane
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, BookDataDisplay
public class DictionaryPane
- extends JSplitPane
- implements BookDataDisplay
Builds a panel on which all the Dictionaries and their entries are visible.
- Author:
- Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
- See Also:
for license details.
The copyright to this program is held by it's authors.
,
Serialized Form
Fields inherited from class javax.swing.JSplitPane |
BOTTOM, CONTINUOUS_LAYOUT_PROPERTY, continuousLayout, DIVIDER, DIVIDER_LOCATION_PROPERTY, DIVIDER_SIZE_PROPERTY, dividerSize, HORIZONTAL_SPLIT, LAST_DIVIDER_LOCATION_PROPERTY, lastDividerLocation, LEFT, leftComponent, ONE_TOUCH_EXPANDABLE_PROPERTY, oneTouchExpandable, orientation, ORIENTATION_PROPERTY, RESIZE_WEIGHT_PROPERTY, RIGHT, rightComponent, TOP, VERTICAL_SPLIT |
Methods inherited from class javax.swing.JSplitPane |
addImpl, getAccessibleContext, getBottomComponent, getDividerLocation, getDividerSize, getLastDividerLocation, getLeftComponent, getMaximumDividerLocation, getMinimumDividerLocation, getOrientation, getResizeWeight, getRightComponent, getTopComponent, getUI, getUIClassID, isContinuousLayout, isOneTouchExpandable, isValidateRoot, paintChildren, paramString, remove, remove, removeAll, resetToPreferredSizes, setBottomComponent, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerSize, setLastDividerLocation, setLeftComponent, setOneTouchExpandable, setOrientation, setResizeWeight, setRightComponent, setTopComponent, setUI, 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, 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, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
display
private BookDataDisplay display
- The display of OSIS data
dict
private transient Book dict
set
protected transient BibleComboBoxModelSet set
pnlSelect
private JPanel pnlSelect
lstDicts
private JList lstDicts
sptMain
private JSplitPane sptMain
scrEntries
private JScrollPane scrEntries
lstEntries
private JList lstEntries
log
private static final Logger log
- The log stream
serialVersionUID
private static final long serialVersionUID
- Serialization ID
- See Also:
- Constant Field Values
DictionaryPane
public DictionaryPane()
- Setup the GUI
init
private void init()
- GUI initialiser
setBookData
public void setBookData(Book book,
Key key)
- Description copied from interface:
BookDataDisplay
- Set the BookData to be displayed.
The data to be displayed is specified as a book and key rather than the
more obvious BookData (the result of reading a book using a key)
since some displays may wish so split up the display and only look up
smaller sections at a time.
- Specified by:
setBookData
in interface BookDataDisplay
- Parameters:
book
- The Book to read data fromkey
- The key to read from the given book
refresh
public void refresh()
- Description copied from interface:
BookDataDisplay
- Cause the BookData to be re-displayed.
- Specified by:
refresh
in interface BookDataDisplay
getComponent
public Component getComponent()
- Description copied from interface:
BookDataDisplay
- Accessor for the Swing component
- Specified by:
getComponent
in interface BookDataDisplay
copy
public void copy()
- Description copied from interface:
BookDataDisplay
- Copy the selection to the clipboard
- Specified by:
copy
in interface BookDataDisplay
getKey
public Key getKey()
- Description copied from interface:
BookDataDisplay
- The Book Key that we are displaying, or null if we are not displaying
anything
- Specified by:
getKey
in interface BookDataDisplay
- Returns:
- The current key
addURLEventListener
public void addURLEventListener(URLEventListener listener)
- Description copied from interface:
BookDataDisplay
- Add a listener for when someone clicks on a browser 'link'
- Specified by:
addURLEventListener
in interface BookDataDisplay
- Parameters:
listener
- The listener to add
removeURLEventListener
public void removeURLEventListener(URLEventListener listener)
- Description copied from interface:
BookDataDisplay
- Remove a listener for when someone clicks on a browser 'link'
- Specified by:
removeURLEventListener
in interface BookDataDisplay
- Parameters:
listener
- The listener to remove
getBook
public Book getBook()
- Description copied from interface:
BookDataDisplay
- Accessor for the Book used in the current display, or null if we are not
displaying anything.
- Specified by:
getBook
in interface BookDataDisplay
- Returns:
- The current book
setWord
public void setWord(String data)
- See if the current dictionary has a mention of the word in question.
LATER(joe): add a background task to highlight other dictionaries that have the word.
setKey
public void setKey(Key key)
- Accessor for the current passage
selectDictionary
public void selectDictionary(Book book)
newDictionary
protected void newDictionary()
- Called when someone selects a new Dictionary
updateDisplay
protected void updateDisplay()
newEntry
protected void newEntry()
- Called when someone selects a new entry from the current dictionary