|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.bibledesktop.display.basic.TabbedBookDataDisplay
public class TabbedBookDataDisplay
An inner component of Passage pane that can't show the list.
At some stage we should convert this code to remove Passage so it will work with all Books and not just Bibles. Code is included (commented out) on how this could be done.
for license details.
Field Summary | |
---|---|
private BookDataDisplay |
bookDataDisplay
If we are not using tabs, this is the main view |
private org.crosswire.jsword.book.Book[] |
books
The version used for display |
private Component |
center
Pointer to whichever of the above is currently in use |
private List<BookDataDisplay> |
displays
A list of all the InnerDisplayPanes so we can control listeners |
private org.crosswire.jsword.passage.Passage |
key
The passage that we are displaying (in one or more tabs) |
private List<KeyChangeListener> |
keyEventListeners
A list of all the keyEventListeners |
private static int |
pageSize
How many verses on a tab. |
private JPanel |
pnlMain
The top level component |
private JPanel |
pnlMore
Blank thing for the "More..." button |
private JScrollPane |
scrMain
The top level component |
private JTabbedPane |
tabMain
If we are using tabs, this is the main view |
private boolean |
tabs
Are we using tabs? |
private static int |
TITLE_LENGTH
What is the max length for a tab title |
private List<URIEventListener> |
uriEventListeners
A list of all the URIEventListeners |
private Map<JScrollPane,BookDataDisplay> |
views
An map of components to their views |
private org.crosswire.jsword.passage.Passage |
waiting
The verses that we have not created tabs for yet |
Fields inherited from interface org.crosswire.bibledesktop.display.BookDataDisplay |
---|
COMPARE_BOOKS |
Constructor Summary | |
---|---|
TabbedBookDataDisplay()
Simple Constructor |
Method Summary | |
---|---|
void |
addKeyChangeListener(KeyChangeListener listener)
Add a listener for when the key changes. |
void |
addURIEventListener(URIEventListener listener)
Add a listener for when someone clicks on a browser 'link' |
void |
clearBookData()
Clear any BookData that is displayed. |
void |
copy()
Copy the selection to the clipboard |
private BookDataDisplay |
createInnerDisplayPane()
Tab creation helper |
org.crosswire.jsword.book.Book[] |
getBooks()
|
Component |
getComponent()
Accessor for the Swing component |
org.crosswire.jsword.book.Book |
getFirstBook()
|
BookDataDisplay |
getInnerDisplayPane()
Accessor for the current TextComponent |
org.crosswire.jsword.passage.Key |
getKey()
The Book Key that we are displaying, or null if we are not displaying anything |
static int |
getPageSize()
Accessor for the page size |
private static String |
getTabName(org.crosswire.jsword.passage.Key key)
Ensure that the tab names are not too long - 25 chars max |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
refresh()
Cause the BookData to be re-displayed. |
void |
removeKeyChangeListener(KeyChangeListener listener)
Remove a listener for when the key changes. |
void |
removeURIEventListener(URIEventListener listener)
Remove a listener for when someone clicks on a browser 'link' |
void |
setBookData(org.crosswire.jsword.book.Book[] books,
org.crosswire.jsword.passage.Key newkey)
Set the BookData to be displayed. |
private void |
setCenterComponent(Component comp)
Make a new component reside in the center of this panel |
void |
setCompareBooks(boolean compare)
Establish whether books in the book array should be compared. |
static void |
setPageSize(int pageSize)
Accessor for the page size |
(package private) void |
tabChanged()
Tabs changed, generate some stuff |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int TITLE_LENGTH
private static int pageSize
private List<URIEventListener> uriEventListeners
private List<KeyChangeListener> keyEventListeners
private org.crosswire.jsword.passage.Passage key
private org.crosswire.jsword.passage.Passage waiting
private org.crosswire.jsword.book.Book[] books
private boolean tabs
private JTabbedPane tabMain
private BookDataDisplay bookDataDisplay
private Map<JScrollPane,BookDataDisplay> views
private List<BookDataDisplay> displays
private Component center
private JPanel pnlMore
private JPanel pnlMain
private JScrollPane scrMain
Constructor Detail |
---|
public TabbedBookDataDisplay()
Method Detail |
---|
public Component getComponent()
BookDataDisplay
getComponent
in interface BookDataDisplay
public void clearBookData()
BookDataDisplay
setBookData(null, null)
.
clearBookData
in interface BookDataDisplay
public void setBookData(org.crosswire.jsword.book.Book[] books, org.crosswire.jsword.passage.Key newkey)
BookDataDisplay
setBookData
in interface BookDataDisplay
books
- The Books to read data fromnewkey
- The key to read from the given bookpublic void setCompareBooks(boolean compare)
BookDataDisplay
setCompareBooks
in interface BookDataDisplay
public void refresh()
BookDataDisplay
refresh
in interface BookDataDisplay
public org.crosswire.jsword.passage.Key getKey()
BookDataDisplay
getKey
in interface BookDataDisplay
public org.crosswire.jsword.book.Book[] getBooks()
getBooks
in interface org.crosswire.jsword.book.BookProvider
public org.crosswire.jsword.book.Book getFirstBook()
getFirstBook
in interface org.crosswire.jsword.book.BookProvider
public void copy()
BookDataDisplay
copy
in interface BookDataDisplay
public void addKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
addKeyChangeListener
in interface BookDataDisplay
public void removeKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
removeKeyChangeListener
in interface BookDataDisplay
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void addURIEventListener(URIEventListener listener)
BookDataDisplay
addURIEventListener
in interface BookDataDisplay
listener
- The listener to addpublic void removeURIEventListener(URIEventListener listener)
BookDataDisplay
removeURIEventListener
in interface BookDataDisplay
listener
- The listener to removeprivate void setCenterComponent(Component comp)
final void tabChanged()
public BookDataDisplay getInnerDisplayPane()
private BookDataDisplay createInnerDisplayPane()
public static void setPageSize(int pageSize)
public static int getPageSize()
private static String getTabName(org.crosswire.jsword.passage.Key key)
key
- The key to get a short name from
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |