Source Code Cross Referenced for LogarithmicNumberIterator.java in  » GIS » GeoTools-2.4.1 » org » geotools » axis » 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 » GeoTools 2.4.1 » org.geotools.axis 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         *    GeoTools - OpenSource mapping toolkit
03:         *    http://geotools.org
04:         *    (C) 2003-2006, Geotools Project Managment Committee (PMC)
05:         *    (C) 2000, Institut de Recherche pour le Développement
06:         *    (C) 1999, Pêches et Océans Canada
07:         *
08:         *    This library is free software; you can redistribute it and/or
09:         *    modify it under the terms of the GNU Lesser General Public
10:         *    License as published by the Free Software Foundation; either
11:         *    version 2.1 of the License, or (at your option) any later version.
12:         *
13:         *    This library is distributed in the hope that it will be useful,
14:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
15:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16:         *    Lesser General Public License for more details.
17:         */
18:        package org.geotools.axis;
19:
20:        // Dependencies
21:        import java.util.Locale;
22:
23:        import org.geotools.resources.XMath;
24:
25:        /**
26:         * Itérateur balayant les barres et étiquettes de graduation d'un axe logarithmique.
27:         * Cet itérateur retourne les positions des graduations à partir de la valeur minimale
28:         * jusqu'à la valeur maximale.
29:         *
30:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/extension/widgets-swing/src/main/java/org/geotools/axis/LogarithmicNumberIterator.java $
31:         * @version $Id: LogarithmicNumberIterator.java 20883 2006-08-07 13:48:09Z jgarnett $
32:         * @author Martin Desruisseaux
33:         */
34:        final class LogarithmicNumberIterator extends NumberIterator {
35:            /**
36:             * Scale and offset factors for {@link #currentPosition}
37:             */
38:            private double scale, offset;
39:
40:            /**
41:             * Construit un itérateur par défaut. La méthode {@link #init}
42:             * <u>doit</u> être appelée avant que cet itérateur ne soit
43:             * utilisable.
44:             *
45:             * @param locale Conventions à utiliser pour le formatage des nombres.
46:             */
47:            protected LogarithmicNumberIterator(final Locale locale) {
48:                super (locale);
49:            }
50:
51:            /**
52:             * Initialise l'itérateur.
53:             *
54:             * @param minimum           Valeur minimale de la première graduation.
55:             * @param maximum           Valeur limite des graduations. La dernière
56:             *                          graduation n'aura pas nécessairement cette valeur.
57:             * @param visualLength      Longueur visuelle de l'axe sur laquelle tracer la graduation.
58:             *                          Cette longueur doit être exprimée en pixels ou en points.
59:             * @param visualTickSpacing Espace à laisser visuellement entre deux marques de graduation.
60:             *                          Cet espace doit être exprimé en pixels ou en points (1/72 de pouce).
61:             */
62:            protected void init(final double minimum, final double maximum,
63:                    final float visualLength, final float visualTickSpacing) {
64:                final double logMin = XMath.log10(minimum);
65:                final double logMax = XMath.log10(maximum);
66:                super .init(logMin, logMax, visualLength, visualTickSpacing);
67:                scale = (maximum - minimum) / (logMax - logMin);
68:                offset = minimum - scale * logMin;
69:            }
70:
71:            /**
72:             * Returns the position where to draw the current tick. The
73:             * position is scaled from the graduation's minimum to maximum.
74:             */
75:            public double currentPosition() {
76:                return super .currentPosition() * scale + offset;
77:            }
78:
79:            /**
80:             * Retourne la valeur de la graduation courante. Cette méthode
81:             * peut être appelée pour une graduation majeure ou mineure.
82:             */
83:            public double currentValue() {
84:                return XMath.pow10(super.currentValue());
85:            }
86:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.