Java Doc for SubstanceTextPainter.java in  » Swing-Library » substance-look-feel » org » jvnet » substance » painter » text » 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 » Swing Library » substance look feel » org.jvnet.substance.painter.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jvnet.substance.painter.text.SubstanceTextPainter

All known Subclasses:   org.jvnet.substance.painter.text.AbstractTextPainter,
SubstanceTextPainter
public interface SubstanceTextPainter (Code)
Base interface for Substance text painters.
author:
   Kirill Grouchnikov
since:
   version 4.2

Inner Class :public static interface BackgroundPaintingCallback
Inner Class :public static class ImageBackgroundPaintingCallback implements BackgroundPaintingCallback



Method Summary
public  voidattachCallback(BackgroundPaintingCallback backgroundPaintingCallback)
     Attaches the specified background painting callback.
public  voidattachText(JComponent comp, Rectangle textRect, String text, int mnemonicIndex, java.awt.Font font, java.awt.Color color, java.awt.Rectangle clip)
     Attaches the specified text to paint.
Parameters:
  comp - Component.
Parameters:
  textRect - Text rectangle.
Parameters:
  text - The text itself.
Parameters:
  mnemonicIndex - Optional mnemonic index.
public  voidattachVerticalText(JComponent comp, Rectangle textRect, String text, int mnemonicIndex, java.awt.Font font, java.awt.Color color, java.awt.Rectangle clip, boolean isFromBottomToTop)
     Attaches the specified vertical text to paint.
Parameters:
  comp - Component.
Parameters:
  textRect - Text rectangle.
Parameters:
  text - The text itself.
Parameters:
  mnemonicIndex - Optional mnemonic index.
public  voiddispose()
     Disposes the resources allocated by this text painter.
public  java.awt.DimensiongetTextBounds(Component comp, java.awt.Font font, String text)
    
public  voidinit(JComponent comp, Rectangle clip, boolean toEnforceRenderOnNoTexts)
     Re-initializes the contents of this painter.
public  booleanisNative()
     Returns true if this text painter uses native font rendering.
public  booleanneedsBackgroundImage()
     Returns indication whether this painter requires background to be fully set before painting the text (with SubstanceTextPainter.renderSurface(Graphics) ).
public  voidrenderSurface(Graphics g)
     Paints the surface.
public  voidsetBackgroundFill(JComponent comp, Color backgroundFillColor, boolean toOverlayWatermark, int watermarkOffsetX, int watermarkOffsetY)
     Sets the fill color of the background.
Parameters:
  comp - Component.
Parameters:
  backgroundFillColor - Fill color for the background.
Parameters:
  toOverlayWatermark - If true, the background fill should beoverlayed with the current watermark.
Parameters:
  watermarkOffsetX - The X offset for the watermark relative to the screen positionof the component.



Method Detail
attachCallback
public void attachCallback(BackgroundPaintingCallback backgroundPaintingCallback)(Code)
Attaches the specified background painting callback.
Parameters:
  backgroundPaintingCallback - Background painting callback to attach.



attachText
public void attachText(JComponent comp, Rectangle textRect, String text, int mnemonicIndex, java.awt.Font font, java.awt.Color color, java.awt.Rectangle clip)(Code)
Attaches the specified text to paint.
Parameters:
  comp - Component.
Parameters:
  textRect - Text rectangle.
Parameters:
  text - The text itself.
Parameters:
  mnemonicIndex - Optional mnemonic index. Can be -1 if no mnemonic.
Parameters:
  font - Font for this text.
Parameters:
  color - Color for this text.
Parameters:
  clip - Clip rectangle for this text.



attachVerticalText
public void attachVerticalText(JComponent comp, Rectangle textRect, String text, int mnemonicIndex, java.awt.Font font, java.awt.Color color, java.awt.Rectangle clip, boolean isFromBottomToTop)(Code)
Attaches the specified vertical text to paint.
Parameters:
  comp - Component.
Parameters:
  textRect - Text rectangle.
Parameters:
  text - The text itself.
Parameters:
  mnemonicIndex - Optional mnemonic index. Can be -1 if no mnemonic.
Parameters:
  font - Font for this text.
Parameters:
  color - Color for this text.
Parameters:
  clip - Clip rectangle for this text.
Parameters:
  isFromBottomToTop - If true, the text will be painted from bottomto top (so that the top of the letters is on the left). Iffalse, the text will be painted from top tobottom (so that the top of the letters is on the right).



dispose
public void dispose()(Code)
Disposes the resources allocated by this text painter.



getTextBounds
public java.awt.Dimension getTextBounds(Component comp, java.awt.Font font, String text)(Code)



init
public void init(JComponent comp, Rectangle clip, boolean toEnforceRenderOnNoTexts)(Code)
Re-initializes the contents of this painter. Is usually called at the beginning of the component painting cycle. The painter implementation is expected to remove all registered callbacks.
Parameters:
  comp - Component.
Parameters:
  clip - Clip to apply. The painter implementation should respect thisclip, especially on components such as lists or tables thatuse cell renderers. In these components, the specific cell isusually much smaller than the whole component, and thepainting is done on each visible cell in a loop.
Parameters:
  toEnforceRenderOnNoTexts - If true, the painter implementation mustfill the background and invoke all callbacks even when thereare no attached texts or all texts are empty.
See Also:   AbstractTextPainter



isNative
public boolean isNative()(Code)
Returns true if this text painter uses native font rendering. true if this text painter uses native fontrendering.



needsBackgroundImage
public boolean needsBackgroundImage()(Code)
Returns indication whether this painter requires background to be fully set before painting the text (with SubstanceTextPainter.renderSurface(Graphics) ). true if this painter requires background to befully set before painting the text, falseotherwise.



renderSurface
public void renderSurface(Graphics g)(Code)
Paints the surface. The painter implementation should respect the clip set in SubstanceTextPainter.init(JComponent,Rectangle) , background fill set in SubstanceTextPainter.setBackgroundFill(JComponent,Color,boolean,int,int) , invoke the background callbacks added with SubstanceTextPainter.attachCallback(BackgroundPaintingCallback) and paint all the texts added with SubstanceTextPainter.attachText(JComponent,Rectangle,String,int,Font,Color) .
Parameters:
  g - Graphic context.



setBackgroundFill
public void setBackgroundFill(JComponent comp, Color backgroundFillColor, boolean toOverlayWatermark, int watermarkOffsetX, int watermarkOffsetY)(Code)
Sets the fill color of the background.
Parameters:
  comp - Component.
Parameters:
  backgroundFillColor - Fill color for the background.
Parameters:
  toOverlayWatermark - If true, the background fill should beoverlayed with the current watermark.
Parameters:
  watermarkOffsetX - The X offset for the watermark relative to the screen positionof the component. This is relevant for cell-based componentssuch as lists, tables and trees.
Parameters:
  watermarkOffsetY - The Y offset for the watermark relative to the screen positionof the component. This is relevant for cell-based componentssuch as lists, tables and trees.



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