public class BibleViewPane extends TabbedPanePanel implements Titleable, Clearable, TitleChangedListener
for license details.
,
Serialized FormModifier and Type | Class and Description |
---|---|
(package private) static class |
BibleViewPane.CustomFileFilter
Filter out verse lists
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private static String |
BOOKMARK_DIR |
private JFileChooser |
chooser |
private static String |
EXTENSION |
private EventListenerList |
listeners |
protected static org.slf4j.Logger |
log
The log stream
|
protected SplitBookDataDisplay |
pnlPassg |
private DisplaySelectPane |
pnlSelect |
protected File |
saved |
private static long |
serialVersionUID
Serialization ID
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
BibleViewPane(boolean showSidebar)
Simple ctor
|
Modifier and Type | Method and Description |
---|---|
void |
addTitleChangedListener(TitleChangedListener li)
Add a TitleChangedEvent listener
|
void |
clear()
Make it as though no-one is using this view
|
protected void |
fireTitleChanged(TitleChangedEvent ev)
Listen for changes to the title
|
org.crosswire.jsword.passage.Key |
getKey()
Accessor for the current passage
|
SplitBookDataDisplay |
getPassagePane()
Accessor for the SplitBookDataDisplay
|
DisplaySelectPane |
getSelectPane()
Accessor for the DisplaySelectPane
|
String |
getTitle()
How has this view been saved
|
private void |
init()
Setup the GUI
|
boolean |
isClear()
Has anyone started using this view
|
boolean |
maySave()
Returns true if there is something to save.
|
void |
open()
Open a saved verse list form disk
|
private boolean |
querySaveFile()
Ask the user where to store the data
|
private void |
readObject(ObjectInputStream is)
Serialization support.
|
void |
removeTitleChangedListener(TitleChangedListener li)
Remove a TitleChangedEvent listener
|
void |
save()
Save the view to disk.
|
void |
saveAs()
Save the view to disk, but ask the user where to save it first.
|
private void |
saveKey(org.crosswire.jsword.passage.Key key)
Do the real work of saving to a file
|
void |
setKey(org.crosswire.jsword.passage.Key key)
Accessor for the current passage
|
void |
titleChanged(TitleChangedEvent ev)
A Select pane is telling us that it has changed, and we might want to
update the BibleViewPane and the AbstractViewLayout to reflect any
potentially new titles
|
getInsets
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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
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, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
protected File saved
private transient EventListenerList listeners
private DisplaySelectPane pnlSelect
protected SplitBookDataDisplay pnlPassg
private JFileChooser chooser
private static final String BOOKMARK_DIR
private static final String EXTENSION
protected static final org.slf4j.Logger log
private static final long serialVersionUID
private void init()
public void clear()
public boolean isClear()
public String getTitle()
public void save() throws IOException
IOException
public void saveAs() throws IOException
IOException
private void saveKey(org.crosswire.jsword.passage.Key key) throws IOException
key
- The key to saveIOException
- If a write error happenspublic boolean maySave()
public void open() throws org.crosswire.jsword.passage.NoSuchKeyException, IOException
IOException
NoSuchVerseException
org.crosswire.jsword.passage.NoSuchKeyException
private boolean querySaveFile()
public org.crosswire.jsword.passage.Key getKey()
public final void setKey(org.crosswire.jsword.passage.Key key)
public SplitBookDataDisplay getPassagePane()
public DisplaySelectPane getSelectPane()
public void addTitleChangedListener(TitleChangedListener li)
addTitleChangedListener
in interface Titleable
public void removeTitleChangedListener(TitleChangedListener li)
removeTitleChangedListener
in interface Titleable
protected void fireTitleChanged(TitleChangedEvent ev)
ev
- the event to throwpublic void titleChanged(TitleChangedEvent ev)
TitleChangedListener
titleChanged
in interface TitleChangedListener
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
is
- IOException
ClassNotFoundException