Java Doc for XCaptionedImage.java in  » XML-UI » xui32 » com » xoetrope » swing » 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 » XML UI » xui32 » com.xoetrope.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.xoetrope.swing.XCaptionedImage

XCaptionedImage
public class XCaptionedImage extends XPanel implements XAttributedComponent,XContentHolder,XStateListener,MouseListener(Code)
An extension of the XImage component that adds a caption to the image and an optional border

Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Xoetrope.

$Revision: 1.21 $



Field Summary
protected  intborders
    
protected  XLabelcaption
    
protected  XClickListenerclickListener
    
protected  XProjectcurrentProject
     The owner project and the context in which this object operates.
protected  XImageimage
    
protected  StringimgName
    
protected  ArrayListlisteners
    
protected  intminWidthminHeightmaxWidthmaxHeightprefWidthprefHeight
    
protected  intpadding
    
protected  booleanshadowtooltipSet
    

Constructor Summary
public  XCaptionedImage()
    

Method Summary
public  voidadd(Object c, Object constraint)
    
public  voidaddCaptionListener(MouseListener l)
     Adds a mouse listener to this component to listen for mouse events.
Parameters:
  l - the MouseListener that is to be added.
public  intfindCurrentResponse(int x, int y)
    
protected  voidfireActionPerformed(MouseEvent event)
     Notifies all mouse listeners that have registered interest for notification on mouse event types.
public  intgetAlignment()
    
public  intgetBorders()
     Gets the border flag value.
public  StringgetCaption()
    
public  StringgetCaptionStyle()
    
public  ObjectgetChildComponent(int i)
    
public  booleangetFillBorder()
     Gets the fill border flag value.
public  XImagegetImage()
     Returns the XImage instance used by ths class.
public  StringgetImageName()
     Gets the name of the image being displayed.
public  StringgetImageStyle()
    
public  InsetsgetInsets()
    
public  DimensiongetMaximumSize()
    
public  intgetMinHeight()
    
public  intgetMinWidth()
    
public  DimensiongetMinimumSize()
    
public  booleangetOpaque()
    
public  intgetPadding()
    
public  DimensiongetPreferredSize()
    
public  booleangetShadow()
     Gets the shadow flag value.
public  voidmouseClicked(MouseEvent e)
     Fired when a mouse is clicked on this component.
public  voidmouseEntered(MouseEvent e)
     Fired when a mouse enters this component.
public  voidmouseExited(MouseEvent e)
     Fired when a mouse exited this component.
public  voidmousePressed(MouseEvent e)
     Fired when a mouse is pressed on this component.
public  voidmouseReleased(MouseEvent e)
     Fired when a mouse is released on this component.
public  voidpaintComponent(Graphics g)
    
public  voidpaintStates()
    
public  voidremove(Object c)
    
public  voidremoveCaptionListener(MouseListener l)
     Removes a mouse listener to this component.
public  booleanrespond()
     Called by XClickListener to check if a response event should be sent to the parent form.
public  voidsetAlignment(int align)
    
public  intsetAttribute(String attribName, Object attribValue)
     Set one or more attributes of the component.
public  voidsetBorders(int bv)
     Sets the border flag value.
public  voidsetCaption(String s)
    
public  voidsetCaptionStyle(String newStyle)
    
public  voidsetContent(String content)
    
public  voidsetEnabled(boolean state)
    
public  voidsetImageName(String name)
     Gets the name of the image being displayed.
public  voidsetImageStyle(String newStyle)
    
public  voidsetMinHeight(int value)
    
public  voidsetMinWidth(int value)
    
public  voidsetName(String value)
     Sets the XImage instance to have the same name as the instansiating class.
public  voidsetNextAttributes(Object attribs)
    
public  voidsetPadding(int pad)
    
public  booleansetState(int x, int y, int defResponse)
    
public  voidsetup(String name, int preferredWidth, int preferredHeight, Hashtable params)
    
public  voidupdateSelectedState()
    

