Java Doc for DrawLayer.java in  » Swing-Library » abeille-forms-designer » org » netbeans » editor » 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 » abeille forms designer » org.netbeans.editor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.editor.DrawLayer

DrawLayer
public interface DrawLayer (Code)
Draw layer applies changes to draw context during painting process. Each extended UI has its own set of layers. It can currently include changes to font bold and italic attributes, and foreground and background color (and probably more in future). These changes are made by draw layer to draw context in updateContext() method. Draw layers form double-linked lists. Renderer goes through this list every time it draws the tokens of the text. A layer can work either by returning the next-activity-change-offset or by being activated through the draw-marks that it places at the appropriate positions or it can mix these two approaches.
author:
   Miloslav Metelka
version:
   1.00

Inner Class :abstract public static class AbstractLayer implements DrawLayer



Method Summary
public  booleanextendsEOL()
     Whether the layer wants to use the last context's background till the end of the window or not.
public  booleanextendsEmptyLine()
     Whether the layer marks the empty line with the background by half of the character.
public  StringgetName()
     Get the name of the layer.
public  intgetNextActivityChangeOffset(DrawContext ctx)
     Get the next position at which the activity of the layer will change.
public  voidinit(DrawContext ctx)
     Called each time the paint begins for all layers in the layer chain regardless whether they are currently active or not.
public  booleanisActive(DrawContext ctx, MarkFactory.DrawMark mark)
     Return whether the layer is active or not.
public  voidupdateContext(DrawContext ctx)
     Update draw context by setting colors, fonts and possibly other draw properties.
public  intupdateLineNumberContext(int lineNumber, DrawContext ctx)
     Update draw context related to the drawing of line number for the given line by setting colors, fonts and possibly other draw properties.



Method Detail
extendsEOL
public boolean extendsEOL()(Code)
Whether the layer wants to use the last context's background till the end of the window or not.



extendsEmptyLine
public boolean extendsEmptyLine()(Code)
Whether the layer marks the empty line with the background by half of the character.



getName
public String getName()(Code)
Get the name of the layer. The layers that should work together over one component must have the different names.



getNextActivityChangeOffset
public int getNextActivityChangeOffset(DrawContext ctx)(Code)
Get the next position at which the activity of the layer will change. It can return Integer.MAX_VALUE to mark that the activity will never change or if it will change only by draw-marks. When this position will be reached the isActive will be called.



init
public void init(DrawContext ctx)(Code)
Called each time the paint begins for all layers in the layer chain regardless whether they are currently active or not. It is intended to prepare the layer. It doesn't need to set the next-activity-change-offset because isActive() will be called at the begining of the drawing when this method finishes.



isActive
public boolean isActive(DrawContext ctx, MarkFactory.DrawMark mark)(Code)
Return whether the layer is active or not. This method is called at the begining of the drawing, then each time when the draw-mark is found at the current fragment offset or when drawing reaches the next-activity-change-offset of this layer (mark parameter is null in this case). The layer must return whether it wants to be active for the next drawing or not. The layer should also consider changing the next-activity-change-offset because the draw-engine will ask for it after this method finishes. If the mark is found at the same position like next-activity-change-offset is, then this method is called only once with the valid mark parameter.
Parameters:
  ctx - current context with the information about the drawing
Parameters:
  mark - draw-mark at the fragment-offset or null if called because ofthe next-activity-change-offset.



updateContext
public void updateContext(DrawContext ctx)(Code)
Update draw context by setting colors, fonts and possibly other draw properties. The method can use information from the context to find where the painting process is currently located. It is called only if the layer is active.



updateLineNumberContext
public int updateLineNumberContext(int lineNumber, DrawContext ctx)(Code)
Update draw context related to the drawing of line number for the given line by setting colors, fonts and possibly other draw properties. The method can also change the current line number by returning the modified line-number than the original one. At the begining the first layer gets the line-number lineOffset + 1 but some layers can change it. If the layer doesn't want to change the line-number it should return the same value as it gets. The context can be affected to change the font and colors for the line-number. The context's getFragmentOffset() returns the begining of the line. The following methods in the context return undefined values: isEOL(), getBuffer(), getTokenID(), getTokenOffset(), getTokenLength(). The process of calling this method is independent of the status of the layers and is called for each layer even if it's not active.
Parameters:
  lineNumber - the number that will be drawn before the line's text. Thelayer can change it by returning a different value.
Parameters:
  ctx - the draw context



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