|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.Observable
com.jgraph.pad.util.JGraphpadFocusManager
Indirection to dispatch events from the permanent focus owner graph to the registered listeners. For redispatching mouse events the built-in multicasters are used.
AWTEventMulticaster| Field Summary | |
protected SwingPropertyChangeSupport |
changeSupport
Property change support for event notification. |
static JGraphpadFocusManager |
currentGraphFocusManager
Shared singleton instance. |
static String |
FOCUSED_GRAPH_PROPERTY
Bound property name for focusedGraph. |
protected org.jgraph.JGraph |
focusedGraph
Reference to the current and last focused graph. |
static String |
GRAPHLAYOUT_CHANGE_NOTIFICATION
Bound property name for graph layout changes. |
protected EventListenerList |
listenerList
Listeners to all graph-specific events (the other use event multicasters). |
static String |
MODEL_CHANGE_NOTIFICATION
Bound property name for model changes. |
protected MouseListener |
mouseListener
Used to manage mouse listeners as an event multicaster. |
protected MouseMotionListener |
mouseMotionListener
Used to manage mouse motion listeners as an event multicaster. |
static String |
SELECTION_CHANGE_NOTIFICATION
Bound property name for graph selection changes. |
static String |
UNDOABLE_CHANGE_NOTIFICATION
Bound property name for graph undoable changes. |
| Constructor Summary | |
JGraphpadFocusManager()
Constructs a new focus manager. |
|
| Method Summary | |
void |
addGraphLayoutCacheListener(org.jgraph.event.GraphLayoutCacheListener l)
Adds a listener for the GraphLayoutCacheEvent posted after the graph layout cache changes. |
void |
addGraphModelListener(org.jgraph.event.GraphModelListener l)
Adds a listener for the GraphModelEvent posted after the graph changes. |
void |
addGraphSelectionListener(org.jgraph.event.GraphSelectionListener x)
Adds x to the list of listeners that are notified each
time the set of selected cells changes. |
void |
addMouseListener(MouseListener l)
Adds a listener for the MouseEvent. |
void |
addMouseMotionListener(MouseMotionListener l)
Adds a listener for the MouseMotionEvent. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
protected void |
fireGraphChanged(org.jgraph.event.GraphModelEvent e)
Notify all listeners that have registered interest for notification on this event type. |
protected void |
fireGraphLayoutCacheChanged(org.jgraph.event.GraphLayoutCacheEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireValueChanged(org.jgraph.event.GraphSelectionEvent e)
Notifies all listeners that are registered for graph selection events on this object. |
static JGraphpadFocusManager |
getCurrentGraphFocusManager()
Returns the shared graph focused manager. |
org.jgraph.JGraph |
getFocusedGraph()
Returns the focused graph. |
org.jgraph.event.GraphLayoutCacheListener[] |
getGraphLayoutCacheListeners()
Returns an array of all GraphModelListeners that were added to this model. |
org.jgraph.event.GraphModelListener[] |
getGraphModelListeners()
Return an array of all graph model listeners. |
EventListener[] |
getListeners(Class listenerType)
Returns an array of all the listeners of the given type that were added to this manager. |
void |
graphChanged(org.jgraph.event.GraphModelEvent e)
Redispatches the graph model event and fires a property change for MODEL_CHANGE_NOTIFICATION. |
void |
graphLayoutCacheChanged(org.jgraph.event.GraphLayoutCacheEvent e)
Redispatches the graph layout cache event and fires a property change for UNDOABLE_CHANGE_NOTIFICATION. |
protected void |
installListeners(org.jgraph.JGraph graph)
Installs all listeners in the specified graph. |
void |
mouseClicked(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
mouseDragged(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
mouseEntered(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
mouseExited(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
mouseMoved(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
mousePressed(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
mouseReleased(MouseEvent arg0)
Redirects the mouse event to the registered listeners. |
void |
propertyChange(PropertyChangeEvent evt)
Redispatches the property change event using the changeSupport. |
void |
removeGraphLayoutCacheListener(org.jgraph.event.GraphLayoutCacheListener l)
Removes a listener previously added with addGraphModelListener() . |
void |
removeGraphModelListener(org.jgraph.event.GraphModelListener l)
Removes a listener previously added with addGraphModelListener() . |
void |
removeGraphSelectionListener(org.jgraph.event.GraphSelectionListener x)
Removes x from the list of listeners that are notified
each time the set of selected cells changes. |
void |
removeMouseListener(MouseListener l)
Removes a listener previously added with addMouseListener() . |
void |
removeMouseMotionListener(MouseMotionListener l)
Removes a listener previously added with addMouseMotionListeneraddMouseMotionListener() . |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setFocusedGraph(org.jgraph.JGraph newGraph)
Sets the focused graph to the specified value. |
void |
undoableEditHappened(UndoableEditEvent e)
Fires a property change for UNDOABLE_CHANGE_NOTIFICATION. |
protected void |
uninstallListeners(org.jgraph.JGraph graph)
Uninstalls all listeners previously registered using installListeners(JGraph) from the specified graph. |
void |
valueChanged(org.jgraph.event.GraphSelectionEvent e)
Redirects the value change event and fires a property change for SELECTION_CHANGE_NOTIFICATION. |
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String FOCUSED_GRAPH_PROPERTY
focusedGraph.
public static final String MODEL_CHANGE_NOTIFICATION
public static final String GRAPHLAYOUT_CHANGE_NOTIFICATION
public static final String SELECTION_CHANGE_NOTIFICATION
public static final String UNDOABLE_CHANGE_NOTIFICATION
public static JGraphpadFocusManager currentGraphFocusManager
protected transient EventListenerList listenerList
protected SwingPropertyChangeSupport changeSupport
protected MouseListener mouseListener
protected MouseMotionListener mouseMotionListener
protected org.jgraph.JGraph focusedGraph
| Constructor Detail |
public JGraphpadFocusManager()
| Method Detail |
public static JGraphpadFocusManager getCurrentGraphFocusManager()
public org.jgraph.JGraph getFocusedGraph()
public void setFocusedGraph(org.jgraph.JGraph newGraph)
newGraph then
this implementation updates the last focused graph with the current
focused graph and removes all listeners from either the current graph or
the last focused graph if the current graph is null. This method fires a
property change event for FOCUSED_GRAPH_PROPERTY.
newGraph - The new focused graph.protected void installListeners(org.jgraph.JGraph graph)
graph - The graph to install the listeners to.protected void uninstallListeners(org.jgraph.JGraph graph)
installListeners(JGraph) from the specified graph.
graph - The graph to uninstall the listeners from.public void addPropertyChangeListener(PropertyChangeListener listener)
listener - the PropertyChangeListener to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener - the PropertyChangeListener to be removedpublic void propertyChange(PropertyChangeEvent evt)
changeSupport.
propertyChange in interface PropertyChangeListenerpublic void undoableEditHappened(UndoableEditEvent e)
UNDOABLE_CHANGE_NOTIFICATION.
undoableEditHappened in interface UndoableEditListenerUndoableEditListener.undoableEditHappened(javax.swing.event.UndoableEditEvent)public void graphLayoutCacheChanged(org.jgraph.event.GraphLayoutCacheEvent e)
UNDOABLE_CHANGE_NOTIFICATION.
graphLayoutCacheChanged in interface org.jgraph.event.GraphLayoutCacheListenerUndoableEditListener.undoableEditHappened(javax.swing.event.UndoableEditEvent)public void addGraphLayoutCacheListener(org.jgraph.event.GraphLayoutCacheListener l)
l - the listener to addremoveGraphLayoutCacheListener(GraphLayoutCacheListener)public void removeGraphLayoutCacheListener(org.jgraph.event.GraphLayoutCacheListener l)
l - the listener to removeaddGraphLayoutCacheListener(GraphLayoutCacheListener)protected void fireGraphLayoutCacheChanged(org.jgraph.event.GraphLayoutCacheEvent e)
EventListenerListpublic org.jgraph.event.GraphLayoutCacheListener[] getGraphLayoutCacheListeners()
public void graphChanged(org.jgraph.event.GraphModelEvent e)
MODEL_CHANGE_NOTIFICATION.
graphChanged in interface org.jgraph.event.GraphModelListenerGraphModelListener.graphChanged(org.jgraph.event.GraphModelEvent)public void addGraphModelListener(org.jgraph.event.GraphModelListener l)
l - the listener to addremoveGraphModelListener(GraphModelListener)public void removeGraphModelListener(org.jgraph.event.GraphModelListener l)
l - the listener to removeaddGraphModelListener(GraphModelListener)protected void fireGraphChanged(org.jgraph.event.GraphModelEvent e)
EventListenerListpublic org.jgraph.event.GraphModelListener[] getGraphModelListeners()
public void valueChanged(org.jgraph.event.GraphSelectionEvent e)
SELECTION_CHANGE_NOTIFICATION.
valueChanged in interface org.jgraph.event.GraphSelectionListenerGraphSelectionListener.valueChanged(org.jgraph.event.GraphSelectionEvent)public void addGraphSelectionListener(org.jgraph.event.GraphSelectionListener x)
x to the list of listeners that are notified each
time the set of selected cells changes.
x - the new listener to be addedpublic void removeGraphSelectionListener(org.jgraph.event.GraphSelectionListener x)
x from the list of listeners that are notified
each time the set of selected cells changes.
x - the listener to removeprotected void fireValueChanged(org.jgraph.event.GraphSelectionEvent e)
addGraphSelectionListener(GraphSelectionListener),
EventListenerListpublic EventListener[] getListeners(Class listenerType)
public void addMouseListener(MouseListener l)
l - the listener to addremoveMouseListener(MouseListener)public void removeMouseListener(MouseListener l)
l - the listener to removeaddMouseListener(MouseListener)public void addMouseMotionListener(MouseMotionListener l)
l - the listener to addremoveMouseMotionListener(MouseMotionListener)public void removeMouseMotionListener(MouseMotionListener l)
l - the listener to removeaddMouseListener(MouseListener)public void mouseClicked(MouseEvent arg0)
mouseClicked in interface MouseListenerMouseListener.mouseClicked(java.awt.event.MouseEvent)public void mousePressed(MouseEvent arg0)
mousePressed in interface MouseListenerMouseListener.mousePressed(java.awt.event.MouseEvent)public void mouseReleased(MouseEvent arg0)
mouseReleased in interface MouseListenerMouseListener.mouseReleased(java.awt.event.MouseEvent)public void mouseEntered(MouseEvent arg0)
mouseEntered in interface MouseListenerMouseListener.mouseEntered(java.awt.event.MouseEvent)public void mouseExited(MouseEvent arg0)
mouseExited in interface MouseListenerMouseListener.mouseExited(java.awt.event.MouseEvent)public void mouseDragged(MouseEvent arg0)
mouseDragged in interface MouseMotionListenerMouseMotionListener.mouseDragged(java.awt.event.MouseEvent)public void mouseMoved(MouseEvent arg0)
mouseMoved in interface MouseMotionListenerMouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||