|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norvelle.textcite.model.BookOutlineTree
public class BookOutlineTree
The BookOutlineItemTree stores all the currently defined BookOutlineItem objects in the Citebook. It is derived from DefaultTreeModel in order to easily be able to serve as the Model for the BookOutlineItem tree in the OutlookPane. It also maintains a HashMap of the BookOutlineItem objects, stored by their ids.
Nested Class Summary | |
---|---|
static class |
BookOutlineTree.BookOutlineTreeConverter
BookOutlineTreeConverter is an inner class used for serializing BookOutlineTree objects via XStream. |
Constructor Summary | |
---|---|
protected |
BookOutlineTree()
A parameterless constructor, so that we can recreate a serialized BookOutlineTree from XML. |
|
BookOutlineTree(Book parentBook)
Default constructor. |
Method Summary | |
---|---|
void |
addAdapter(TreeModelAdapter adapter)
|
void |
clear()
Clears the BookOutlineItemTree of all members. |
void |
debugOutputTree(javax.swing.tree.TreeNode node,
int startLevel)
|
Book |
getParentBook()
|
BookOutlineItem |
getRoot()
|
int |
getSize()
|
void |
moveBookOutlineItem(BookOutlineItem item,
BookOutlineItem newParent,
BookOutlineItem priorSibling,
boolean asFirst)
Move a given BookOutlineItem from its current position, to be the child of the given parent (at the position indicated). |
void |
moveBookOutlineItem(BookOutlineItem item,
BookOutlineItem newParent,
boolean asFirst)
Move a given BookOutlineItem from its current position, to be the child of the given parent (either in the last position or the first, based on the asFirst parameter) |
void |
nodeChanged(javax.swing.tree.TreeNode node)
|
void |
recreateAdapterCollection()
After loading a new file, the AdapterCollection (which is marked as transient) will not be recreated during the deserialization process. |
void |
registerBookOutlineItem(BookOutlineItem newItem,
BookOutlineItem parent,
BookOutlineItem priorSibling,
boolean asFirst)
Insert a new BookOutlineItem into the tree, under the indicated parent node. |
void |
removeAdapter(TreeModelAdapter adapter)
|
void |
restoreCitationReferences()
After deserializing the Books, each Book object needs to rebuild its HashMap of references to the Citations registered for the author. |
void |
setParentBook(Book parentBook)
|
void |
unregisterBookOutlineItem(BookOutlineItem item)
Remove a given BookOutlineItem from the tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BookOutlineTree(Book parentBook)
protected BookOutlineTree()
Method Detail |
---|
public void registerBookOutlineItem(BookOutlineItem newItem, BookOutlineItem parent, BookOutlineItem priorSibling, boolean asFirst)
newItem
- The new BookOutlineItem to be insertedparent
- The parent BookOutlineItem for the new node.priorSibling
- The BookOutlineItem *after which* the current new item should be addedasFirst
- If true, insert the new item as the first child of the parent.public void unregisterBookOutlineItem(BookOutlineItem item)
item
- The BookOutlineItem to be removed.public void moveBookOutlineItem(BookOutlineItem item, BookOutlineItem newParent, BookOutlineItem priorSibling, boolean asFirst)
item
- The BookOutlineItem to be moved.newParent
- The BookOutlineItem which will be the new parent.priorSibling
- The BookOutlineItem *after which* the moved item should be addedasFirst
- If true, insert the moved item as the first child of the parent.public void moveBookOutlineItem(BookOutlineItem item, BookOutlineItem newParent, boolean asFirst)
item
- The BookOutlineItem to be moved.newParent
- The BookOutlineItem which will be the new parent.asFirst
- If true, insert the moved item as the first child of the parent.public void clear()
public int getSize()
public void debugOutputTree(javax.swing.tree.TreeNode node, int startLevel)
public BookOutlineItem getRoot()
public Book getParentBook()
public void setParentBook(Book parentBook)
public void nodeChanged(javax.swing.tree.TreeNode node)
public void addAdapter(TreeModelAdapter adapter)
addAdapter
in interface TreeModelAdaptee
public void removeAdapter(TreeModelAdapter adapter)
removeAdapter
in interface TreeModelAdaptee
public void recreateAdapterCollection()
recreateAdapterCollection
in interface TreeModelAdaptee
public void restoreCitationReferences()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |