Java Doc for ImageControl.java in  » Web-Framework » jWic » de » jwic » controls » 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 » Web Framework » jWic » de.jwic.controls 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.jwic.base.ControlContainer
   de.jwic.controls.ImageControl

ImageControl
abstract public class ImageControl extends ControlContainer implements IResourceControl(Code)
Default IImageControl implementation that support linked map. ImageControl.vtl uses jWic ajax update listener to replace the image without flicker. IE 6 has a bug when working with img tag using a map: An update to the map without updating its img also crashes the IE6!
author:
   jbornema

Inner Class :public class Shape implements Serializable

Field Summary
final public static  StringMIME_TYPE_GIF
    
final public static  StringMIME_TYPE_JPG
    
final public static  StringMIME_TYPE_PNG
    
final public static  StringSHAPE_TYPE_CIRCLE
    
final public static  StringSHAPE_TYPE_POLY
    
final public static  StringSHAPE_TYPE_RECT
    
protected  booleancreateUniqueURL
    
protected  intheight
    
protected  booleanhidden
    
protected  StringinfoMessage
    
protected  StringmimeType
    
protected  Listshapes
    
protected  intwidth
    

Constructor Summary
public  ImageControl(IControlContainer container, String name)
    

Method Summary
public  voidactionPerformed(String actionId, String parameter)
    
public  voidaddShape(String type, String coords, String title, String url)
     Adds a shape of type SHAPE_TYPE_RECT, ..._CIRLCE or ..._POLY with url and title.
public  voidaddShape(String type, String coords, String title)
    
public  voidattachResource(HttpServletRequest req, HttpServletResponse res)
    
public  StringcreateImageURL()
     Create a URL to this image.
abstract public  StringgetFilename()
     The filename is used in the servlet response and in the html rendering.
public  intgetHeight()
     Return the image height in pixel.
public  ByteArrayOutputStreamgetImageOutputStream()
     Return the ByteArrayOutputStream renderImage() must write the binary image data into.
public  StringgetInfoMessage()
     Return the info message that is used for img title attribute and is also displayed in window.status.
public  StringgetMimeType()
     Return the mime type for this image, like MIME_TYPE_JPG.
public  ListgetShapes()
     Return Collection of Shape objects that had been added with addShape(...).
public  intgetWidth()
     Return the image width in pixel.
public  booleanisCreateUniqueURL()
     Return true if on every createUniqueURL() a new URL is created.
public  booleanisHidden()
     Return true if control should be rendered with no content.
abstract public  voidrenderImage()
     Renders the image data to imageOutputStream. Don't forget to set the appropiate mime type and call ByteArrayOutputStream.reset() before generating the image data again.
public  StringrenderImage(OutputStream out)
     Renders the image data to the writer.
public  voidsetCreateUniqueURL(boolean createUniqueURL)
     Set if on every createUniqueURL() a new URL is created.
public  voidsetHeight(int height)
     Set the image height in pixel.
public  voidsetHidden(boolean hidden)
     Set if control should be rendered with no content.
public  voidsetInfoMessage(String infoMessage)
     Set the info message that is used for img title attribute and is also displayed in window.status.
public  voidsetMimeType(String mimeType)
     Set the mime type for this image, like MIME_TYPE_JPG.
public  voidsetRequireRedraw(boolean requireRedraw)
    
public  voidsetWidth(int width)
     Set the image width in pixel.

Field Detail
MIME_TYPE_GIF
final public static String MIME_TYPE_GIF(Code)



MIME_TYPE_JPG
final public static String MIME_TYPE_JPG(Code)



MIME_TYPE_PNG
final public static String MIME_TYPE_PNG(Code)



SHAPE_TYPE_CIRCLE
final public static String SHAPE_TYPE_CIRCLE(Code)



SHAPE_TYPE_POLY
final public static String SHAPE_TYPE_POLY(Code)



SHAPE_TYPE_RECT
final public static String SHAPE_TYPE_RECT(Code)



createUniqueURL
protected boolean createUniqueURL(Code)



height
protected int height(Code)



hidden
protected boolean hidden(Code)



infoMessage
protected String infoMessage(Code)



mimeType
protected String mimeType(Code)



shapes
protected List shapes(Code)



width
protected int width(Code)




Constructor Detail
ImageControl
public ImageControl(IControlContainer container, String name)(Code)

