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
- public class MerlotLibraryTreeTableModel
- extends DOMTreeTableAdapter
Tree model for the library. A library document consists of sections (shelves)
which contain library elements.
- Version:
- $Id: MerlotLibraryTreeTableModel.java,v 1.3 2000/06/15 23:42:25 camk Exp $
- 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 |
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 |
addStatusListener,
cacheReset,
childrenChanged,
fireStatusChanged,
fireTreeStructureChanged,
getChild,
getChildCount,
getColumnClass,
getColumnCount,
getColumnName,
getDocument,
getLocationPathForNode,
getNodeAtRow,
getPCDATA,
getTransferable,
getTreePathForNode,
getValueAt,
importFragment,
importFragment,
nodeChanged,
nodeDeleted,
nodeEvent,
nodeInserted,
nodeRemoved,
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
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
- Tags copied from class: DNDJTreeTableModel
- Parameters:
row
- the row affecteddata
- the data being droppedwhere
- INTO, BEFORE, or AFTER
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
- Tags copied from class: DOMTreeTableAdapter
- Returns:
- a vector of Node's