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


java.lang.Object
   jj2000.j2k.ModuleSpec

All known Subclasses:   jj2000.j2k.wavelet.synthesis.SynWTFilterSpec,  jj2000.j2k.quantization.QuantTypeSpec,  jj2000.j2k.entropy.ProgressionSpec,  jj2000.j2k.wavelet.analysis.AnWTFilterSpec,  jj2000.j2k.roi.MaxShiftSpec,  jj2000.j2k.quantization.GuardBitsSpec,  jj2000.j2k.image.CompTransfSpec,  jj2000.j2k.quantization.QuantStepSizeSpec,  jj2000.j2k.IntegerSpec,  jj2000.j2k.entropy.PrecinctSizeSpec,  jj2000.j2k.entropy.CBlkSizeSpec,  jj2000.j2k.StringSpec,
ModuleSpec
public class ModuleSpec implements Cloneable(Code)
This generic class is used to handle values to be used by a module for each tile and component. It uses attribute to determine which value to use. It should be extended by each module needing this feature. This class might be used for values that are only tile specific or component specific but not both.

The attributes to use are defined by a hierarchy. The hierarchy is:

  • Tile and component specific attribute
  • Tile specific default attribute
  • Component main default attribute
  • Main default attribute


Field Summary
final public static  byteSPEC_COMP_DEF
    
final public static  byteSPEC_DEF
    
final public static  byteSPEC_TILE_COMP
    
final public static  byteSPEC_TILE_DEF
    
final public static  byteSPEC_TYPE_COMP
    
final public static  byteSPEC_TYPE_TILE
    
final public static  byteSPEC_TYPE_TILE_COMP
    
protected  Object[]compDef
     The default value for each component.
protected  Objectdef
    
protected  intnComp
    
protected  intnTiles
    
protected  intspecType
    
protected  byte[][]specValType
     The spec type for each tile-component.
protected  Stringspecified
    
protected  HashtabletileCompVal
     The specific value for each tile-component.
protected  Object[]tileDef
     The default value for each tile.

Constructor Summary
public  ModuleSpec(int nt, int nc, byte type)
     Constructs a 'ModuleSpec' object, initializing all the components and tiles to the 'SPEC_DEF' spec val type, for the specified number of components and tiles.
Parameters:
  nt - The number of tiles
Parameters:
  nc - The number of components
Parameters:
  type - the type of the specification module i.e.

Method Summary
protected  Objectclone()
    
public  ObjectgetCompDef(int c)
     Gets default value of the specified component.
public  ModuleSpecgetCopy()
    
public  ObjectgetDefault()
     Gets default value for this module.
protected  ObjectgetSpec(int t, int c)
     Gets value of specified tile-component without knowing if a specific tile-component value has been previously entered.
public  bytegetSpecValType(int t, int c)
     Return the spec type of the given tile-component.
public  ObjectgetTileCompVal(int t, int c)
     Gets value of specified tile-component.
public  ObjectgetTileDef(int t)
     Gets default value of the specified tile.
public  booleanisCompSpecified(int c)
     Whether or not specifications have been entered for the given component.
public  booleanisTileCompSpecified(int t, int c)
    
public  booleanisTileSpecified(int t)
     Whether or not specifications have been entered for the given tile.
final public static  boolean[]parseIdx(String word, int maxIdx)
     This method is responsible of parsing tile indexes set and component indexes set for an option.
public  voidrotate90(Point anT)
     Rotate the ModuleSpec instance by 90 degrees (this modifies only tile and tile-component specifications).
Parameters:
  nT - Number of tiles along horizontal and vertical axis afterrotation.
public  voidsetCompDef(int c, Object value)
     Sets default value for specified component and specValType tag if allowed by its priority.
public  voidsetDefault(Object value)
    
public  voidsetTileCompVal(int t, int c, Object value)
     Sets value for specified tile-component.
public  voidsetTileDef(int t, Object value)
     Sets default value for specified tile and specValType tag if allowed by its priority.

Field Detail
SPEC_COMP_DEF
final public static byte SPEC_COMP_DEF(Code)
The identifier for "component default" specification



SPEC_DEF
final public static byte SPEC_DEF(Code)
The identifier for default specification



SPEC_TILE_COMP
final public static byte SPEC_TILE_COMP(Code)
The identifier for a "tile-component" specification



SPEC_TILE_DEF
final public static byte SPEC_TILE_DEF(Code)
The identifier for "tile default" specification



SPEC_TYPE_COMP
final public static byte SPEC_TYPE_COMP(Code)
The identifier for a specification module that applies only to components



SPEC_TYPE_TILE
final public static byte SPEC_TYPE_TILE(Code)
The identifier for a specification module that applies only to tiles



SPEC_TYPE_TILE_COMP
final public static byte SPEC_TYPE_TILE_COMP(Code)
The identifier for a specification module that applies both to tiles and components



