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


java.lang.Object
   net.refractions.udig.tools.edit.EditToolHandler

EditToolHandler
public class EditToolHandler (Code)
This is the class that does all the work. An Edit tool adds Mode objects to the EditToolHandler. Each Mode has attributes that indicate whether it is valid.
author:
   jones
since:
   1.1.0


Field Summary
final public static  StringCURRENT_SHAPE
     The key for the currently selected/edit shape.
final public static  StringEDITSTATE
     The key for the currently selected/edit state.
final public static  StringSTORED_CURRENT_SHAPE
     When there is a switch in the currently selected layer the current shape is stored on the old layer so if the layer selected layer the state can be restored.

Modify with Care this is primarily used by the framework for its workflow but if the workflow is not pleasing then modification is permitted.

final public static  StringSTORED_CURRENT_STATE
     When there is a switch in the currently selected layer the current state is stored on the old layer so if the layer selected layer the state can be restored.

Modify with Care this is primarily used by the framework for its workflow but if the workflow is not pleasing then modification is permitted.

 ObjectbehaviourLock
    
final public  CursoreditCursor
     Cursor that should be set when editing can occur.
final public  CursorselectionCursor
     Cursor that should be set when a selection can occur.
protected  booleantesting
    
protected  AbstractEditTooltool
    

Constructor Summary
public  EditToolHandler(Cursor selectionCursor, Cursor editCursor)
    

Method Summary
 voidbasicDisablement()
    
 voidbasicEnablement()
    
public  List<Behaviour>getAcceptBehaviours()
     Returns the list of behaviours that are run when the Enter key is pressed.
public  Set<Activator>getActivators()
     Returns the Activators that are run during activation and deactivation This list is thread safe and may be modified.
public  List<EventBehaviour>getBehaviours()
     Returns the EventBehaviours that may be run when an event occurs.
public  List<Behaviour>getCancelBehaviours()
     Returns the list of behaviours that are run when the Esc key is pressed.
public  BehaviourCommandgetCommand(List<Behaviour> list)
     Runs a list of behaviours.
public  IToolContextgetContext()
     Gets the tool context object that Modes and Activators may use.
public  EditGeomgetCurrentGeom()
    
public  PrimitiveShapegetCurrentShape()
    
public  EditStategetCurrentState()
    
public  List<IDrawCommand>getDrawCommands()
     Returns the draw actions that need to be deactivated when the tool is deactivated.
public  EditBlackboardgetEditBlackboard(ILayer layer)
     Gets the EditBlackboard of the map.
public  ILayergetEditLayer()
     Returns the currently selected layer, or if the EditManager is locked, it will return the edit layer.
public  List<EnablementBehaviour>getEnablementBehaviours()
    
synchronized  LockgetLock()
    
public  MouseTrackergetMouseTracker()
    
public  AbstractEditToolgetTool()
    
protected  voidhandleEvent(MapMouseEvent e, EventType eventType)
     Runs through the list of modes and runs all the modes that are valid in the current context.
public  booleanisLockOwner(LockingBehaviour behaviour)
     Returns true if the behaviour's LockingBehaviour.getKey(EditToolHandler) returns the key for the lock.
public  booleanisLocked()
    
public  voidlock(LockingBehaviour behaviour)
     Locks the handler so only the only behaviours that can run are LockingBehaviour s who's LockingBehaviour.getKey(EditToolHandler) method returns the same object as the locking LockingBehaviour 's LockingBehaviour.getKey(EditToolHandler) method.

This is not a reentrant lock so it cannot be locked multiple times.

public synchronized  voidrepaint()
     All behaviours and listeners should call this method so that only one redraw is done per mouse event.
protected  voidsetActive(boolean active)
     Called by AbstractEditTool when activated.
protected  voidsetContext(IToolContext context2)
    
public  voidsetCurrentShape(PrimitiveShape currentShape)
    
public  voidsetCurrentState(EditState currentState)
    
public  voidsetCursor(int cursor_id)
    
public  voidsetCursor(String cursorID)
     The method gets ID of the cursor as configured by extension or by ModalTool.*_CURSOR value corresponding to SWT.CURSOR_* constants and delegates the call to ModalTool to find the cursor in cache and set it.
public  voidsetCursor(Cursor cursor)
    
public  voidsetTool(AbstractEditTool tool)
    
public  StringtoString()
    
public  voidunlock(LockingBehaviour behaviour)
     Unlocks the handler so all behaviours can run.

Field Detail
CURRENT_SHAPE
final public static String CURRENT_SHAPE(Code)
The key for the currently selected/edit shape. It is put on the map referenced by the context (see EditToolHandler.getContext() )



EDITSTATE
final public static String EDITSTATE(Code)
The key for the currently selected/edit state. It is put on the map referenced by the context (see EditToolHandler.getContext() )



STORED_CURRENT_SHAPE
final public static String STORED_CURRENT_SHAPE(Code)
When there is a switch in the currently selected layer the current shape is stored on the old layer so if the layer selected layer the state can be restored.

Modify with Care this is primarily used by the framework for its workflow but if the workflow is not pleasing then modification is permitted.




STORED_CURRENT_STATE
final public static String STORED_CURRENT_STATE(Code)
When there is a switch in the currently selected layer the current state is stored on the old layer so if the layer selected layer the state can be restored.

Modify with Care this is primarily used by the framework for its workflow but if the workflow is not pleasing then modification is permitted.




behaviourLock
Object behaviourLock(Code)



editCursor
final public Cursor editCursor(Code)
Cursor that should be set when editing can occur.



selectionCursor
final public Cursor selectionCursor(Code)
Cursor that should be set when a selection can occur.



testing
protected boolean testing(Code)



