|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.norvelle.textcite.model.AbstractCitationContainerTreeNode
org.norvelle.textcite.model.BookOutlineItem
public class BookOutlineItem
Represents an entry in the outline of the publication. Keeps track of the the Citations that are marked as falling under this outline item.
Nested Class Summary | |
---|---|
static class |
BookOutlineItem.BookOutlineItemConverter
BookOutlineItemConverter is an inner class used for serializing BookOutlineItem objects via XStream. |
Field Summary |
---|
Fields inherited from class org.norvelle.textcite.model.AbstractCitationContainerTreeNode |
---|
citationIds, citations |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
protected |
BookOutlineItem()
A parameterless constructor, so that we can recreate a serialized BookOutlineItem from XML. |
|
BookOutlineItem(java.lang.String n,
BookOutlineItem parent,
BookOutlineItem prevSibling,
BookOutlineTree tree)
The constructor calls the DefaultMutableTreeNode constructor, passing the name of the BookOutlineItem as the UserObject (which will also be displayed as the label). |
|
BookOutlineItem(java.lang.String n,
BookOutlineItem parent,
BookOutlineItem prevSibling,
BookOutlineTree tree,
boolean asFirst)
The constructor calls the DefaultMutableTreeNode constructor, passing the name of the BookOutlineItem as the UserObject (which will also be displayed as the label) |
|
BookOutlineItem(java.lang.String n,
BookOutlineItem parent,
BookOutlineTree tree)
The constructor calls the DefaultMutableTreeNode constructor, passing the name of the BookOutlineItem as the UserObject (which will also be displayed as the label). |
Method Summary | |
---|---|
void |
addChildAfter(BookOutlineItem newItem,
BookOutlineItem priorSibling)
Adds the given new BookOutlineItem directly after the indicated sibling within the list of children Items |
void |
destroy()
On destroying a BookOutlineItem, notify all associated Citations that they need to remove the BookOutlineItem from their CitationBookOutlineItemLists |
java.util.HashMap |
getCitations()
|
int |
getId()
|
java.lang.String |
getName()
|
java.lang.String |
getOutlineNumber()
|
BookOutlineTree |
getOutlineTree()
|
java.lang.String |
getSortableOutlineNumber()
|
void |
registerCitation(Citation citation)
Mark a Citation object as belonging to this BookOutlineItem. |
void |
setName(java.lang.String n)
Change the label of the BookOutlineItem. |
void |
setOutlineNumber(java.lang.String outlineNumber)
|
void |
setSortableOutlineNumber(java.lang.String outlineNumber)
|
java.lang.String |
toString()
|
void |
unregisterCitation(Citation citation)
Dissasociate a given Citation from this BookOutlineItem. |
Methods inherited from class org.norvelle.textcite.model.AbstractCitationContainerTreeNode |
---|
restoreCitationReferences, saveCitationReferences |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BookOutlineItem(java.lang.String n, BookOutlineItem parent, BookOutlineItem prevSibling, BookOutlineTree tree, boolean asFirst)
n
- The name/label of the BookOutlineItemparent
- The BookOutlineItem that is parent to the new BookOutlineItem in the BookOutlineTreeprevSibling
- The BookOutlineItem that the new item should be added *after*tree
- The BookOutlineTree that the new item should be added into.asFirst
- If true, add this new Item in as the first child in the array of parent's childrenpublic BookOutlineItem(java.lang.String n, BookOutlineItem parent, BookOutlineItem prevSibling, BookOutlineTree tree)
n
- The name/label of the BookOutlineItemparent
- The BookOutlineItem that is parent to the new BookOutlineItem in the BookOutlineTreeprevSibling
- The BookOutlineItem that the new item should be added *after*tree
- The BookOutlineTree that the new item should be added into.public BookOutlineItem(java.lang.String n, BookOutlineItem parent, BookOutlineTree tree)
n
- The name/label of the BookOutlineItemparent
- The BookOutlineItem that is parent to the new BookOutlineItem in the BookOutlineTreetree
- The BookOutlineTree that the new item should be added into.protected BookOutlineItem()
Method Detail |
---|
public void registerCitation(Citation citation)
registerCitation
in class AbstractCitationContainerTreeNode
citation
- The Citation object to be addedpublic void unregisterCitation(Citation citation)
unregisterCitation
in class AbstractCitationContainerTreeNode
citation
- The Citation to be eliminated from the BookOutlineItem.public void destroy()
destroy
in interface ClipboardHostable
public void addChildAfter(BookOutlineItem newItem, BookOutlineItem priorSibling)
newItem
- The BookOutlineItem to be addedpriorSibling
- The sibling that the new item should be added after.public java.lang.String getName()
public void setName(java.lang.String n)
n
- The new name for the BookOutlineItem.public java.lang.String getSortableOutlineNumber()
public void setSortableOutlineNumber(java.lang.String outlineNumber)
public java.lang.String getOutlineNumber()
public void setOutlineNumber(java.lang.String outlineNumber)
outlineNumber
- The new outline number of this item.public BookOutlineTree getOutlineTree()
public int getId()
public java.util.HashMap getCitations()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |