Java Doc for ReverseHighlighter.java in  » IDE » DrJava » edu » rice » cs » drjava » ui » 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 » IDE » DrJava » edu.rice.cs.drjava.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.text.LayeredHighlighter
      javax.swing.text.DefaultHighlighter
         edu.rice.cs.drjava.ui.ReverseHighlighter

ReverseHighlighter
public class ReverseHighlighter extends DefaultHighlighter (Code)
Implements the Highlighter interfaces. Implements a simple highlight painter, but stores the highlights in reverse order. That means that the selection (for copying) is always the foremost hightlight, and after that, the highlights are drawn from most recent to oldest. Based on DefaultHighlighter by Timothy Prinzing, version 1.39 12/19/03 Unfortunately, as the vector of highlights in DefaultHighlighter was private, there was no efficient way to make use of inheritance.

Inner Class :public static class DefaultFrameHighlightPainter extends LayeredHighlighter.LayerPainter
Inner Class :public static class DefaultUnderlineHighlightPainter extends LayeredHighlighter.LayerPainter
Inner Class :class HighlightInfo implements Highlighter.Highlight
Inner Class :public static class DrJavaHighlightPainter extends DefaultHighlightPainter
Inner Class :class LayeredHighlightInfo extends HighlightInfo
Inner Class :class SafeDamager implements Runnable


Constructor Summary
public  ReverseHighlighter()
     Creates a new ReverseHighlighter object.

Method Summary
public  ObjectaddHighlight(int p0, int p1, Highlighter.HighlightPainter p)
     Adds a highlight to the view.
public  voidchangeHighlight(Object tag, int p0, int p1)
     Changes a highlight.
public  voiddeinstall(JTextComponent c)
     Called when the UI is being removed from the interface of a JTextComponent.
public  booleangetDrawsLayeredHighlights()
    
public  Highlighter.Highlight[]getHighlights()
     Makes a copy of the highlights.
public  voidinstall(JTextComponent c)
     Called when the UI is being installed into the interface of a JTextComponent.
public  voidpaint(Graphics g)
     Renders the highlights.
public  voidpaintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)
     When leaf Views (such as LabelView) are rendering they should call into this method.
public  voidremoveAllHighlights()
     Removes all highlights.
public  voidremoveHighlight(Object tag)
     Removes a highlight from the view.
public  voidsetDrawsLayeredHighlights(boolean newValue)
     If true, highlights are drawn as the Views draw the text.


Constructor Detail
ReverseHighlighter
public ReverseHighlighter()(Code)
Creates a new ReverseHighlighter object.




Method Detail
addHighlight
public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException(Code)
Adds a highlight to the view. Returns a tag that can be used to refer to the highlight.
Parameters:
  p0 - the start offset of the range to highlight >= 0
Parameters:
  p1 - the end offset of the range to highlight >= p0
Parameters:
  p - the painter to use to actually render the highlight an object that can be used as a tag to refer to the highlight
exception:
  BadLocationException - if the specified location is invalid



changeHighlight
public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException(Code)
Changes a highlight.
Parameters:
  tag - the highlight tag
Parameters:
  p0 - the beginning of the range >= 0
Parameters:
  p1 - the end of the range >= p0
exception:
  BadLocationException - if the specified location is invalid



deinstall
public void deinstall(JTextComponent c)(Code)
Called when the UI is being removed from the interface of a JTextComponent.
Parameters:
  c - the component
See Also:   Highlighter.deinstall



getDrawsLayeredHighlights
public boolean getDrawsLayeredHighlights()(Code)



getHighlights
public Highlighter.Highlight[] getHighlights()(Code)
Makes a copy of the highlights. Does not actually clone each highlight, but only makes references to them. the copy
See Also:   Highlighter.getHighlights



install
public void install(JTextComponent c)(Code)
Called when the UI is being installed into the interface of a JTextComponent. Installs the editor, and removes any existing highlights.
Parameters:
  c - the editor component
See Also:   Highlighter.install



paint
public void paint(Graphics g)(Code)
Renders the highlights.
Parameters:
  g - the graphics context



paintLayeredHighlights
public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)(Code)
When leaf Views (such as LabelView) are rendering they should call into this method. If a highlight is in the given region it will be drawn immediately.
Parameters:
  g - Graphics used to draw
Parameters:
  p0 - starting offset of view
Parameters:
  p1 - ending offset of view
Parameters:
  viewBounds - Bounds of View
Parameters:
  editor - JTextComponent
Parameters:
  view - View instance being rendered



removeAllHighlights
public void removeAllHighlights()(Code)
Removes all highlights.



removeHighlight
public void removeHighlight(Object tag)(Code)
Removes a highlight from the view.
Parameters:
  tag - the reference to the highlight



setDrawsLayeredHighlights
public void setDrawsLayeredHighlights(boolean newValue)(Code)
If true, highlights are drawn as the Views draw the text. That is the Views will call into paintLayeredHighlight which will result in a rectangle being drawn before the text is drawn (if the offsets are in a highlighted region that is). For this to work the painter supplied must be an instance of LayeredHighlightPainter.



Fields inherited from javax.swing.text.DefaultHighlighter
final public static LayeredHighlighter.LayerPainter DefaultPainter(Code)(Java Doc)

Methods inherited from javax.swing.text.DefaultHighlighter
public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException(Code)(Java Doc)
public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException(Code)(Java Doc)
public void deinstall(JTextComponent c)(Code)(Java Doc)
public boolean getDrawsLayeredHighlights()(Code)(Java Doc)
public Highlighter.Highlight[] getHighlights()(Code)(Java Doc)
public void install(JTextComponent c)(Code)(Java Doc)
public void paint(Graphics g)(Code)(Java Doc)
public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)(Code)(Java Doc)
public void removeAllHighlights()(Code)(Java Doc)
public void removeHighlight(Object tag)(Code)(Java Doc)
public void setDrawsLayeredHighlights(boolean newValue)(Code)(Java Doc)

Methods inherited from javax.swing.text.LayeredHighlighter
abstract public void paintLayeredHighlights(Graphics g, int p0, int p1, Shape viewBounds, JTextComponent editor, View view)(Code)(Java Doc)

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.