Field Detail
borders
protected int borders(Code)



caption
protected XLabel caption(Code)



clickListener
protected XClickListener clickListener(Code)



currentProject
protected XProject currentProject(Code)
The owner project and the context in which this object operates.



image
protected XImage image(Code)



imgName
protected String imgName(Code)



listeners
protected ArrayList listeners(Code)



minWidthminHeightmaxWidthmaxHeightprefWidthprefHeight
protected int minWidthminHeightmaxWidthmaxHeightprefWidthprefHeight(Code)



padding
protected int padding(Code)



shadowtooltipSet
protected boolean shadowtooltipSet(Code)




Constructor Detail
XCaptionedImage
public XCaptionedImage()(Code)
Creates a new instance of XCaptionedImage




Method Detail
add
public void add(Object c, Object constraint)(Code)
Add a child component
Parameters:
  c - the child component
Parameters:
  constraint - the layout constraint



addCaptionListener
public void addCaptionListener(MouseListener l)(Code)
Adds a mouse listener to this component to listen for mouse events.
Parameters:
  l - the MouseListener that is to be added.



findCurrentResponse
public int findCurrentResponse(int x, int y)(Code)
Find the response corresponding to the current point
Parameters:
  x - the x coordinate of the mouse click
Parameters:
  y - the y coordinate of the mouse click the response value if the mouse were click at the specified location, or -1 if not selection is available



fireActionPerformed
protected void fireActionPerformed(MouseEvent event)(Code)
Notifies all mouse listeners that have registered interest for notification on mouse event types. The event instance is lazily created using the event parameter.
Parameters:
  event - the MouseEvent object



getAlignment
public int getAlignment()(Code)
Get the alignment style constant the alignment value



getBorders
public int getBorders()(Code)
Gets the border flag value. the border property



getCaption
public String getCaption()(Code)
Get the caption the caption text



getCaptionStyle
public String getCaptionStyle()(Code)
Get the caption style the style name



getChildComponent
public Object getChildComponent(int i)(Code)
Get a child component
Parameters:
  i - the index of the child within the container the child component



getFillBorder
public boolean getFillBorder()(Code)
Gets the fill border flag value. true if the area within the border is filled



getImage
public XImage getImage()(Code)
Returns the XImage instance used by ths class. XImage instance returned.



getImageName
public String getImageName()(Code)
Gets the name of the image being displayed. the image name



getImageStyle
public String getImageStyle()(Code)
Get the image style the style name



getInsets
public Insets getInsets()(Code)
Get the insets the insets



getMaximumSize
public Dimension getMaximumSize()(Code)
Get the maximum component size the maximum size



getMinHeight
public int getMinHeight()(Code)
Get the minimum height of the component the minimum height



getMinWidth
public int getMinWidth()(Code)
Get the minimum width of the component the minimum width



getMinimumSize
public Dimension getMinimumSize()(Code)
Get the minimum component size the minimum size



getOpaque
public boolean getOpaque()(Code)
Get the opaque property the opaque flag



getPadding
public int getPadding()(Code)
Get the padding the padding



getPreferredSize
public Dimension getPreferredSize()(Code)
Get the preferred component size the preferrd size



getShadow
public boolean getShadow()(Code)
Gets the shadow flag value. true if he shadow is drawn



mouseClicked
public void mouseClicked(MouseEvent e)(Code)
Fired when a mouse is clicked on this component.
Parameters:
  e - the passed MouseEvent instance.



mouseEntered
public void mouseEntered(MouseEvent e)(Code)
Fired when a mouse enters this component.
Parameters:
  e - the passed MouseEvent instance.



mouseExited
public void mouseExited(MouseEvent e)(Code)
Fired when a mouse exited this component.
Parameters:
  e - the passed MouseEvent instance.



mousePressed
public void mousePressed(MouseEvent e)(Code)
Fired when a mouse is pressed on this component.
Parameters:
  e - the passed MouseEvent instance.



