|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zfqjava.swing.model.XmlTreeModel
com.zfqjava.swing.model.HtmlTreeModel
public class HtmlTreeModel
HtmlTreeModel provides a
HTML tree model.
| Field Summary | |
|---|---|
protected EventListenerList |
listenerList
List of listeners |
| Constructor Summary | |
|---|---|
HtmlTreeModel(org.w3c.dom.html.HTMLDocument document)
Constructs a HTML tree model use the specified html document. |
|
HtmlTreeModel(org.w3c.dom.html.HTMLElement element)
Constructs a HTML tree model use the specified html element. |
|
| Method Summary | |
|---|---|
void |
addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes. |
protected void |
fireTreeNodesChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireTreeNodesInserted(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireTreeNodesRemoved(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireTreeStructureChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
Notifies all listeners that have registered interest for notification on this event type. |
EventListener[] |
getListeners(Class listenerType)
Returns an array of all the objects currently registered as FooListeners
upon this model. |
TreeModelListener[] |
getTreeModelListeners()
Returns an array of all the tree model listeners registered on this model. |
void |
removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener(). |
| Methods inherited from class com.zfqjava.swing.model.XmlTreeModel |
|---|
getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, valueForPathChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EventListenerList listenerList
| Constructor Detail |
|---|
public HtmlTreeModel(org.w3c.dom.html.HTMLDocument document)
document - the specified html documentpublic HtmlTreeModel(org.w3c.dom.html.HTMLElement element)
element - the specified html element| Method Detail |
|---|
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener in interface TreeModell - the listener to addremoveTreeModelListener(javax.swing.event.TreeModelListener)public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener in interface TreeModell - the listener to removeaddTreeModelListener(javax.swing.event.TreeModelListener)public TreeModelListener[] getTreeModelListeners()
TreeModelListeners
or an empty
array if no tree model listeners are currently registeredaddTreeModelListener(javax.swing.event.TreeModelListener),
removeTreeModelListener(javax.swing.event.TreeModelListener)
protected void fireTreeNodesChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
source - the node being changedpath - the path to the root nodechildIndices - the indices of the changed elementschildren - the changed elementsEventListenerList
protected void fireTreeNodesInserted(Object source,
Object[] path,
int[] childIndices,
Object[] children)
source - the node where new elements are being insertedpath - the path to the root nodechildIndices - the indices of the new elementschildren - the new elementsEventListenerList
protected void fireTreeNodesRemoved(Object source,
Object[] path,
int[] childIndices,
Object[] children)
source - the node where elements are being removedpath - the path to the root nodechildIndices - the indices of the removed elementschildren - the removed elementsEventListenerList
protected void fireTreeStructureChanged(Object source,
Object[] path,
int[] childIndices,
Object[] children)
source - the node where the tree model has changedpath - the path to the root nodechildIndices - the indices of the affected elementschildren - the affected elementsEventListenerListpublic EventListener[] getListeners(Class listenerType)
FooListeners
upon this model.
FooListeners are registered using the
addFooListener method.
You can specify the listenerType argument
with a class literal,
such as
FooListener.class.
For example, you can query a
DefaultTreeModel m
for its tree model listeners with the following code:
TreeModelListener[] tmls = (TreeModelListener[])(m.getListeners(TreeModelListener.class));If no such listeners exist, this method returns an empty array.
listenerType - the type of listeners requested; this parameter
should specify an interface that descends from
java.util.EventListener
FooListeners on this component,
or an empty array if no such
listeners have been added
ClassCastException - if listenerType
doesn't specify a class or interface that implements
java.util.EventListenergetTreeModelListeners()
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||