compDef
protected Object[] compDef(Code)
The default value for each component. Null if no component specific value is defined



def
protected Object def(Code)
Default value for each tile-component



nComp
protected int nComp(Code)
The number of components



nTiles
protected int nTiles(Code)
The number of tiles



specType
protected int specType(Code)
The type of the specification module



specValType
protected byte[][] specValType(Code)
The spec type for each tile-component. The first index is the tile index, the second is the component index.



specified
protected String specified(Code)
The specified value in string format



tileCompVal
protected Hashtable tileCompVal(Code)
The specific value for each tile-component. Value of tile 16 component 3 is accessible through the hash value "t16c3". Null if no tile-component specific value is defined



tileDef
protected Object[] tileDef(Code)
The default value for each tile. Null if no tile specific value is defined




Constructor Detail
ModuleSpec
public ModuleSpec(int nt, int nc, byte type)(Code)
Constructs a 'ModuleSpec' object, initializing all the components and tiles to the 'SPEC_DEF' spec val type, for the specified number of components and tiles.
Parameters:
  nt - The number of tiles
Parameters:
  nc - The number of components
Parameters:
  type - the type of the specification module i.e. tile specific,component specific or both.




Method Detail
clone
protected Object clone()(Code)



getCompDef
public Object getCompDef(int c)(Code)
Gets default value of the specified component. If no specification have been entered for this component, returns default value.
Parameters:
  c - Component index The default value for this component (Must be casted beforeuse)
See Also:   ModuleSpec.setCompDef



getCopy
public ModuleSpec getCopy()(Code)



getDefault
public Object getDefault()(Code)
Gets default value for this module. The default value (Must be casted before use)



getSpec
protected Object getSpec(int t, int c)(Code)
Gets value of specified tile-component without knowing if a specific tile-component value has been previously entered. It first check if a tile-component specific value has been entered, then if a tile specific value exist, then if a component specific value exist. If not the default value is returned.
Parameters:
  t - Tile index
Parameters:
  c - Component index Value for this tile component.



getSpecValType
public byte getSpecValType(int t, int c)(Code)
Return the spec type of the given tile-component.
Parameters:
  t - Tile index
Parameters:
  c - Component index



getTileCompVal
public Object getTileCompVal(int t, int c)(Code)
Gets value of specified tile-component. This method calls getSpec but has a public access.
Parameters:
  t - Tile index
Parameters:
  c - Component index The value of this tile-component (Must be casted before use)
See Also:   ModuleSpec.setTileCompVal
See Also:   ModuleSpec.getSpec



getTileDef
public Object getTileDef(int t)(Code)
Gets default value of the specified tile. If no specification has been entered, it returns the default value.
Parameters:
  t - Tile index The default value for this tile (Must be casted before use)
See Also:   ModuleSpec.setTileDef



isCompSpecified
public boolean isCompSpecified(int c)(Code)
Whether or not specifications have been entered for the given component.
Parameters:
  c - Index of the component True if component specification has been defined



isTileCompSpecified
public boolean isTileCompSpecified(int t, int c)(Code)
Whether or not a tile-component specification has been defined
Parameters:
  t - Tile index
Parameters:
  c - Component index True if a tile-component specification has been defined.



isTileSpecified
public boolean isTileSpecified(int t)(Code)
Whether or not specifications have been entered for the given tile.
Parameters:
  t - Index of the tile True if tile specification has been entered



parseIdx
final public static boolean[] parseIdx(String word, int maxIdx)(Code)
This method is responsible of parsing tile indexes set and component indexes set for an option. Such an argument must follow the following policy:
t\ or c\ where tile or component indexes are separated by commas or a dashes.

Example:

  • t0,3,4 means tiles with indexes 0, 3 and 4.
  • t2-4 means tiles with indexes 2,3 and 4.
    It returns a boolean array skteching which tile or component are concerned by the next parameters.
    Parameters:
      word - The word to parse.
    Parameters:
      maxIdx - Maximum authorized index Indexes concerned by this parameter.



  • rotate90
    public void rotate90(Point anT)(Code)
    Rotate the ModuleSpec instance by 90 degrees (this modifies only tile and tile-component specifications).
    Parameters:
      nT - Number of tiles along horizontal and vertical axis afterrotation.



    setCompDef
    public void setCompDef(int c, Object value)(Code)
    Sets default value for specified component and specValType tag if allowed by its priority.
    Parameters:
      c - Component index



    setDefault
    public void setDefault(Object value)(Code)
    Sets default value for this module



    setTileCompVal
    public void setTileCompVal(int t, int c, Object value)(Code)
    Sets value for specified tile-component.
    Parameters:
      t - Tie index
    Parameters:
      c - Component index



    setTileDef
    public void setTileDef(int t, Object value)(Code)
    Sets default value for specified tile and specValType tag if allowed by its priority.
    Parameters:
      c - Tile index.



    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.