Java Doc for JGraphpadFocusManager.java in  » Graphic-Library » jgraphpad » com » jgraph » pad » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » jgraphpad » com.jgraph.pad.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Observable
      com.jgraph.pad.util.JGraphpadFocusManager

JGraphpadFocusManager
public class JGraphpadFocusManager extends Observable implements GraphLayoutCacheListener,GraphModelListener,GraphSelectionListener,MouseListener,MouseMotionListener,UndoableEditListener,PropertyChangeListener(Code)
Indirection to dispatch events from the permanent focus owner graph to the registered listeners. For redispatching mouse events the built-in multicasters are used.
See Also:   AWTEventMulticaster


Field Summary
final public static  StringFOCUSED_GRAPH_PROPERTY
     Bound property name for focusedGraph.
final public static  StringGRAPHLAYOUT_CHANGE_NOTIFICATION
     Bound property name for graph layout changes.
final public static  StringMODEL_CHANGE_NOTIFICATION
     Bound property name for model changes.
final public static  StringSELECTION_CHANGE_NOTIFICATION
     Bound property name for graph selection changes.
final public static  StringUNDOABLE_CHANGE_NOTIFICATION
     Bound property name for graph undoable changes.
protected  SwingPropertyChangeSupportchangeSupport
     Property change support for event notification.
public static  JGraphpadFocusManagercurrentGraphFocusManager
     Shared singleton instance.
protected  JGraphfocusedGraph
     Reference to the current and last focused graph.
protected transient  EventListenerListlistenerList
     Listeners to all graph-specific events (the other use event multicasters).
protected  MouseListenermouseListener
     Used to manage mouse listeners as an event multicaster.
protected  MouseMotionListenermouseMotionListener
     Used to manage mouse motion listeners as an event multicaster.

Constructor Summary
public  JGraphpadFocusManager()
     Constructs a new focus manager.

Method Summary
public  voidaddGraphLayoutCacheListener(GraphLayoutCacheListener l)
     Adds a listener for the GraphLayoutCacheEvent posted after the graph layout cache changes.
public  voidaddGraphModelListener(GraphModelListener l)
     Adds a listener for the GraphModelEvent posted after the graph changes.
public  voidaddGraphSelectionListener(GraphSelectionListener x)
     Adds x to the list of listeners that are notified each time the set of selected cells changes.
public synchronized  voidaddMouseListener(MouseListener l)
     Adds a listener for the MouseEvent.
public synchronized  voidaddMouseMotionListener(MouseMotionListener l)
     Adds a listener for the MouseMotionEvent.
public synchronized  voidaddPropertyChangeListener(PropertyChangeListener listener)
     Adds a PropertyChangeListener to the listener list.
protected  voidfireGraphChanged(GraphModelEvent e)
     Notify all listeners that have registered interest for notification on this event type.
protected  voidfireGraphLayoutCacheChanged(GraphLayoutCacheEvent e)
     Notifies all listeners that have registered interest for notification on this event type.
protected  voidfireValueChanged(GraphSelectionEvent e)
     Notifies all listeners that are registered for graph selection events on this object.
public static  JGraphpadFocusManagergetCurrentGraphFocusManager()
     Returns the shared graph focused manager.
public  JGraphgetFocusedGraph()
     Returns the focused graph.
public  GraphLayoutCacheListener[]getGraphLayoutCacheListeners()
     Returns an array of all GraphModelListeners that were added to this model.
public  GraphModelListener[]getGraphModelListeners()
     Return an array of all graph model listeners.
public  EventListener[]getListeners(Class listenerType)
     Returns an array of all the listeners of the given type that were added to this manager.
public  voidgraphChanged(GraphModelEvent e)
     Redispatches the graph model event and fires a property change for MODEL_CHANGE_NOTIFICATION.
public  voidgraphLayoutCacheChanged(GraphLayoutCacheEvent e)
     Redispatches the graph layout cache event and fires a property change for UNDOABLE_CHANGE_NOTIFICATION.
protected  voidinstallListeners(JGraph graph)
     Installs all listeners in the specified graph.
