use of javax.swing.event.TreeModelListener in project processdash by dtuma.
the class AbstractTreeTableModel method fireTreeNodesRemoved.
/*
* Notify all listeners that have registered interest for
* notification on this event type. The event instance
* is lazily created using the parameters passed into
* the fire method.
* @see EventListenerList
*/
protected void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TreeModelListener.class) {
// Lazily create the event:
if (e == null)
e = new TreeModelEvent(source, path, childIndices, children);
((TreeModelListener) listeners[i + 1]).treeNodesRemoved(e);
}
}
}
use of javax.swing.event.TreeModelListener in project processdash by dtuma.
the class AbstractTreeTableModel method fireTreeStructureChanged.
/*
* Notify all listeners that have registered interest for
* notification on this event type. The event instance
* is lazily created using the parameters passed into
* the fire method.
* @see EventListenerList
*/
protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TreeModelListener.class) {
// Lazily create the event:
if (e == null)
e = new TreeModelEvent(source, path, childIndices, children);
((TreeModelListener) listeners[i + 1]).treeStructureChanged(e);
}
}
}
use of javax.swing.event.TreeModelListener in project processdash by dtuma.
the class AbstractTreeTableModel method fireTreeNodesChanged.
/*
* Notify all listeners that have registered interest for
* notification on this event type. The event instance
* is lazily created using the parameters passed into
* the fire method.
* @see EventListenerList
*/
protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TreeModelListener.class) {
// Lazily create the event:
if (e == null)
e = new TreeModelEvent(source, path, childIndices, children);
((TreeModelListener) listeners[i + 1]).treeNodesChanged(e);
}
}
}
use of javax.swing.event.TreeModelListener in project processdash by dtuma.
the class AbstractTreeTableModel method fireTreeNodesInserted.
/*
* Notify all listeners that have registered interest for
* notification on this event type. The event instance
* is lazily created using the parameters passed into
* the fire method.
* @see EventListenerList
*/
protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TreeModelListener.class) {
// Lazily create the event:
if (e == null)
e = new TreeModelEvent(source, path, childIndices, children);
((TreeModelListener) listeners[i + 1]).treeNodesInserted(e);
}
}
}
use of javax.swing.event.TreeModelListener in project checkstyle by checkstyle.
the class ParseTreeTableModel method fireTreeStructureChanged.
/**
* Notify all listeners that have registered interest for
* 'tree structure changed' event. The event instance
* is lazily created using the parameters passed into
* the fire method.
* @param source The Object responsible for generating the event.
* @param path An array of Object identifying the path to the parent of the modified items.
* @param childIndices An array of int that specifies the index values of the removed items.
* @param children An array of Object containing the inserted, removed, or changed objects.
* @see EventListenerList
*/
private void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object... children) {
// Guaranteed to return a non-null array
final Object[] listeners = listenerList.getListenerList();
TreeModelEvent event = null;
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TreeModelListener.class) {
// Lazily create the event:
if (event == null) {
event = new TreeModelEvent(source, path, childIndices, children);
}
((TreeModelListener) listeners[i + 1]).treeStructureChanged(event);
}
}
}
Aggregations