mouseReleased
public void mouseReleased(MouseEvent e)(Code)
Fired when a mouse is released on this component.
Parameters:
  e - the passed MouseEvent instance.



paintComponent
public void paintComponent(Graphics g)(Code)



paintStates
public void paintStates()(Code)
Repaint the responses



remove
public void remove(Object c)(Code)
Remove a child component
Parameters:
  c - the child component



removeCaptionListener
public void removeCaptionListener(MouseListener l)(Code)
Removes a mouse listener to this component.
Parameters:
  l - the MouseListener that is to be removed.



respond
public boolean respond()(Code)
Called by XClickListener to check if a response event should be sent to the parent form. The control can also use this event to do post click processing true if the parent is to be notified



setAlignment
public void setAlignment(int align)(Code)
Set the alignment attribute
Parameters:
  align - 1 to right align the text, 0 for left alignment and 2 for centered text



setAttribute
public int setAttribute(String attribName, Object attribValue)(Code)
Set one or more attributes of the component. Currently this handles the attributes
  1. align (left|right|center ) or
  2. alignment (left|right|center )
  3. buffered (true|false) double buffering
  4. tooltip, value=the tooltip text
  5. caption, value=the text of the caption
  6. captionStyle, value=style for the caption
  7. imageStyle, value=style for the image
  8. border, value=0 for none, 1 for an outer border, 2 for an inner and outer border
  9. imagename value=the name of a background image to use as a watermark
  10. painter value=the class name of an XPainter class for painting the panel backgrounds
  11. arc value=the radius for teh panel corners
  12. pad value=the amount of padding around the image
  13. minWidth value=the minimum width
  14. minHeight value=the minimum height
  15. tooltip, value=the tooltip text
  16. opaque, value=true for an opaque image (fills the entire client area)

Parameters:
  attribName - the attribute name
Parameters:
  attribValue - the attribute value 0 for success



setBorders
public void setBorders(int bv)(Code)
Sets the border flag value.
Parameters:
  bv - the border property



setCaption
public void setCaption(String s)(Code)
Set the caption
Parameters:
  s - the caption text



setCaptionStyle
public void setCaptionStyle(String newStyle)(Code)
Set the caption style
Parameters:
  newStyle - the style name



setContent
public void setContent(String content)(Code)
Set the component content - the image name
Parameters:
  the - content value



setEnabled
public void setEnabled(boolean state)(Code)
Set the enabled state



setImageName
public void setImageName(String name)(Code)
Gets the name of the image being displayed. the image name



setImageStyle
public void setImageStyle(String newStyle)(Code)
Set the image style
Parameters:
  newStyle - the style name



setMinHeight
public void setMinHeight(int value)(Code)
Set the minimum height of the component
Parameters:
  value - the minimum height



setMinWidth
public void setMinWidth(int value)(Code)
Set the minimum width of the component
Parameters:
  value - the minimum width



setName
public void setName(String value)(Code)
Sets the XImage instance to have the same name as the instansiating class.
Parameters:
  value - String specifying the name given tos this class.



setNextAttributes
public void setNextAttributes(Object attribs)(Code)
Set the attributes for the next component being added
Parameters:
  attribs - a table of attributes



setPadding
public void setPadding(int pad)(Code)
Set the padding
Parameters:
  the - padding



setState
public boolean setState(int x, int y, int defResponse)(Code)
Find a response
Parameters:
  x - the x coordinate of the mouse click
Parameters:
  y - the y coordinate of the mouse click
Parameters:
  defResponse - the default response true if a response was found



setup
public void setup(String name, int preferredWidth, int preferredHeight, Hashtable params)(Code)
Setup the container
Parameters:
  name - set the container name
Parameters:
  preferredWidth - the desired width
Parameters:
  preferredHeight - the desired height
Parameters:
  params - a table of extra properties



updateSelectedState
public void updateSelectedState()(Code)
Does nothing in this instance



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.