public class GroupTreeNode
extends javax.swing.tree.DefaultMutableTreeNode
implements java.awt.datatransfer.Transferable
Modifier and Type | Field and Description |
---|---|
static java.awt.datatransfer.DataFlavor |
flavor |
static java.awt.datatransfer.DataFlavor[] |
flavors |
Constructor and Description |
---|
GroupTreeNode(AbstractGroup group)
Creates this node and associates the specified group with it.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.undo.AbstractUndoableEdit |
addToGroup(BibtexEntry[] entries)
Adds the selected entries to this node's group.
|
java.util.Enumeration<GroupTreeNode> |
breadthFirstEnumeration() |
boolean |
canMoveDown() |
boolean |
canMoveLeft() |
boolean |
canMoveRight() |
boolean |
canMoveUp() |
java.util.Enumeration<GroupTreeNode> |
children() |
GroupTreeNode |
deepCopy()
Creates a deep copy of this node and all of its children, including all
groups.
|
java.util.Enumeration<GroupTreeNode> |
depthFirstEnumeration() |
boolean |
equals(java.lang.Object other)
Recursively compares this node's group and all subgroups.
|
GroupTreeNode |
getChildAt(int[] path) |
GroupTreeNode |
getDescendant(int[] indexedPath) |
AbstractGroup |
getGroup() |
int[] |
getIndexedPath() |
AbstractGroup[] |
getMatchingGroups(BibtexEntry entry)
Scans the subtree rooted at this node.
|
GroupTreeNode |
getNode(int[] indexedPath)
Returns the node indicated by the specified indexedPath, which contains
child indices obtained e.g.
|
SearchRule |
getSearchRule()
A GroupTreeNode can create a SearchRule that finds elements contained in
its own group, or the union of those elements in its own group and its
children's groups (recursively), or the intersection of the elements in
its own group and its parent's group.
|
protected SearchRule |
getSearchRule(int originalContext) |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor someFlavor) |
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors() |
java.lang.String |
getTreeAsString()
Returns a textual representation of this node and its children.
|
int |
hashCode() |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor someFlavor) |
javax.swing.undo.AbstractUndoableEdit |
moveDown(GroupSelector groupSelector) |
javax.swing.undo.AbstractUndoableEdit |
moveLeft(GroupSelector groupSelector) |
javax.swing.undo.AbstractUndoableEdit |
moveRight(GroupSelector groupSelector) |
javax.swing.undo.AbstractUndoableEdit |
moveUp(GroupSelector groupSelector) |
java.util.Enumeration<GroupTreeNode> |
preorderEnumeration() |
void |
refreshGroupsForNewDatabase(BibtexDatabase db)
Update all groups, if necessary, to handle the situation where the group
tree is applied to a different BibtexDatabase than it was created for.
|
javax.swing.undo.AbstractUndoableEdit |
removeFromGroup(BibtexEntry[] entries)
Removes the selected entries from this node's group.
|
void |
setGroup(AbstractGroup group)
Associates the specified group with this node.
|
add, clone, 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, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
public static final java.awt.datatransfer.DataFlavor flavor
public static final java.awt.datatransfer.DataFlavor[] flavors
public GroupTreeNode(AbstractGroup group)
public AbstractGroup getGroup()
public void setGroup(AbstractGroup group)
public java.lang.String getTreeAsString()
public GroupTreeNode deepCopy()
public void refreshGroupsForNewDatabase(BibtexDatabase db)
db
- The database to refresh for.public int[] getIndexedPath()
public GroupTreeNode getNode(int[] indexedPath)
public GroupTreeNode getDescendant(int[] indexedPath)
indexedPath
- A sequence of child indices that describe a path from this
node to one of its desendants. Be aware that if indexedPath
was obtained by getIndexedPath(), this node should
usually be the root node.public SearchRule getSearchRule()
protected SearchRule getSearchRule(int originalContext)
public java.util.Enumeration<GroupTreeNode> preorderEnumeration()
preorderEnumeration
in class javax.swing.tree.DefaultMutableTreeNode
public java.util.Enumeration<GroupTreeNode> depthFirstEnumeration()
depthFirstEnumeration
in class javax.swing.tree.DefaultMutableTreeNode
public java.util.Enumeration<GroupTreeNode> breadthFirstEnumeration()
breadthFirstEnumeration
in class javax.swing.tree.DefaultMutableTreeNode
public java.util.Enumeration<GroupTreeNode> children()
children
in interface javax.swing.tree.TreeNode
children
in class javax.swing.tree.DefaultMutableTreeNode
public AbstractGroup[] getMatchingGroups(BibtexEntry entry)
public boolean canMoveUp()
public boolean canMoveDown()
public boolean canMoveLeft()
public boolean canMoveRight()
public javax.swing.undo.AbstractUndoableEdit moveUp(GroupSelector groupSelector)
public javax.swing.undo.AbstractUndoableEdit moveDown(GroupSelector groupSelector)
public javax.swing.undo.AbstractUndoableEdit moveLeft(GroupSelector groupSelector)
public javax.swing.undo.AbstractUndoableEdit moveRight(GroupSelector groupSelector)
public GroupTreeNode getChildAt(int[] path)
path
- A sequence of child indices that designate a node relative to
this node.public javax.swing.undo.AbstractUndoableEdit addToGroup(BibtexEntry[] entries)
public javax.swing.undo.AbstractUndoableEdit removeFromGroup(BibtexEntry[] entries)
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor someFlavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor someFlavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object