public abstract class AbstractFontChooserModel extends java.lang.Object implements FontChooserModel
Modifier and Type | Field and Description |
---|---|
protected javax.swing.event.EventListenerList |
listenerList
Listeners.
|
Constructor and Description |
---|
AbstractFontChooserModel() |
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.
|
protected void |
fireTreeNodesChanged(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Notifies all listeners that have registered interest for
notification on this event type.
|
protected void |
fireTreeNodesInserted(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Notifies all listeners that have registered interest for
notification on this event type.
|
protected void |
fireTreeNodesRemoved(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Notifies all listeners that have registered interest for
notification on this event type.
|
protected void |
fireTreeStructureChanged(java.lang.Object source,
java.lang.Object[] path,
int[] childIndices,
java.lang.Object[] children)
Notifies all listeners that have registered interest for
notification on this event type.
|
protected void |
fireTreeStructureChanged(java.lang.Object source,
javax.swing.tree.TreePath path) |
<T extends java.util.EventListener> |
getListeners(java.lang.Class<T> listenerType)
Returns an array of all the objects currently registered
as
FooListener s
upon this model. |
javax.swing.event.TreeModelListener[] |
getTreeModelListeners()
Returns an array of all the tree model listeners
registered on this model.
|
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes a listener previously added with addTreeModelListener().
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEditable
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
in interface javax.swing.tree.TreeModel
l
- the listener to addremoveTreeModelListener(javax.swing.event.TreeModelListener)
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
in interface javax.swing.tree.TreeModel
l
- the listener to removeaddTreeModelListener(javax.swing.event.TreeModelListener)
public javax.swing.event.TreeModelListener[] getTreeModelListeners()
TreeModelListener
s
or an empty
array if no tree model listeners are currently registeredaddTreeModelListener(javax.swing.event.TreeModelListener)
,
removeTreeModelListener(javax.swing.event.TreeModelListener)
protected void fireTreeNodesChanged(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.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(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.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(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.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(java.lang.Object source, java.lang.Object[] path, int[] childIndices, java.lang.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 elementsEventListenerList
protected void fireTreeStructureChanged(java.lang.Object source, javax.swing.tree.TreePath path)
public <T extends java.util.EventListener> T[] getListeners(java.lang.Class<T> listenerType)
FooListener
s
upon this model.
FooListener
s 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
FooListener
s on this component,
or an empty array if no such
listeners have been addedjava.lang.ClassCastException
- if listenerType
doesn't specify a class or interface that implements
java.util.EventListener
getTreeModelListeners()