Java Doc for JGraphpadVertexTool.java in  » Graphic-Library » jgraphpad » com » jgraph » pad » 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 » Graphic Library » jgraphpad » com.jgraph.pad.tool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jgraph.editor.JGraphEditorTool
   com.jgraph.pad.tool.JGraphpadVertexTool

All known Subclasses:   com.jgraph.pad.tool.JGraphpadEdgeTool,
JGraphpadVertexTool
public class JGraphpadVertexTool extends JGraphEditorTool (Code)
Tool that inserts vertices based on a prototype.


Field Summary
final public static  StringNAME_VERTEXTOOL
     Defines the default name for tools of this kind.
protected transient  booleanpreviewEnabled
     Specifies if the cellview should be previewed.
protected transient  CellViewpreviewView
     Preview vertex view.
protected  Objectprototype
     Holds the prototype to create new cells with.
protected  DimensionsingleClickSize
     Defines the default size for vertices that are generated with a single click.
protected  intthreshold
     Defines the threshhold (minimum size) for a drag to be used for an insert.

Constructor Summary
public  JGraphpadVertexTool(Object prototype)
     Constructs a new vertex tool for the specified prototype using JGraphpadVertexTool.NAME_VERTEXTOOL .
public  JGraphpadVertexTool(String name, Object prototype)
     Constructs a new vertex tool for the specified name and prototype.

Method Summary
protected  ObjectcreateCell(GraphModel model)
     Returns a deep clone of the cell prototype.
Parameters:
  model - The model to use for cloning the prototype.
protected  voidexecute(JGraph graph, Object cell)
     Provides a hook for subclassers to insert the specified cell into cache.
public  ObjectgetPrototype()
     Returns the prototype used to create new cells.
public  DimensiongetSingleClickSize()
     Returns the single click size which should be used to insert cells with a single click.
public  intgetThreshold()
     Returns the threshold for a drag to count as an insert.
protected  booleanisConstrainedSizeEvent(MouseEvent event)
     Hook for subclassers to define the key assignments for constrained inserts.
public  booleanisPreviewEnabled()
     Sets if the cellview should be previewed.
public  voidmousePressed(MouseEvent event)
     Extends the parent's implementation to create a clone of the pototype using JGraphpadVertexTool.createCell(GraphModel) and a new view using the layout cache's factory.
public  voidmouseReleased(MouseEvent event)
     Overrides the parent's implementation to check if the event triggers an insert (checks JGraphpadVertexTool.threshold & JGraphpadVertexTool.singleClickSize ) and inserts the cell stored in JGraphpadVertexTool.previewView using JGraphpadVertexTool.execute(GraphLayoutCache,Object) .
public  voidoverlay(JGraph graph, Graphics g, boolean clear)
     Extends the parent's implementation to draw the JGraphpadVertexTool.previewView .
protected  voidprocessMouseDraggedEvent(MouseEvent event)
     Overrides the parent's implementation to update the preview bounds to the current org.jgraph.graph.BasicMarqueeHandler.marqueeBounds .
public  voidsetPreviewEnabled(boolean previewEnabled)
     Returns if the cellview should be previewed.
public  voidsetPrototype(Object prototype)
     Sets the prototype to be used to create new cells.
public  voidsetSingleClickSize(Dimension singleClickSize)
     Sets the size of cells to be inserted with a single click.
public  voidsetThreshold(int threshold)
     Sets the threshold for a drag to count as an insert.

Field Detail
NAME_VERTEXTOOL
final public static String NAME_VERTEXTOOL(Code)
Defines the default name for tools of this kind.



previewEnabled
protected transient boolean previewEnabled(Code)
Specifies if the cellview should be previewed. Default is true.



previewView
protected transient CellView previewView(Code)
Preview vertex view.



prototype
protected Object prototype(Code)
Holds the prototype to create new cells with.



singleClickSize
protected Dimension singleClickSize(Code)
Defines the default size for vertices that are generated with a single click. A value of null ignores single clicks. Default is null.



threshold
protected int threshold(Code)
Defines the threshhold (minimum size) for a drag to be used for an insert. Default is 4.




Constructor Detail
JGraphpadVertexTool
public JGraphpadVertexTool(Object prototype)(Code)
Constructs a new vertex tool for the specified prototype using JGraphpadVertexTool.NAME_VERTEXTOOL .
Parameters:
  prototype - The prototype cell to create new vertices with.



