Java Doc for AbstractTool.java in  » GIS » udig-1.1 » net » refractions » udig » project » ui » tool » 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 » GIS » udig 1.1 » net.refractions.udig.project.ui.tool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.refractions.udig.project.ui.tool.AbstractTool

All known Subclasses:   net.refractions.udig.tools.internal.CursorPosition,  net.refractions.udig.tools.internal.ScrollZoom,  net.refractions.udig.project.ui.tool.AbstractModalTool,
AbstractTool
abstract public class AbstractTool implements Tool,MapMouseListener,MapMouseMotionListener,MapMouseWheelListener,EventListener(Code)
The Abstract base class for items. Provides support for enabling and disabling modal items.

Tool developers that extend this class override the event notification methods. This class handles registering the tool with the current map display.

Note: subclasses must have a single public parameterless constructor that calls the super constructor with a number indicating which event they want to listen for.

Example:


 super( MOUSE|MOTION ) indicates that the items will be receive all mouse and mouse motion commands.
 

author:
   Jesse Eichar
version:
   $Revision: 1.9 $
See Also:   Tool
See Also:   MapMouseListener
See Also:   MapMouseMotionListener
See Also:   MapMouseWheelListener
See Also:   EventListener


Field Summary
final public static  intDRAG_DROP
     Flag indicating that the tool can drag from the Map Editor.
final public static  intMOTION
    
final public static  intMOUSE
    
final public static  intNONE
    
final public static  intWHEEL
    
protected  IToolContextcontext
    
protected  booleanenabled
     Enablement of the tool.

Constructor Summary
public  AbstractTool(int targets)
     Assigns renderManager to field and registers as a listener with source.

Method Summary
public  voidaddListener(ToolLifecycleListener listener)
    
final protected  voidderegisterMouseListeners()
     Deregisters this object as a listener.
public  voiddispose()
    
protected  voidfireEvent(ToolLifecycleEvent event)
    
public  IToolContextgetContext()
     This method does not need to be overridden by subclasses normally.
public  ObjectgetProperty(String key)
    
public  IMapEditorSelectionProvidergetSelectionProvider()
    
public  booleanisEnabled()
    
protected  booleanisNotifyListeners()
    
public  voidmouseDoubleClicked(MapMouseEvent event)
    
public  voidmouseDragged(MapMouseEvent e)
    
public  voidmouseEntered(MapMouseEvent e)
    
public  voidmouseExited(MapMouseEvent e)
    
public  voidmouseHovered(MapMouseEvent e)
    
public  voidmouseMoved(MapMouseEvent e)
    
public  voidmousePressed(MapMouseEvent e)
    
public  voidmouseReleased(MapMouseEvent e)
    
public  voidmouseWheelMoved(MapMouseWheelEvent e)
    
final protected  voidregisterMouseListeners()
     Registers this object as a listener.
public  voidremoveListener(ToolLifecycleListener listener)
    
public  voidsetContext(IToolContext tools)
     Called each time an eclipse editor is activated.
public  voidsetEnabled(boolean enabled)
    
protected  voidsetNotifyListeners(boolean isNotify)
    
public  voidsetProperty(String key, Object value)
    
public  voidsetSelectionProvider(IMapEditorSelectionProvider selectionProvider)
    

Field Detail
DRAG_DROP
final public static int DRAG_DROP(Code)
Flag indicating that the tool can drag from the Map Editor. (drag in terms of drag-drop)



MOTION
final public static int MOTION(Code)
Flag indicating the tool is a



MOUSE
final public static int MOUSE(Code)
Flag indicating the tool is a



NONE
final public static int NONE(Code)
Flag indicating that the tool does not listen for events from the ViewportPane



WHEEL
final public static int WHEEL(Code)
Flag indicating the tool is a



context
protected IToolContext context(Code)
The items to use for tool actions



enabled
protected boolean enabled(Code)
Enablement of the tool.




Constructor Detail
AbstractTool
public AbstractTool(int targets)(Code)
Assigns renderManager to field and registers as a listener with source. The target field is used to determine which type of listeners to register as.
Parameters:
  targets - Used to determine which listeners to register as. The following choices fromthe following list can be combined using | and this tool will be registered as bothtypes of listeners:




Method Detail
addListener
public void addListener(ToolLifecycleListener listener)(Code)
(non-Javadoc)
See Also:   net.refractions.udig.project.ui.tool.Tool.addListener(net.refractions.udig.project.ui.tool.ToolLifecycleListener)



deregisterMouseListeners
final protected void deregisterMouseListeners()(Code)
Deregisters this object as a listener.

The events this object listens for are indicated by the targets parameter in the constructor. This method is called by setActive() and only needs to be called by client code if setActive is overridden and not called with super().

This method does not need to be overridden by subclasses normally.



dispose
public void dispose()(Code)

See Also:   net.refractions.udig.project.ui.tool.Tool.dispose



fireEvent
protected void fireEvent(ToolLifecycleEvent event)(Code)

Parameters:
  event -



getContext
public IToolContext getContext()(Code)
This method does not need to be overridden by subclasses normally.
See Also:   net.refractions.udig.project.ui.tool.Tool.getContext
See Also:   IToolContext



getProperty
public Object getProperty(String key)(Code)

See Also:   net.refractions.udig.project.ui.tool.Tool.getProperty



getSelectionProvider
public IMapEditorSelectionProvider getSelectionProvider()(Code)



isEnabled
public boolean isEnabled()(Code)
(non-Javadoc)
See Also:   net.refractions.udig.project.ui.tool.Tool.isEnabled



isNotifyListeners
protected boolean isNotifyListeners()(Code)



mouseDoubleClicked
public void mouseDoubleClicked(MapMouseEvent event)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseListener.mouseDoubleClicked(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)
See Also:   MapMouseEvent



mouseDragged
public void mouseDragged(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseMotionListener.mouseDragged(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)
See Also:   MapMouseEvent



mouseEntered
public void mouseEntered(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseListener.mouseEntered(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)
See Also:   MapMouseEvent



mouseExited
public void mouseExited(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseListener.mouseExited(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)
See Also:   MapMouseEvent



mouseHovered
public void mouseHovered(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseMotionListener.mouseHovered(MapMouseEvent)



mouseMoved
public void mouseMoved(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseMotionListener.mouseMoved(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)



mousePressed
public void mousePressed(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseListener.mousePressed(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)
See Also:   MapMouseEvent



mouseReleased
public void mouseReleased(MapMouseEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseListener.mouseReleased(net.refractions.udig.project.render.displayAdapter.MapMouseEvent)
See Also:   MapMouseEvent



mouseWheelMoved
public void mouseWheelMoved(MapMouseWheelEvent e)(Code)
This method may be overridden by subclasses
See Also:   net.refractions.udig.project.ui.render.displayAdapter.MapMouseWheelListener.mouseWheelMoved(net.refractions.udig.project.render.displayAdapter.MapMouseWheelEvent)
See Also:   MapMouseEvent



registerMouseListeners
final protected void registerMouseListeners()(Code)
Registers this object as a listener.

The events this object listens for are indicated by the targets parameter in the constructor. This method is called by setActive() and only needs to be called by client code if setActive is overridden and not called with super().

This method does not need to be overridden by subclasses normally.



removeListener
public void removeListener(ToolLifecycleListener listener)(Code)
(non-Javadoc)
See Also:   net.refractions.udig.project.ui.tool.Tool.removeListener(net.refractions.udig.project.ui.tool.ToolLifecycleListener)



setContext
public void setContext(IToolContext tools)(Code)
Called each time an eclipse editor is activated. The RenderManager and ViewportPane are those that are associated with the newly actived Eclipse view. Intended to be used if something other just changing the current state happens. if false the tool is set as inactive and deregistered with the component. This method does not need to be overridden by subclasses normally.
Parameters:
  items - The items that the tool can use in its operations
See Also:   IToolContext



setEnabled
public void setEnabled(boolean enabled)(Code)
(non-Javadoc)
See Also:   net.refractions.udig.project.ui.tool.Tool.setEnabled(boolean)



setNotifyListeners
protected void setNotifyListeners(boolean isNotify)(Code)



setProperty
public void setProperty(String key, Object value)(Code)

See Also:   net.refractions.udig.project.ui.tool.Tool.setProperty



setSelectionProvider
public void setSelectionProvider(IMapEditorSelectionProvider selectionProvider)(Code)



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.