|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.bibledesktop.display.tab.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.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private Book |
book
The version used for display |
private Component |
center
Pointer to whichever of the above is currently in use |
private List |
displays
A list of all the InnerDisplayPanes so we can control listeners |
private List |
hyperlis
A list of all the HyperlinkListeners |
private Passage |
key
The passage that we are displaying (in one or more tabs) |
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 BookDataDisplay |
pnlView
If we are not using tabs, this is the main view |
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 Map |
views
An map of compnents to their views |
private Passage |
waiting
The verses that we have not created tabs for yet |
Constructor Summary | |
---|---|
TabbedBookDataDisplay()
Simple Constructor |
Method Summary | |
---|---|
void |
addURLEventListener(URLEventListener listener)
Add a listener for when someone clicks on a browser 'link' |
void |
copy()
Copy the selection to the clipboard |
private BookDataDisplay |
createInnerDisplayPane()
Tab creation helper |
Book |
getBook()
Accessor for the Book used in the current display, or null if we are not displaying anything. |
Component |
getComponent()
Accessor for the Swing component |
BookDataDisplay |
getInnerDisplayPane()
Accessor for the current TextComponent |
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(Key key)
Ensure that the tab names are not too long - 25 chars max |
private void |
init()
GUI creation |
void |
refresh()
Cause the BookData to be re-displayed. |
void |
removeURLEventListener(URLEventListener listener)
Remove a listener for when someone clicks on a browser 'link' |
void |
setBookData(Book book,
Key newkey)
Set the BookData to be displayed. |
private void |
setCenterComponent(Component comp)
Make a new component reside in the center of this panel |
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 hyperlis
private Passage key
private Passage waiting
private Book book
private boolean tabs
private JTabbedPane tabMain
private BookDataDisplay pnlView
private Map views
private List displays
private Component center
private JPanel pnlMore
private JPanel pnlMain
Constructor Detail |
---|
public TabbedBookDataDisplay()
Method Detail |
---|
private void init()
public Component getComponent()
BookDataDisplay
getComponent
in interface BookDataDisplay
public void setBookData(Book book, Key newkey)
BookDataDisplay
setBookData
in interface BookDataDisplay
book
- The Book to read data fromnewkey
- The key to read from the given bookpublic void refresh()
BookDataDisplay
refresh
in interface BookDataDisplay
public Key getKey()
BookDataDisplay
getKey
in interface BookDataDisplay
public Book getBook()
BookDataDisplay
getBook
in interface BookDataDisplay
public void copy()
BookDataDisplay
copy
in interface BookDataDisplay
public void addURLEventListener(URLEventListener listener)
BookDataDisplay
addURLEventListener
in interface BookDataDisplay
listener
- The listener to addpublic void removeURLEventListener(URLEventListener listener)
BookDataDisplay
removeURLEventListener
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(Key key)
key
- The key to get a short name from
|
Copyright ยจ 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |