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


001:        /* 
002:         * $Id: JGraphpadGraphConstants.java,v 1.1.1.1 2005/08/04 11:21:58 gaudenz Exp $
003:         * Copyright (c) 2001-2005, Gaudenz Alder
004:         * 
005:         * All rights reserved.
006:         * 
007:         * See LICENSE file for license details. If you are unable to locate
008:         * this file please contact info (at) jgraph (dot) com.
009:         */
010:        package com.jgraph.pad.graph;
011:
012:        import java.awt.geom.Point2D;
013:        import java.util.Map;
014:
015:        import org.jgraph.graph.Edge;
016:        import org.jgraph.graph.GraphConstants;
017:
018:        import com.jgraph.pad.util.JGraphpadParallelEdgeRouter;
019:        import com.jgraph.pad.util.JGraphpadParallelSplineRouter;
020:
021:        /**
022:         * JGraphpad graph constants. Contains special constants supported by the
023:         * renderers or other functionality.
024:         */
025:        public class JGraphpadGraphConstants extends GraphConstants {
026:
027:            /**
028:             * Shared routing instance for parallel routing.
029:             */
030:            public final static Edge.Routing ROUTING_PARALLEL = JGraphpadParallelEdgeRouter.sharedInstance;
031:
032:            /**
033:             * Shared routing instance for parallel spline routing.
034:             */
035:            public final static Edge.Routing ROUTING_PARALLELSPLINE = JGraphpadParallelSplineRouter.sharedInstance;
036:
037:            /**
038:             * Key for the <code>stretchImage</code> attribute. This special attribute
039:             * contains a Boolean instance indicating whether the background image
040:             * should be stretched.
041:             */
042:            public final static String STRETCHIMAGE = "stretchImage";
043:
044:            /**
045:             * Key for the <code>groupResize</code> attribute. This special attribute
046:             * contains a Boolean instance indicating if the group should be resized
047:             * when it is collapsed. This is usually set to true before the first
048:             * collapse and then removed.
049:             */
050:            public final static String GROUPRESIZE = "groupResize";
051:
052:            /**
053:             * Key for the <code>groupReposition</code> attribute. This special
054:             * attribute contains a Boolean instance indicating if the collapsed group
055:             * should be moved to the top left corner of it's child area when it is
056:             * collapsed.
057:             */
058:            public final static String GROUPREPOSITION = "groupReposition";
059:
060:            /**
061:             * Key for the <code>vertexShape</code> attribute. This special attribute
062:             * contains an Integer instance indicating which shape should be drawn by
063:             * the renderer.
064:             */
065:            public final static String VERTEXSHAPE = "vertexShape";
066:
067:            /**
068:             * Key for the <code>sourcePortOffset</code> attribute. This special
069:             * attribute contains a Point2D instance indicating the relative position of
070:             * a port in its parents coordinate space seen from a specific edge.
071:             */
072:            public final static String SOURCEPORTOFFSET = "sourcePortOffset";
073:
074:            /**
075:             * Key for the <code>targetPortOffset</code> attribute. This special
076:             * attribute contains a Point2D instance indicating the relative position of
077:             * a port in its parents coordinate space seen from a specific edge.
078:             */
079:            public final static String TARGETPORTOFFSET = "targetPortOffset";
080:
081:            /**
082:             * Returns true if stretchImage in this map is true. Default is false.
083:             */
084:            public static final boolean isStretchImage(Map map) {
085:                Boolean boolObj = (Boolean) map.get(STRETCHIMAGE);
086:                if (boolObj != null)
087:                    return boolObj.booleanValue();
088:                return false;
089:            }
090:
091:            /**
092:             * Sets stretchImage in the specified map to the specified value.
093:             */
094:            public static final void setStretchImage(Map map,
095:                    boolean stretchImage) {
096:                map.put(STRETCHIMAGE, new Boolean(stretchImage));
097:            }
098:
099:            /**
100:             * Returns true if groupResize in this map is true. Default is false.
101:             */
102:            public static final boolean isGroupResize(Map map) {
103:                Boolean boolObj = (Boolean) map.get(GROUPRESIZE);
104:                if (boolObj != null)
105:                    return boolObj.booleanValue();
106:                return false;
107:            }
108:
109:            /**
110:             * Sets groupResize in the specified map to the specified value.
111:             */
112:            public static final void setGroupResize(Map map,
113:                    boolean stretchImage) {
114:                map.put(GROUPRESIZE, new Boolean(stretchImage));
115:            }
116:
117:            /**
118:             * Returns true if groupReposition in this map is true. Default is true.
119:             */
120:            public static final boolean isGroupReposition(Map map) {
121:                Boolean boolObj = (Boolean) map.get(GROUPREPOSITION);
122:                if (boolObj != null)
123:                    return boolObj.booleanValue();
124:                return true;
125:            }
126:
127:            /**
128:             * Sets groupReposition in the specified map to the specified value.
129:             */
130:            public static final void setGroupReposition(Map map,
131:                    boolean stretchImage) {
132:                map.put(GROUPREPOSITION, new Boolean(stretchImage));
133:            }
134:
135:            /**
136:             * Sets vertexShape in the specified map to the specified value.
137:             */
138:            public static final void setVertexShape(Map map, int shape) {
139:                map.put(VERTEXSHAPE, new Integer(shape));
140:            }
141:
142:            /**
143:             * Returns vertexShape from the specified map.
144:             */
145:            public static final int getVertexShape(Map map) {
146:                Integer intObj = (Integer) map.get(VERTEXSHAPE);
147:                if (intObj != null)
148:                    return intObj.intValue();
149:                return 0;
150:            }
151:
152:            /**
153:             * Sets sourcePortOffset in the specified map to the specified value.
154:             */
155:            public static final void setSourcePortOffset(Map map, Point2D offset) {
156:                map.put(SOURCEPORTOFFSET, offset);
157:            }
158:
159:            /**
160:             * Returns sourcePortOffset from the specified map.
161:             */
162:            public static final Point2D getSourcePortOffset(Map map) {
163:                return (Point2D) map.get(SOURCEPORTOFFSET);
164:            }
165:
166:            /**
167:             * Sets targetPortOffset in the specified map to the specified value.
168:             */
169:            public static final void setTargetPortOffset(Map map, Point2D offset) {
170:                map.put(TARGETPORTOFFSET, offset);
171:            }
172:
173:            /**
174:             * Returns targetPortOffset from the specified map.
175:             */
176:            public static final Point2D getTargetPortOffset(Map map) {
177:                return (Point2D) map.get(TARGETPORTOFFSET);
178:            }
179:
180:            /**
181:             * Returns the shared instance of the parallel routing.
182:             */
183:            public static Edge.Routing getParallelEdgeRouting() {
184:                return ROUTING_PARALLEL;
185:            }
186:
187:            /**
188:             * Returns the shared instance of the parallel spline routing.
189:             */
190:            public static Edge.Routing getParallelSplineRouting() {
191:                return ROUTING_PARALLELSPLINE;
192:            }
193:
194:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.