Parameters:
  container -
Parameters:
  name -




Method Detail
actionPerformed
public void actionPerformed(String actionId, String parameter)(Code)



addShape
public void addShape(String type, String coords, String title, String url)(Code)
Adds a shape of type SHAPE_TYPE_RECT, ..._CIRLCE or ..._POLY with url and title. If url is null no "clickable" link is added. Depending on the shape type the coords follow different syntax: SHAPE_TYPE_RECT: "x1,y1,x2,y2" SHAPE_TYPE_CIRCLE: "x,y,r" SHAPE_TYPE_POLY: "x1,y1[,x2,y2[,...]]"
Parameters:
  type -
Parameters:
  coords -
Parameters:
  url -
Parameters:
  title -



addShape
public void addShape(String type, String coords, String title)(Code)
Same as addShape(type, coords, title, null)
Parameters:
  type -
Parameters:
  coords -
Parameters:
  title -



attachResource
public void attachResource(HttpServletRequest req, HttpServletResponse res) throws IOException(Code)



createImageURL
public String createImageURL()(Code)
Create a URL to this image. Current milliseconds is part of that URL is createUniqueURL is set.



getFilename
abstract public String getFilename()(Code)
The filename is used in the servlet response and in the html rendering. The filename for the created image.



getHeight
public int getHeight()(Code)
Return the image height in pixel.



getImageOutputStream
public ByteArrayOutputStream getImageOutputStream()(Code)
Return the ByteArrayOutputStream renderImage() must write the binary image data into. Should call reset() to it before creating the image data again.



getInfoMessage
public String getInfoMessage()(Code)
Return the info message that is used for img title attribute and is also displayed in window.status.



getMimeType
public String getMimeType()(Code)
Return the mime type for this image, like MIME_TYPE_JPG.



getShapes
public List getShapes()(Code)
Return Collection of Shape objects that had been added with addShape(...).



getWidth
public int getWidth()(Code)
Return the image width in pixel.



isCreateUniqueURL
public boolean isCreateUniqueURL()(Code)
Return true if on every createUniqueURL() a new URL is created. Default is false.



isHidden
public boolean isHidden()(Code)
Return true if control should be rendered with no content. Used to render the JavaScript if control should be invisible. Should be used instead of visible attribute.



renderImage
abstract public void renderImage() throws IOException(Code)
Renders the image data to imageOutputStream. Don't forget to set the appropiate mime type and call ByteArrayOutputStream.reset() before generating the image data again.
throws:
  IOException -



renderImage
public String renderImage(OutputStream out) throws IOException(Code)
Renders the image data to the writer.
Parameters:
  writer - Mime encoding type like "image/jpg" or "image/gif"
throws:
  IOException -



setCreateUniqueURL
public void setCreateUniqueURL(boolean createUniqueURL)(Code)
Set if on every createUniqueURL() a new URL is created. Default is false.
Parameters:
  createUniqueURL -



setHeight
public void setHeight(int height)(Code)
Set the image height in pixel.
Parameters:
  height -



setHidden
public void setHidden(boolean hidden)(Code)
Set if control should be rendered with no content. Used to render the JavaScript if control should be invisible. Should be used instead of visible attribute.
Parameters:
  hidden -



setInfoMessage
public void setInfoMessage(String infoMessage)(Code)
Set the info message that is used for img title attribute and is also displayed in window.status.
Parameters:
  infoMessage -



setMimeType
public void setMimeType(String mimeType)(Code)
Set the mime type for this image, like MIME_TYPE_JPG.
Parameters:
  mimeType -



setRequireRedraw
public void setRequireRedraw(boolean requireRedraw)(Code)



setWidth
public void setWidth(int width)(Code)
Set the image width in pixel.
Parameters:
  width -



Methods inherited from de.jwic.base.ControlContainer
public void adopt(Control control, String name)(Code)(Java Doc)
public void destroy()(Code)(Java Doc)
public Control getControl(String name)(Code)(Java Doc)
public Iterator getControls()(Code)(Java Doc)
public boolean isRenderingRelevant(Control childControl)(Code)(Java Doc)
public void registerControl(Control control, String name) throws JWicException(Code)(Java Doc)
public void removeControl(String controlName)(Code)(Java Doc)
public void unregisterControl(Control control)(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.