public  voidmouseClicked(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidmouseDragged(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidmouseEntered(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidmouseExited(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidmouseMoved(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidmousePressed(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidmouseReleased(MouseEvent arg0)
     Redirects the mouse event to the registered listeners.
public  voidpropertyChange(PropertyChangeEvent evt)
     Redispatches the property change event using the JGraphpadFocusManager.changeSupport .
public  voidremoveGraphLayoutCacheListener(GraphLayoutCacheListener l)
     Removes a listener previously added with addGraphModelListener() .
public  voidremoveGraphModelListener(GraphModelListener l)
     Removes a listener previously added with addGraphModelListener() .
public  voidremoveGraphSelectionListener(GraphSelectionListener x)
     Removes x from the list of listeners that are notified each time the set of selected cells changes.
public synchronized  voidremoveMouseListener(MouseListener l)
     Removes a listener previously added with addMouseListener() .
public synchronized  voidremoveMouseMotionListener(MouseMotionListener l)
     Removes a listener previously added with addMouseMotionListeneraddMouseMotionListener() .
public synchronized  voidremovePropertyChangeListener(PropertyChangeListener listener)
     Removes a PropertyChangeListener from the listener list.
public  voidsetFocusedGraph(JGraph newGraph)
     Sets the focused graph to the specified value.
public  voidundoableEditHappened(UndoableEditEvent e)
     Fires a property change for UNDOABLE_CHANGE_NOTIFICATION.
protected  voiduninstallListeners(JGraph graph)
     Uninstalls all listeners previously registered using JGraphpadFocusManager.installListeners(JGraph) from the specified graph.
public  voidvalueChanged(GraphSelectionEvent e)
     Redirects the value change event and fires a property change for SELECTION_CHANGE_NOTIFICATION.

Field Detail
FOCUSED_GRAPH_PROPERTY
final public static String FOCUSED_GRAPH_PROPERTY(Code)
Bound property name for focusedGraph.



GRAPHLAYOUT_CHANGE_NOTIFICATION
final public static String GRAPHLAYOUT_CHANGE_NOTIFICATION(Code)
Bound property name for graph layout changes. This is fired whenever a graph layout event is received from the focused graph.



MODEL_CHANGE_NOTIFICATION
final public static String MODEL_CHANGE_NOTIFICATION(Code)
Bound property name for model changes. This is fired whenever a graph model event is received from the focused graph.



SELECTION_CHANGE_NOTIFICATION
final public static String SELECTION_CHANGE_NOTIFICATION(Code)
Bound property name for graph selection changes. This is fired whenever a graph selection event is received from the focused graph.



UNDOABLE_CHANGE_NOTIFICATION
final public static String UNDOABLE_CHANGE_NOTIFICATION(Code)
Bound property name for graph undoable changes. This is fired whenever a graph undoable event is received from the focused graph.



changeSupport
protected SwingPropertyChangeSupport changeSupport(Code)
Property change support for event notification.



currentGraphFocusManager
public static JGraphpadFocusManager currentGraphFocusManager(Code)
Shared singleton instance.



focusedGraph
protected JGraph focusedGraph(Code)
Reference to the current and last focused graph.



listenerList
protected transient EventListenerList listenerList(Code)
Listeners to all graph-specific events (the other use event multicasters).



mouseListener
protected MouseListener mouseListener(Code)
Used to manage mouse listeners as an event multicaster.



mouseMotionListener
protected MouseMotionListener mouseMotionListener(Code)
Used to manage mouse motion listeners as an event multicaster.




Constructor Detail
JGraphpadFocusManager
public JGraphpadFocusManager()(Code)
Constructs a new focus manager.




Method Detail
addGraphLayoutCacheListener
public void addGraphLayoutCacheListener(GraphLayoutCacheListener l)(Code)
Adds a listener for the GraphLayoutCacheEvent posted after the graph layout cache changes.
See Also:   JGraphpadFocusManager.removeGraphLayoutCacheListener(GraphLayoutCacheListener)
Parameters:
  l - the listener to add



addGraphModelListener
public void addGraphModelListener(GraphModelListener l)(Code)
Adds a listener for the GraphModelEvent posted after the graph changes.
See Also:   JGraphpadFocusManager.removeGraphModelListener(GraphModelListener)
Parameters:
  l - the listener to add



addGraphSelectionListener
public void addGraphSelectionListener(GraphSelectionListener x)(Code)
Adds x to the list of listeners that are notified each time the set of selected cells changes.
Parameters:
  x - the new listener to be added



addMouseListener
public synchronized void addMouseListener(MouseListener l)(Code)
Adds a listener for the MouseEvent.
See Also:   JGraphpadFocusManager.removeMouseListener(MouseListener)
Parameters:
  l - the listener to add



addMouseMotionListener
public synchronized void addMouseMotionListener(MouseMotionListener l)(Code)
Adds a listener for the MouseMotionEvent.
See Also:   JGraphpadFocusManager.removeMouseMotionListener(MouseMotionListener)
Parameters:
  l - the listener to add



addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)(Code)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.
Parameters:
  listener - the PropertyChangeListener to be added



fireGraphChanged
protected void fireGraphChanged(GraphModelEvent e)(Code)
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 Also:   EventListenerList



fireGraphLayoutCacheChanged
protected void fireGraphLayoutCacheChanged(GraphLayoutCacheEvent e)(Code)
Notifies 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 Also:   EventListenerList



fireValueChanged
protected void fireValueChanged(GraphSelectionEvent e)(Code)
Notifies all listeners that are registered for graph selection events on this object.
See Also:   JGraphpadFocusManager.addGraphSelectionListener(GraphSelectionListener)
See Also:   EventListenerList



getCurrentGraphFocusManager
public static JGraphpadFocusManager getCurrentGraphFocusManager()(Code)
Returns the shared graph focused manager. Returns the shared graph focus manager.



getFocusedGraph
public JGraph getFocusedGraph()(Code)
Returns the focused graph. Returns the focused graph.



getGraphLayoutCacheListeners
public GraphLayoutCacheListener[] getGraphLayoutCacheListeners()(Code)
Returns an array of all GraphModelListeners that were added to this model.



getGraphModelListeners
public GraphModelListener[] getGraphModelListeners()(Code)
Return an array of all graph model listeners.



getListeners
public EventListener[] getListeners(Class listenerType)(Code)
Returns an array of all the listeners of the given type that were added to this manager. all of the objects receiving listenerTypenotifications from this model



graphChanged
public void graphChanged(GraphModelEvent e)(Code)
Redispatches the graph model event and fires a property change for MODEL_CHANGE_NOTIFICATION.
See Also:   org.jgraph.event.GraphModelListener.graphChanged(org.jgraph.event.GraphModelEvent)



graphLayoutCacheChanged
public void graphLayoutCacheChanged(GraphLayoutCacheEvent e)(Code)
Redispatches the graph layout cache event and fires a property change for UNDOABLE_CHANGE_NOTIFICATION.
See Also:   javax.swing.event.UndoableEditListener.undoableEditHappened(javax.swing.event.UndoableEditEvent)



installListeners
protected void installListeners(JGraph graph)(Code)
Installs all listeners in the specified graph.
Parameters:
  graph - The graph to install the listeners to.



mouseClicked
public void mouseClicked(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent)



mouseDragged
public void mouseDragged(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)



mouseEntered
public void mouseEntered(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent)



mouseExited
public void mouseExited(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent)



mouseMoved
public void mouseMoved(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)



mousePressed
public void mousePressed(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent)



mouseReleased
public void mouseReleased(MouseEvent arg0)(Code)
Redirects the mouse event to the registered listeners.
See Also:   java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent)



propertyChange
public void propertyChange(PropertyChangeEvent evt)(Code)
Redispatches the property change event using the JGraphpadFocusManager.changeSupport .



removeGraphLayoutCacheListener
public void removeGraphLayoutCacheListener(GraphLayoutCacheListener l)(Code)
Removes a listener previously added with addGraphModelListener() .
See Also:   JGraphpadFocusManager.addGraphLayoutCacheListener(GraphLayoutCacheListener)
Parameters:
  l - the listener to remove



removeGraphModelListener
public void removeGraphModelListener(GraphModelListener l)(Code)
Removes a listener previously added with addGraphModelListener() .
See Also:   JGraphpadFocusManager.addGraphModelListener(GraphModelListener)
Parameters:
  l - the listener to remove



removeGraphSelectionListener
public void removeGraphSelectionListener(GraphSelectionListener x)(Code)
Removes x from the list of listeners that are notified each time the set of selected cells changes.
Parameters:
  x - the listener to remove



removeMouseListener
public synchronized void removeMouseListener(MouseListener l)(Code)
Removes a listener previously added with addMouseListener() .
See Also:   JGraphpadFocusManager.addMouseListener(MouseListener)
Parameters:
  l - the listener to remove



removeMouseMotionListener
public synchronized void removeMouseMotionListener(MouseMotionListener l)(Code)
Removes a listener previously added with addMouseMotionListeneraddMouseMotionListener() .
See Also:   JGraphpadFocusManager.addMouseListener(MouseListener)
Parameters:
  l - the listener to remove



removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)(Code)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
Parameters:
  listener - the PropertyChangeListener to be removed



setFocusedGraph
public void setFocusedGraph(JGraph newGraph)(Code)
Sets the focused graph to the specified value. If the current focused graph points to a different instance then 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 JGraphpadFocusManager.FOCUSED_GRAPH_PROPERTY .
Parameters:
  newGraph - The new focused graph.



undoableEditHappened
public void undoableEditHappened(UndoableEditEvent e)(Code)
Fires a property change for UNDOABLE_CHANGE_NOTIFICATION.
See Also:   javax.swing.event.UndoableEditListener.undoableEditHappened(javax.swing.event.UndoableEditEvent)



uninstallListeners
protected void uninstallListeners(JGraph graph)(Code)
Uninstalls all listeners previously registered using JGraphpadFocusManager.installListeners(JGraph) from the specified graph.
Parameters:
  graph - The graph to uninstall the listeners from.



valueChanged
public void valueChanged(GraphSelectionEvent e)(Code)
Redirects the value change event and fires a property change for SELECTION_CHANGE_NOTIFICATION.
See Also:   org.jgraph.event.GraphSelectionListener.valueChanged(org.jgraph.event.GraphSelectionEvent)



Methods inherited from java.util.Observable
public synchronized void addObserver(Observer o)(Code)(Java Doc)
protected synchronized void clearChanged()(Code)(Java Doc)
public synchronized int countObservers()(Code)(Java Doc)
public synchronized void deleteObserver(Observer o)(Code)(Java Doc)
public synchronized void deleteObservers()(Code)(Java Doc)
public synchronized boolean hasChanged()(Code)(Java Doc)
public void notifyObservers()(Code)(Java Doc)
public void notifyObservers(Object arg)(Code)(Java Doc)
protected synchronized void setChanged()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.