Source Code Cross Referenced for Point.java in  » PDF » PDFjet » com » pdfjet » 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 » PDF » PDFjet » com.pdfjet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *  Point.java
003:         *
004:        Copyright (c) 2007, Innovatics Inc.
005:
006:        All rights reserved.
007:
008:        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
009:
010:         * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
011:         * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
012:
013:        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
014:        "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
015:        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
016:        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
017:        CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
018:        EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
019:        PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
020:        PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
021:        LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
022:        NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
023:        SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
024:         */package com.pdfjet;
025:
026:        import java.lang.*;
027:        import java.util.*;
028:
029:        //>>>>pdfjet {
030:        public class Point {
031:
032:            public static final int INVISIBLE = -1;
033:            public static final int CIRCLE = 0;
034:            public static final int DIAMOND = 1;
035:            public static final int BOX = 2;
036:            public static final int PLUS = 3;
037:            public static final int H_DASH = 4;
038:            public static final int V_DASH = 5;
039:            public static final int MULTIPLY = 6;
040:            public static final int STAR = 7;
041:            public static final int X_MARK = 8;
042:            public static final int UP_ARROW = 9;
043:            public static final int DOWN_ARROW = 10;
044:            public static final int LEFT_ARROW = 11;
045:            public static final int RIGHT_ARROW = 12;
046:
047:            public static final boolean IS_CURVE_POINT = true;
048:
049:            protected double x = 0.0;
050:            protected double y = 0.0;
051:            protected double r = 2.0;
052:
053:            protected int shape = 0;
054:            protected double[] color = { 0.0, 0.0, 0.0 };
055:            protected double line_width = 0.3;
056:            protected String line_pattern = "[] 0";
057:            protected boolean fill_shape = false;
058:
059:            protected boolean isCurvePoint = false;
060:
061:            protected String text = null;
062:            protected String uri = null;
063:            protected List<String> info = null;
064:
065:            // drawLineTo == false means:
066:            //      Don't draw a line to this point from the previous
067:            protected boolean drawLineTo = false;
068:
069:            private double box_x = 0.0;
070:            private double box_y = 0.0;
071:
072:            public Point() {
073:            }
074:
075:            public Point(double x, double y) {
076:                this .x = x;
077:                this .y = y;
078:            }
079:
080:            public Point(double x, double y, boolean isCurvePoint) {
081:                this .x = x;
082:                this .y = y;
083:                this .isCurvePoint = isCurvePoint;
084:            }
085:
086:            public void setPosition(double x, double y) {
087:                this .x = x;
088:                this .y = y;
089:            }
090:
091:            public void setX(double x) {
092:                this .x = x;
093:            }
094:
095:            public double getX() {
096:                return x;
097:            }
098:
099:            public void setY(double y) {
100:                this .y = y;
101:            }
102:
103:            public double getY() {
104:                return y;
105:            }
106:
107:            public void setRadius(double r) {
108:                this .r = r;
109:            }
110:
111:            public double getRadius() {
112:                return r;
113:            }
114:
115:            public void setShape(int shape) {
116:                this .shape = shape;
117:            }
118:
119:            public int getShape() {
120:                return shape;
121:            }
122:
123:            public void setFillShape(boolean fill) {
124:                this .fill_shape = fill;
125:            }
126:
127:            public boolean getFillShape() {
128:                return fill_shape;
129:            }
130:
131:            public void setColor(double[] color) {
132:                this .color = color;
133:            }
134:
135:            public double[] getColor() {
136:                return color;
137:            }
138:
139:            public void setLineWidth(double line_width) {
140:                this .line_width = line_width;
141:            }
142:
143:            public double getLineWidth() {
144:                return line_width;
145:            }
146:
147:            public void setLinePattern(String line_pattern) {
148:                this .line_pattern = line_pattern;
149:            }
150:
151:            public String getLinePattern() {
152:                return line_pattern;
153:            }
154:
155:            public void setDrawLineTo(boolean drawLineTo) {
156:                this .drawLineTo = drawLineTo;
157:            }
158:
159:            public boolean getDrawLineTo() {
160:                return drawLineTo;
161:            }
162:
163:            public void setURIAction(String uri) {
164:                this .uri = uri;
165:            }
166:
167:            public String getURIAction() {
168:                return uri;
169:            }
170:
171:            public void setText(String text) {
172:                this .text = text;
173:            }
174:
175:            public String getText() {
176:                return text;
177:            }
178:
179:            public void setInfo(List<String> info) {
180:                this .info = info;
181:            }
182:
183:            public List<String> getInfo() {
184:                return info;
185:            }
186:
187:            public void placeIn(Box box, double x_offset, double y_offset)
188:                    throws Exception {
189:                box_x = box.x + x_offset;
190:                box_y = box.y + y_offset;
191:            }
192:
193:            public void drawOn(Page page) throws Exception {
194:                page.setPenWidth(line_width);
195:                page.setLinePattern(line_pattern);
196:
197:                if (fill_shape) {
198:                    page.setBrushColor(color[0], color[1], color[2]);
199:                } else {
200:                    page.setPenColor(color[0], color[1], color[2]);
201:                }
202:
203:                x += box_x;
204:                y += box_y;
205:                page.drawPoint(this );
206:                x -= box_x;
207:                y -= box_y;
208:            }
209:
210:        } // End of Point.java
211:        //>>>>}
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.