JGraphpadVertexTool
public JGraphpadVertexTool(String name, Object prototype)(Code)
Constructs a new vertex tool for the specified name and prototype.
Parameters:
  name - The name of the tool to be created.
Parameters:
  prototype - The prototype cell to create new vertices with.




Method Detail
createCell
protected Object createCell(GraphModel model)(Code)
Returns a deep clone of the cell prototype.
Parameters:
  model - The model to use for cloning the prototype. Returns a clone of JGraphpadVertexTool.prototype.



execute
protected void execute(JGraph graph, Object cell)(Code)
Provides a hook for subclassers to insert the specified cell into cache. This implementation passes the cell to the GraphLayoutCache.insert(Object) .
Parameters:
  cache - The cache into which to insert the edge.
Parameters:
  cell - The cell to be inserted into cache.



getPrototype
public Object getPrototype()(Code)
Returns the prototype used to create new cells. Returns the prototype.



getSingleClickSize
public Dimension getSingleClickSize()(Code)
Returns the single click size which should be used to insert cells with a single click. Returns the singleClickSize.



getThreshold
public int getThreshold()(Code)
Returns the threshold for a drag to count as an insert. Returns the threshold.



isConstrainedSizeEvent
protected boolean isConstrainedSizeEvent(MouseEvent event)(Code)
Hook for subclassers to define the key assignments for constrained inserts. This implementation redirects to BasicGraphUI.isConstrainedMoveEvent(MouseEvent) .
Parameters:
  event - The object that describes the event.



isPreviewEnabled
public boolean isPreviewEnabled()(Code)
Sets if the cellview should be previewed. Returns the previewEnabled.



mousePressed
public void mousePressed(MouseEvent event)(Code)
Extends the parent's implementation to create a clone of the pototype using JGraphpadVertexTool.createCell(GraphModel) and a new view using the layout cache's factory. The view is then configured and stored in JGraphpadVertexTool.previewView .
Parameters:
  event - The object that describes the event.



mouseReleased
public void mouseReleased(MouseEvent event)(Code)
Overrides the parent's implementation to check if the event triggers an insert (checks JGraphpadVertexTool.threshold & JGraphpadVertexTool.singleClickSize ) and inserts the cell stored in JGraphpadVertexTool.previewView using JGraphpadVertexTool.execute(GraphLayoutCache,Object) .
Parameters:
  event - The object that describes the event.



overlay
public void overlay(JGraph graph, Graphics g, boolean clear)(Code)
Extends the parent's implementation to draw the JGraphpadVertexTool.previewView .
Parameters:
  graph - The graph to paint in.
Parameters:
  g - The graphics to use for paiting.
Parameters:
  clear - Wether to clear the display.



processMouseDraggedEvent
protected void processMouseDraggedEvent(MouseEvent event)(Code)
Overrides the parent's implementation to update the preview bounds to the current org.jgraph.graph.BasicMarqueeHandler.marqueeBounds .
Parameters:
  event - The object that describes the event.



setPreviewEnabled
public void setPreviewEnabled(boolean previewEnabled)(Code)
Returns if the cellview should be previewed.
Parameters:
  previewEnabled - The previewEnabled to set.



setPrototype
public void setPrototype(Object prototype)(Code)
Sets the prototype to be used to create new cells.
Parameters:
  prototype - The prototype to set.



setSingleClickSize
public void setSingleClickSize(Dimension singleClickSize)(Code)
Sets the size of cells to be inserted with a single click.
Parameters:
  singleClickSize - The singleClickSize to set.



setThreshold
public void setThreshold(int threshold)(Code)
Sets the threshold for a drag to count as an insert.
Parameters:
  threshold - The threshold to set.



Fields inherited from com.jgraph.editor.JGraphEditorTool
protected boolean isAlwaysActive(Code)(Java Doc)
protected String name(Code)(Java Doc)

Methods inherited from com.jgraph.editor.JGraphEditorTool
public String getName()(Code)(Java Doc)
public boolean isAlwaysActive()(Code)(Java Doc)
public void setAlwaysActive(boolean isAlwaysActive)(Code)(Java Doc)
public void setName(String name)(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.