Java Doc for Path.java in  » 6.0-JDK-Modules » j2me » com » sun » perseus » j2d » 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 » 6.0 JDK Modules » j2me » com.sun.perseus.j2d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.perseus.j2d.Path

Path
public class Path implements SVGPath(Code)
Class for Path Data.
version:
   $Id: Path.java,v 1.7 2006/04/21 06:35:11 st125089 Exp $


Field Summary
final public static  intCLOSE_IMPL
     The internal value for close commands.
final public static  int[]COMMAND_OFFSET
     Delta offset for each command type.
final public static  byteCURVE_TO_IMPL
     The internal value for curveTo commands.
final static  intINITIAL_COMMAND_CAPACITY
     The default initial number of commands.
final static  intINITIAL_DATA_CAPACITY
     The default initial number of data entries.
final public static  byteLINE_TO_IMPL
    
final public static  byteMOVE_TO_IMPL
     The internal value for moveTo commands.
final public static  byteQUAD_TO_IMPL
    
final public static  intWIND_EVEN_ODD
     The event-odd winding rule.
final public static  intWIND_NON_ZERO
     The non-zero winding rule.
protected  byte[]commands
     An array storing the path command types.
protected  float[]data
     An array storing the path data.
protected  intlastCmdIndex
     Keeps track of the last requested command index.
protected  intlastOffset
     The offset in the data array for the last requested command.
protected  intnData
     The number of used entries in the data array.
protected  intnSegments
     The current number of segments.

Constructor Summary
public  Path()
     Default constructor.
public  Path(int commandCapacity, int dataCapacity)
     Initial constructor.
public  Path(Path model)
     Copy constructor.

Method Summary
final  intcheckOffset(int cmdIndex)
     Implementation helper.
public  voidclose()
    
public  voidcurveTo(float x1, float y1, float x2, float y2, float x3, float y3)
    
public  booleanequals(Object obj)
    
public  BoxgetBounds()
     Compute the path's bounds.
public  byte[]getCommands()
    
public  float[]getData()
    
public  intgetNumberOfSegments()
    
public  shortgetSegment(int cmdIndex)
    
public  floatgetSegmentParam(int cmdIndex, int paramIndex)
    
public  BoxgetTransformedBounds(Transform t)
     Compute the path's bounds in the transformed coordinate system.
public  voidlineTo(float x, float y)
    
public  voidmoveTo(float x, float y)
    
 voidnewCommand(int nPoints)
     Adjust the internal arrays for the requested number of points.
public  voidquadTo(float x1, float y1, float x2, float y2)
    
public  voidsetData(float[] newData)
    
Parameters:
  newData - the new path data.
public  StringtoPointsString()
     a string descriton of this Path using the points syntax.
public  StringtoPointsString(float[] d)
    
Parameters:
  d - the set of data values to use for the string conversion.
static  shorttoSVGPathCommand(int command)
    
public  StringtoString()
    
public  StringtoString(float[] d)
    
Parameters:
  d - the set of data values to use for the string conversion.

Field Detail
CLOSE_IMPL
final public static int CLOSE_IMPL(Code)
The internal value for close commands.



COMMAND_OFFSET
final public static int[] COMMAND_OFFSET(Code)
Delta offset for each command type. 2 for moveto and lineto. 4 for quadto. 6 for curveto. 0 for close.



CURVE_TO_IMPL
final public static byte CURVE_TO_IMPL(Code)
The internal value for curveTo commands.



INITIAL_COMMAND_CAPACITY
final static int INITIAL_COMMAND_CAPACITY(Code)
The default initial number of commands.



INITIAL_DATA_CAPACITY
final static int INITIAL_DATA_CAPACITY(Code)
The default initial number of data entries.



LINE_TO_IMPL
final public static byte LINE_TO_IMPL(Code)
The internal value for lineTo commands



MOVE_TO_IMPL
final public static byte MOVE_TO_IMPL(Code)
The internal value for moveTo commands.



QUAD_TO_IMPL
final public static byte QUAD_TO_IMPL(Code)
The internal value for quadTo commands



WIND_EVEN_ODD
final public static int WIND_EVEN_ODD(Code)
The event-odd winding rule.



WIND_NON_ZERO
final public static int WIND_NON_ZERO(Code)
The non-zero winding rule.



commands
protected byte[] commands(Code)
An array storing the path command types. One of MOVE_TO_IMPL, LINE_TO_IMPL, QUAD_TO_IMPL, CURVE_TO_IMPL.



data
protected float[] data(Code)
An array storing the path data. The array is a list of even length made of consecutive x/y coordinate pairs.



lastCmdIndex
protected int lastCmdIndex(Code)
Keeps track of the last requested command index.



lastOffset
protected int lastOffset(Code)
The offset in the data array for the last requested command. This is used to minimize the computation of the offset in getSegmentParam.



nData
protected int nData(Code)
The number of used entries in the data array.



nSegments
protected int nSegments(Code)
The current number of segments.




Constructor Detail
Path
public Path()(Code)
Default constructor. The initial capacity is defined by the INITIAL_COMMAND_CAPACITY and INITIAL_DATA_CAPACITY static variables.



Path
public Path(int commandCapacity, int dataCapacity)(Code)
Initial constructor. The initial capacity is defined by the capacity parameters.
Parameters:
  commandCapacity - the number of intended commands for this object. Must be positive or zero.
Parameters:
  dataCapacity - the number of intended data parametersfor this object. Must be positive or zero.



Path
public Path(Path model)(Code)
Copy constructor.
Parameters:
  model - the Path object to duplicate.




Method Detail
checkOffset
final int checkOffset(int cmdIndex)(Code)
Implementation helper. Sets the lastCmdIndex to the requested index after computing the offset corresponding to that index.
Parameters:
  cmdIndex - the new index for which the offset should be computed.



close
public void close()(Code)



curveTo
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)(Code)



equals
public boolean equals(Object obj)(Code)
true if obj is a path and all its commands are the same as this instance.



getBounds
public Box getBounds()(Code)
Compute the path's bounds. the path's bounds.



getCommands
public byte[] getCommands()(Code)
this path's commands data.



getData
public float[] getData()(Code)
this path's data.



getNumberOfSegments
public int getNumberOfSegments()(Code)



getSegment
public short getSegment(int cmdIndex) throws DOMException(Code)



getSegmentParam
public float getSegmentParam(int cmdIndex, int paramIndex) throws DOMException(Code)



getTransformedBounds
public Box getTransformedBounds(Transform t)(Code)
Compute the path's bounds in the transformed coordinate system.



lineTo
public void lineTo(float x, float y)(Code)



moveTo
public void moveTo(float x, float y)(Code)



newCommand
void newCommand(int nPoints)(Code)
Adjust the internal arrays for the requested number of points.
Parameters:
  nParams - the number of points to add to the array.



quadTo
public void quadTo(float x1, float y1, float x2, float y2)(Code)



setData
public void setData(float[] newData)(Code)

Parameters:
  newData - the new path data. The Path is only guaranteed to work afterthis method is invoked if the input data array has at least as manyentries as the current path data array and if each entry is a float array of at least two values.



toPointsString
public String toPointsString()(Code)
a string descriton of this Path using the points syntax. Thismethods throws an IllegalStateException if the path does not have the commands corresponding to the points syntax (initial move to followedby linetos and closes



toPointsString
public String toPointsString(float[] d)(Code)

Parameters:
  d - the set of data values to use for the string conversion. Thiswill fail if the input data array does not have an even number of values. a string descriton of this Path using the points syntax. Thismethods throws an IllegalStateException if the path does not have thecommands corresponding to the points syntax (initial move to followed bylinetos and closes



toSVGPathCommand
static short toSVGPathCommand(int command)(Code)



toString
public String toString()(Code)
a String representation of this path, using the SVG notation.



toString
public String toString(float[] d)(Code)

Parameters:
  d - the set of data values to use for the string conversion. Thiswill fail if the input data array does not have at least nData entries of at least 2 values. a String representation of this path, using the SVG notation.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.