Java Doc for AbstractComponentDecorator.java in  » Testing » abbot-1.0.1 » abbot » editor » widgets » 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 » Testing » abbot 1.0.1 » abbot.editor.widgets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   abbot.editor.widgets.AbstractComponentDecorator

All known Subclasses:   abbot.editor.widgets.WaitIndicator,  abbot.editor.widgets.Highlighter,
AbstractComponentDecorator
abstract public class AbstractComponentDecorator (Code)
Provide a method for consistently augmenting the appearance of a given component by painting something on it after the component itself gets painted. If not explicitly removed via AbstractComponentDecorator.dispose , an instance of this object will live as long as its target component.

By default, the decorator matches the location and size of the decorated component, but the bounds can be adjusted by overriding AbstractComponentDecorator.getDecorationBounds() . The AbstractComponentDecorator.synch() method should be called whenever the bounds returned by AbstractComponentDecorator.getDecorationBounds() would change.

The decoration is clipped to the bounds set on the decoration, which does not necessarily need to be the same as the decorated component's bounds. The decoration may extend beyond the decorated component bounds, or it may be reduced to a smaller region.


Inner Class :protected class Painter extends JComponent

Field Summary
final public static  RectangleDEFAULT_BOUNDS
    
final public static  intTOP
    

Constructor Summary
public  AbstractComponentDecorator(JComponent c)
     Create a decorator for the given component.
public  AbstractComponentDecorator(JComponent c, int layerOffset)
     Create a decorator for the given component, indicating the layer offset from the target component.
public  AbstractComponentDecorator(JComponent c, int layerOffset, int position)
     Create a decorator with the given position within its layer.

Method Summary
protected  voidattach()
    
protected  RectangleclipDecorationBounds(Rectangle decorated)
     Adjust the painting offsets and size of the decoration to account for ancestor clipping.
public  voiddispose()
     Stop decorating.
protected  JComponentgetComponent()
     Returns the decorated component.
protected  RectanglegetDecorationBounds()
     Return the bounds, relative to the decorated component, of the decoration.
protected  JComponentgetPainter()
     Returns the component used to paint the decoration and optionally track events.
public  StringgetToolTipText()
     Return the currently set default tooltip text.
public  StringgetToolTipText(MouseEvent e)
     Provide for different tool tips depending on the actual location over the decoration.
public  booleanisShowing()
     Indicate whether the decoration is showing.
public  booleanisVisible()
     Indicate whether any of the decoration is visible.
abstract public  voidpaint(Graphics g)
     Define the decoration's appearance.
public  voidrepaint()
     Force a refresh of the underlying component and its decoration.
public  voidsetCursor(Cursor cursor)
     Set the cursor to appear anywhere over the decoration bounds.
public  voidsetDecorationBounds(Rectangle bounds)
     Change the bounds of the decoration, relative to the decorated component.
public  voidsetDecorationBounds(int x, int y, int w, int h)
     Change the bounds of the decoration, relative to the decorated component.
protected  voidsetPainterBounds(int x, int y, int w, int h)
    
public  voidsetToolTipText(String text)
     Set the text to be displayed when the mouse is over the decoration.
public  voidsetVisible(boolean visible)
     Use this to change the visibility of the decoration.
protected  voidsynch()
     Ensure the size of the decorator matches the current decoration bounds with appropriate clipping to viewports.
public  StringtoString()
    

Field Detail
DEFAULT_BOUNDS
final public static Rectangle DEFAULT_BOUNDS(Code)



TOP
final public static int TOP(Code)




Constructor Detail
AbstractComponentDecorator
public AbstractComponentDecorator(JComponent c)(Code)
Create a decorator for the given component.



AbstractComponentDecorator
public AbstractComponentDecorator(JComponent c, int layerOffset)(Code)
Create a decorator for the given component, indicating the layer offset from the target component. Negative values mean the decoration is painted before the target component is painted.



AbstractComponentDecorator
public AbstractComponentDecorator(JComponent c, int layerOffset, int position)(Code)
Create a decorator with the given position within its layer. Use AbstractComponentDecorator.TOP to cover other decorations, or AbstractComponentDecorator.BOTTOM to be covered by other decorations.

WARNING: BOTTOM doesn't currently work, probably a JLayeredPane bug in either the code or documentation.
See Also:   JLayeredPane





Method Detail
attach
protected void attach()(Code)



clipDecorationBounds
protected Rectangle clipDecorationBounds(Rectangle decorated)(Code)
Adjust the painting offsets and size of the decoration to account for ancestor clipping. This might be due to scroll panes or having the decoration lie outside the parent layered pane.



dispose
public void dispose()(Code)
Stop decorating.



getComponent
protected JComponent getComponent()(Code)
Returns the decorated component.



getDecorationBounds
protected Rectangle getDecorationBounds()(Code)
Return the bounds, relative to the decorated component, of the decoration. The default covers the entire component. Note that this method will be called from the constructor, so be careful when overriding and referencing derived class state.



getPainter
protected JComponent getPainter()(Code)
Returns the component used to paint the decoration and optionally track events.



getToolTipText
public String getToolTipText()(Code)
Return the currently set default tooltip text.
See Also:   JComponent.setToolTipText



getToolTipText
public String getToolTipText(MouseEvent e)(Code)
Provide for different tool tips depending on the actual location over the decoration. Note that if you only override this method, you must also invoke AbstractComponentDecorator.setToolTipText(String) with a non-null argument.
See Also:   JComponent.getToolTipText(MouseEvent)



isShowing
public boolean isShowing()(Code)
Indicate whether the decoration is showing. Its painter must be visible and showing (showing depends on window ancestor).



isVisible
public boolean isVisible()(Code)
Indicate whether any of the decoration is visible. The decoration may be clipped by ancestor scroll panes or by being moved outside if the visible region of its parent window.



paint
abstract public void paint(Graphics g)(Code)
Define the decoration's appearance. The point (0,0) represents the upper left corner of the decorated component. The default clip mask will be the extents of the decoration bounds, as indicated by AbstractComponentDecorator.getDecorationBounds() , which defaults to the decorated component bounds.



repaint
public void repaint()(Code)
Force a refresh of the underlying component and its decoration.



setCursor
public void setCursor(Cursor cursor)(Code)
Set the cursor to appear anywhere over the decoration bounds. If null, the cursor of the decorated component will be used.



setDecorationBounds
public void setDecorationBounds(Rectangle bounds)(Code)
Change the bounds of the decoration, relative to the decorated component. The special value AbstractComponentDecorator.DEFAULT_BOUNDS means the bounds will track the component bounds.



setDecorationBounds
public void setDecorationBounds(int x, int y, int w, int h)(Code)
Change the bounds of the decoration, relative to the decorated component.



setPainterBounds
protected void setPainterBounds(int x, int y, int w, int h)(Code)



setToolTipText
public void setToolTipText(String text)(Code)
Set the text to be displayed when the mouse is over the decoration.
See Also:   JComponent.setToolTipText(String)
See Also:   



setVisible
public void setVisible(boolean visible)(Code)
Use this to change the visibility of the decoration.



synch
protected void synch()(Code)
Ensure the size of the decorator matches the current decoration bounds with appropriate clipping to viewports.



toString
public String toString()(Code)



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.