org.merlotxml.merlot
Class MerlotLibraryTreeTableModel
java.lang.Object
com.sun.javax.swing.AbstractTreeTableModel
org.merlotxml.merlot.DNDJTreeTableModel
org.merlotxml.merlot.DOMTreeTableAdapter
org.merlotxml.merlot.MerlotLibraryTreeTableModel
- All Implemented Interfaces:
- MerlotConstants, MerlotNodeListener, javax.swing.tree.TreeModel, com.sun.javax.swing.TreeTableModel
- public class MerlotLibraryTreeTableModel
- extends DOMTreeTableAdapter
Tree model for the library. A library document consists of sections (shelves)
which contain library elements.
- Author:
- Kelly A. Campbell
Field Summary |
static org.merlotxml.merlot.MerlotLibraryTreeTableModel.AddNodeLaterRunnable |
_later
|
static java.lang.Thread |
_laterThread
|
protected static int |
TYPE_COL
|
Fields inherited from class com.sun.javax.swing.AbstractTreeTableModel |
listenerList, root |
Fields inherited from interface org.merlotxml.merlot.MerlotConstants |
ACTION_MENU_ACCELERATOR, ACTION_MENU_ICON, ACTION_NAME, ACTION_SHORT_DESCRIPTION, ACTION_SMALL_ICON, AFTER, BEFORE, ERR, INTO, UI, XML |
Method Summary |
void |
addItemLater(int row,
MerlotDOMFragment frag,
int where,
boolean paste)
Special method that handles the drop in a different thread from the
calling thread (due to some nasty drag and drop event handling bugs that cause
deadlocks if certain gui operations are done at dnd drop event time) |
boolean |
dropOnRow(int row,
java.lang.Object data,
int where)
Overloads the default drop on row for the library panel. |
protected java.util.Vector |
filterChildNodes(MerlotDOMNode nd)
Filter out nodes we don't want displayed in the tree view. |
protected void |
newLibItem(int row,
MerlotDOMFragment frag,
int where,
boolean paste)
This adds a new item to the library where the user dropped it, or pasted it
It asks the user what they want to name the item first. |
void |
quit()
|
void |
setLibroot(MerlotDOMElement el)
|
Methods inherited from class org.merlotxml.merlot.DOMTreeTableAdapter |
addIDManagerAsNodeListener, addStatusListener, cacheReset, childrenChanged, fireStatusChanged, fireTreeStructureChanged, getChild, getChildCount, getColumnClass, getColumnCount, getColumnName, getDocument, getLocationPathForNode, getNodeAtRow, getPCDATA, getTransferable, getTreePathForNode, getValueAt, importFragment, importFragment, nodeChanged, nodeDeleted, nodeEvent, nodeInserted, nodeRemoved, refreshNode, removeStatusListener, setColumns, setJTreeTable, setUndoManager |
Methods inherited from class com.sun.javax.swing.AbstractTreeTableModel |
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, isLeaf, removeTreeModelListener, setValueAt, valueForPathChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_later
public static org.merlotxml.merlot.MerlotLibraryTreeTableModel.AddNodeLaterRunnable _later
_laterThread
public static java.lang.Thread _laterThread
TYPE_COL
protected static final int TYPE_COL
- See Also:
- Constant Field Values
MerlotLibraryTreeTableModel
public MerlotLibraryTreeTableModel(XMLFile file,
MerlotLibrary lib)
setLibroot
public void setLibroot(MerlotDOMElement el)
quit
public void quit()
dropOnRow
public boolean dropOnRow(int row,
java.lang.Object data,
int where)
- Overloads the default drop on row for the library panel.
When a drop occurs, we just add the docfrag as a libitem
in the location nearest the drop.
- Overrides:
dropOnRow
in class DOMTreeTableAdapter
newLibItem
protected void newLibItem(int row,
MerlotDOMFragment frag,
int where,
boolean paste)
- This adds a new item to the library where the user dropped it, or pasted it
It asks the user what they want to name the item first.
addItemLater
public void addItemLater(int row,
MerlotDOMFragment frag,
int where,
boolean paste)
- Special method that handles the drop in a different thread from the
calling thread (due to some nasty drag and drop event handling bugs that cause
deadlocks if certain gui operations are done at dnd drop event time)
filterChildNodes
protected java.util.Vector filterChildNodes(MerlotDOMNode nd)
- Filter out nodes we don't want displayed in the tree view.
For the library all we want to display
is the shelves, and the libitems under them.
- Overrides:
filterChildNodes
in class DOMTreeTableAdapter
- Returns:
- a vector of Node's