Java Doc for BorderExtender.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » 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 » Java Advanced Imaging » javax.media.jai 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.BorderExtender

All known Subclasses:   javax.media.jai.BorderExtenderWrap,  javax.media.jai.BorderExtenderCopy,  javax.media.jai.BorderExtenderReflect,  javax.media.jai.BorderExtenderZero,  javax.media.jai.BorderExtenderConstant,
BorderExtender
abstract public class BorderExtender implements Serializable(Code)
An abstract superclass for classes that extend or "pad" a WritableRaster with additional pixel data taken from a PlanarImage. Instances of BorderExtender are used by the getExtendedData() and copyExtendedData() methods in PlanarImage.

Each instance of BorderExtender has an extend() method that takes a WritableRaster and a PlanarImage. The portion of the raster that intersects the bounds of the image will already contain a copy of the image data. The remaining area is to be filled in according to the policy of the BorderExtender subclass.

The standard subclasses of BorderExtender are BorderExtenderZero, which fills pixels with zeros; BorderExtenderConstant, which fills pixels with a given constant value; BorderExtenderCopy, which copies the edge pixels of the image; BorderExtenderWrap, which tiles the plane with repeating copies of the image; and BorderExtenderReflect, which is like BorderExtenderWrap except that each copy of the image is suitably reflected.

Instances of BorderExtenderConstant are constructed in the usual way. Instances of the other standard subclasses are obtained by means of the createInstance() method of this class.

BorderExtenderCopy is particularly useful as a way of padding image data prior to performing area or geometric operations such as convolution, scaling, and rotation.
See Also:   PlanarImage.getExtendedData
See Also:   PlanarImage.copyExtendedData
See Also:   BorderExtenderConstant
See Also:   BorderExtenderCopy
See Also:   BorderExtenderReflect
See Also:   BorderExtenderWrap
See Also:   BorderExtenderZero



Field Summary
final public static  intBORDER_COPY
     A constant for use in the createInstance method.
final public static  intBORDER_REFLECT
     A constant for use in the createInstance method.
final public static  intBORDER_WRAP
     A constant for use in the createInstance method.
final public static  intBORDER_ZERO
     A constant for use in the createInstance method.


Method Summary
public static  BorderExtendercreateInstance(int extenderType)
     Returns an instance of BorderExtender that implements a given extension policy.
abstract public  voidextend(WritableRaster raster, PlanarImage im)
     Fills in the portions of a given WritableRaster that lie outside the bounds of a given PlanarImage. Depending on the policy of the BorderExtender, data might or might not be derived from the PlanarImage.

The portion of raster that lies within im.getBounds() must not be altered.


Field Detail
BORDER_COPY
final public static int BORDER_COPY(Code)
A constant for use in the createInstance method.



BORDER_REFLECT
final public static int BORDER_REFLECT(Code)
A constant for use in the createInstance method.



BORDER_WRAP
final public static int BORDER_WRAP(Code)
A constant for use in the createInstance method.



BORDER_ZERO
final public static int BORDER_ZERO(Code)
A constant for use in the createInstance method.





Method Detail
createInstance
public static BorderExtender createInstance(int extenderType)(Code)
Returns an instance of BorderExtender that implements a given extension policy. The policies understood by this method are:

BORDER_ZERO: set sample values to zero.

BORDER_COPY: set sample values to copies of the nearest valid pixel. For example, pixels to the left of the valid rectangle will take on the value of the valid edge pixel in the same row. Pixels both above and to the left of the valid rectangle will take on the value of the upper-left pixel.

BORDER_REFLECT: the output image is defined as if mirrors were placed along the edges of the source image. Thus if the left edge of the valid rectangle lies at X = 10, pixel (9, Y) will be a copy of pixel (10, Y); pixel (6, Y) will be a copy of pixel (13, Y).

BORDER_WRAP: the source image is tiled repeatedly in the plane.

Note that this method may not be used to create an instance of BorderExtenderConstant.

Any other input value will cause an IllegalArgumentException to be thrown.
Parameters:
  extenderType - The type of BorderExtender to create.Must be one of the predefined class constantsBORDER_COPY,BORDER_REFLECT,BORDER_WRAP, orBORDER_ZERO. IllegalArgumentException if the suppliedparameter is not one of the supported predefined constants.




extend
abstract public void extend(WritableRaster raster, PlanarImage im)(Code)
Fills in the portions of a given WritableRaster that lie outside the bounds of a given PlanarImage. Depending on the policy of the BorderExtender, data might or might not be derived from the PlanarImage.

The portion of raster that lies within im.getBounds() must not be altered. The pixels within this region should not be assumed to have any particular values.

Each subclass may implement a different policy regarding how the extension data is computed.
Parameters:
  raster - The WritableRaster the border area ofwhich is to be filled according to the policy of theBorderExtender.
Parameters:
  im - The PlanarImage which may provide thedata with which to fill the border area of theWritableRaster. IllegalArgumentException if either parameter isnull.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.