tool
protected AbstractEditTool tool(Code)




Constructor Detail
EditToolHandler
public EditToolHandler(Cursor selectionCursor, Cursor editCursor)(Code)




Method Detail
basicDisablement
void basicDisablement()(Code)
disables the activators and stops listening



basicEnablement
void basicEnablement()(Code)
enables the activators and starts listening



getAcceptBehaviours
public List<Behaviour> getAcceptBehaviours()(Code)
Returns the list of behaviours that are run when the Enter key is pressed. EventBehaviours are welcome to run these behaviours as well if they wish to accept the current edit. The list is thread safe and can be modified. Returns the acceptBehaviours.



getActivators
public Set<Activator> getActivators()(Code)
Returns the Activators that are run during activation and deactivation This list is thread safe and may be modified. Returns the activationActions.



getBehaviours
public List<EventBehaviour> getBehaviours()(Code)
Returns the EventBehaviours that may be run when an event occurs. This list is thread safe and may be modified. the EventBehaviours that may be run when an event occurs. This list is thread safe and may bemodified.



getCancelBehaviours
public List<Behaviour> getCancelBehaviours()(Code)
Returns the list of behaviours that are run when the Esc key is pressed. The list is thread safe and can be modified.
See Also:   EditToolHandler.getCommand(List) Returns the cancelBehaviours.



getCommand
public BehaviourCommand getCommand(List<Behaviour> list)(Code)
Runs a list of behaviours. Expected uses are handler.runBehaviours(handler.getAcceptBehaviours()); or handler.runBehaviours(handler.getCancelBehaviours());
Parameters:
  list -



getContext
public IToolContext getContext()(Code)
Gets the tool context object that Modes and Activators may use.



getCurrentGeom
public EditGeom getCurrentGeom()(Code)
Returns the currentGeom.



getCurrentShape
public PrimitiveShape getCurrentShape()(Code)
Returns the currentShape.



getCurrentState
public EditState getCurrentState()(Code)
Returns the currentState.



getDrawCommands
public List<IDrawCommand> getDrawCommands()(Code)
Returns the draw actions that need to be deactivated when the tool is deactivated.

This list is thread safe and may be modified.

Returns the drawCommands.



getEditBlackboard
public EditBlackboard getEditBlackboard(ILayer layer)(Code)
Gets the EditBlackboard of the map.



getEditLayer
public ILayer getEditLayer()(Code)
Returns the currently selected layer, or if the EditManager is locked, it will return the edit layer.



getEnablementBehaviours
public List<EnablementBehaviour> getEnablementBehaviours()(Code)
Returns the behaviours that determine whether the tool is active at the current locations the behaviours that determine whether the tool is active at the current locations



getLock
synchronized Lock getLock()(Code)



getMouseTracker
public MouseTracker getMouseTracker()(Code)
Returns the mouseTracker.



getTool
public AbstractEditTool getTool()(Code)



handleEvent
protected void handleEvent(MapMouseEvent e, EventType eventType)(Code)
Runs through the list of modes and runs all the modes that are valid in the current context.
Parameters:
  e - mouse event that just occurred.
Parameters:
  eventType - the type of event that just occurred



isLockOwner
public boolean isLockOwner(LockingBehaviour behaviour)(Code)
Returns true if the behaviour's LockingBehaviour.getKey(EditToolHandler) returns the key for the lock.
Parameters:
  behaviour - the behaviour to test Returns true if the behaviour's LockingBehaviour.getKey(EditToolHandler)returns the key for the lock.



isLocked
public boolean isLocked()(Code)
Returns true if Handler has been locked by EditToolHandler.lock(LockingBehaviour) Returns true if Handler has been locked by EditToolHandler.lock(LockingBehaviour)



lock
public void lock(LockingBehaviour behaviour)(Code)
Locks the handler so only the only behaviours that can run are LockingBehaviour s who's LockingBehaviour.getKey(EditToolHandler) method returns the same object as the locking LockingBehaviour 's LockingBehaviour.getKey(EditToolHandler) method.

This is not a reentrant lock so it cannot be locked multiple times. Also the lock cannot be null


Parameters:
  behaviour - the behaviour that is locking the handler



repaint
public synchronized void repaint()(Code)
All behaviours and listeners should call this method so that only one redraw is done per mouse event.



setActive
protected void setActive(boolean active)(Code)
Called by AbstractEditTool when activated.
Parameters:
  active -



setContext
protected void setContext(IToolContext context2)(Code)

Parameters:
  context2 - The context to set.



setCurrentShape
public void setCurrentShape(PrimitiveShape currentShape)(Code)



setCurrentState
public void setCurrentState(EditState currentState)(Code)

Parameters:
  currentState - The currentState to set.



setCursor
public void setCursor(int cursor_id)(Code)
Sets the ViewportPane's cursor
Parameters:
  cursor_id - the SWT.CURSOR_XXX id of the cursor to set.



setCursor
public void setCursor(String cursorID)(Code)
The method gets ID of the cursor as configured by extension or by ModalTool.*_CURSOR value corresponding to SWT.CURSOR_* constants and delegates the call to ModalTool to find the cursor in cache and set it.
Parameters:
  cursorID -



setCursor
public void setCursor(Cursor cursor)(Code)
Sets the ViewportPane's cursor
Parameters:
  cursor - new cursor



setTool
public void setTool(AbstractEditTool tool)(Code)



toString
public String toString()(Code)



unlock
public void unlock(LockingBehaviour behaviour)(Code)
Unlocks the handler so all behaviours can run. The behaviour's LockingBehaviour.getKey(EditToolHandler) method must return the same object as the locking behaviours LockingBehaviour.getKey(EditToolHandler) method.
Parameters:
  behaviour -



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.