Java Doc for BaseCaret.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) 


java.awt.Rectangle
   org.netbeans.editor.BaseCaret

All known Subclasses:   org.netbeans.editor.ext.ExtCaret,
BaseCaret
public class BaseCaret extends Rectangle implements Caret,FocusListener,MouseListener,MouseMotionListener,PropertyChangeListener,DocumentListener,ActionListener,SettingsChangeListener(Code)
Caret implementation
author:
   Miloslav Metelka
version:
   1.00

Inner Class :final class CaretDG extends DrawGraphics.SimpleDG

Field Summary
final public static  StringBLOCK_CARET
    
final public static  StringLINE_CARET
    
final public static  StringTHIN_LINE_CARET
    
protected  FontafterCaretFont
     Font of the text underlying the caret.
protected  FontbeforeCaretFont
    
 booleanblinkVisible
     Caret is visible and the blink is visible.
 CaretDGcaretDG
    
 MarkFactory.DrawMarkcaretMark
     Draw mark designating the position of the caret.
protected  ChangeEventchangeEvent
     Change event.
protected  JTextComponentcomponent
    
protected  chardotChar
    
protected  Timerflasher
    
 booleanitalic
    
protected  EventListenerListlistenerList
    
 PointmagicCaretPosition
     Position of the caret on the screen.
 MarkFactory.DrawMarkselectionMark
    
 booleanselectionVisible
    
final static  longserialVersionUID
    
protected  ColortextBackColor
     Background color of the text underlying the caret.
protected  ColortextForeColor
     Foreground color of the text underlying the caret.
 Stringtype
    
 booleanvisible
    

Constructor Summary
public  BaseCaret()
    

Method Summary
public  voidactionPerformed(ActionEvent evt)
    
public  voidaddChangeListener(ChangeListener l)
    
public  voidchangedUpdate(DocumentEvent evt)
    
public  voiddeinstall(JTextComponent c)
    
 voiddispatchUpdate()
    
 voiddispatchUpdate(Rectangle scrollRect, int scrollPolicy)
    
public  booleanequals(Object o)
    
protected  voidfireStateChanged()
    
public  voidfocusGained(FocusEvent evt)
    
public  voidfocusLost(FocusEvent evt)
    
public synchronized  intgetBlinkRate()
    
public  intgetDot()
    
final public  PointgetMagicCaretPosition()
    
public  intgetMark()
     Gets the current position of the selection mark.
public  voidinsertUpdate(DocumentEvent evt)
    
public  voidinstall(JTextComponent c)
    
final public  booleanisSelectionVisible()
    
final public  booleanisVisible()
    
protected  voidmodelChanged(BaseDocument oldDoc, BaseDocument newDoc)
    
public  voidmouseClicked(MouseEvent evt)
    
public  voidmouseDragged(MouseEvent evt)
    
public  voidmouseEntered(MouseEvent evt)
    
public  voidmouseExited(MouseEvent evt)
    
public  voidmouseMoved(MouseEvent evt)
    
public  voidmousePressed(MouseEvent evt)
    
public  voidmouseReleased(MouseEvent evt)
    
public  voidmoveDot(int offset)
    
public  voidmoveDot(int offset, Rectangle scrollRect, int scrollPolicy)
    
public  voidpaint(Graphics g)
    
protected  voidpaintCustomCaret(Graphics g)
    
public  voidpropertyChange(PropertyChangeEvent evt)
    
public  voidremoveChangeListener(ChangeListener l)
    
public  voidremoveUpdate(DocumentEvent evt)
    
synchronized  voidresetBlink()
    
public synchronized  voidsetBlinkRate(int rate)
     Sets the caret blink rate.
public  voidsetDot(int offset)
    
public  voidsetDot(int offset, Rectangle scrollRect, int scrollPolicy)
     Sets the caret position to some position.
public  voidsetMagicCaretPosition(Point p)
     Saves the current caret position.
public  voidsetSelectionVisible(boolean v)
    
public  voidsetVisible(boolean v)
    
protected  voidsetVisibleImpl(boolean v)
    
public  voidsettingsChange(SettingsChangeEvent evt)
     Called when settings were changed.
protected  voidupdate(Rectangle scrollRect, int scrollPolicy)
     Update the caret.
 voidupdateType()
    

Field Detail
BLOCK_CARET
final public static String BLOCK_CARET(Code)
Caret type representing block covering current character



LINE_CARET
final public static String LINE_CARET(Code)
Default caret type



THIN_LINE_CARET
final public static String THIN_LINE_CARET(Code)
One dot thin line compatible with Swing default caret



afterCaretFont
protected Font afterCaretFont(Code)
Font of the text underlying the caret. It can be used in caret painting.



beforeCaretFont
protected Font beforeCaretFont(Code)
Font of the text right before the caret



blinkVisible
boolean blinkVisible(Code)
Caret is visible and the blink is visible. Both must be true in order to show the caret.



caretDG
CaretDG caretDG(Code)
Caret draw graphics



caretMark
MarkFactory.DrawMark caretMark(Code)
Draw mark designating the position of the caret.



changeEvent
protected ChangeEvent changeEvent(Code)
Change event. Only one instance needed because it has only source property



component
protected JTextComponent component(Code)
Component this caret is bound to



dotChar
protected char dotChar(Code)
Dot array of one character under caret



flasher
protected Timer flasher(Code)
Timer used for blinking the caret



italic
boolean italic(Code)
Is the caret italic for italic fonts



listenerList
protected EventListenerList listenerList(Code)
Listeners



magicCaretPosition
Point magicCaretPosition(Code)
Position of the caret on the screen. This helps to compute caret position on the next after jump.



selectionMark
MarkFactory.DrawMark selectionMark(Code)
Draw mark that supports caret mark in creating selection



selectionVisible
boolean selectionVisible(Code)
Is the selection currently visible?



serialVersionUID
final static long serialVersionUID(Code)



textBackColor
protected Color textBackColor(Code)
Background color of the text underlying the caret. It can be used in caret painting.



textForeColor
protected Color textForeColor(Code)
Foreground color of the text underlying the caret. It can be used in caret painting.



type
String type(Code)
Type of the caret



visible
boolean visible(Code)
Is the caret visible




Constructor Detail
BaseCaret
public BaseCaret()(Code)




Method Detail
actionPerformed
public void actionPerformed(ActionEvent evt)(Code)
Fired when blink timer fires



addChangeListener
public void addChangeListener(ChangeListener l)(Code)
Adds listener to track when caret position was changed



changedUpdate
public void changedUpdate(DocumentEvent evt)(Code)



deinstall
public void deinstall(JTextComponent c)(Code)
Called when UI is being removed from JTextComponent



dispatchUpdate
void dispatchUpdate()(Code)
Update the caret's visual position



dispatchUpdate
void dispatchUpdate(Rectangle scrollRect, int scrollPolicy)(Code)



equals
public boolean equals(Object o)(Code)
Redefine to Object.equals() to prevent defaulting to Rectangle.equals() which would cause incorrect firing



fireStateChanged
protected void fireStateChanged()(Code)
Notifies listeners that caret position has changed



focusGained
public void focusGained(FocusEvent evt)(Code)



focusLost
public void focusLost(FocusEvent evt)(Code)



getBlinkRate
public synchronized int getBlinkRate()(Code)
Returns blink rate of the caret or 0 if caret doesn't blink



getDot
public int getDot()(Code)
Gets the current position of the caret



getMagicCaretPosition
final public Point getMagicCaretPosition()(Code)
Get position used to mark begining of the selected block



getMark
public int getMark()(Code)
Gets the current position of the selection mark. If there's a selection this position will be different from the caret position.



insertUpdate
public void insertUpdate(DocumentEvent evt)(Code)



install
public void install(JTextComponent c)(Code)
Called when UI is being installed into JTextComponent



isSelectionVisible
final public boolean isSelectionVisible()(Code)
Is the selection visible?



isVisible
final public boolean isVisible()(Code)
Is the caret currently visible



modelChanged
protected void modelChanged(BaseDocument oldDoc, BaseDocument newDoc)(Code)



mouseClicked
public void mouseClicked(MouseEvent evt)(Code)



mouseDragged
public void mouseDragged(MouseEvent evt)(Code)



mouseEntered
public void mouseEntered(MouseEvent evt)(Code)



mouseExited
public void mouseExited(MouseEvent evt)(Code)



mouseMoved
public void mouseMoved(MouseEvent evt)(Code)



mousePressed
public void mousePressed(MouseEvent evt)(Code)



mouseReleased
public void mouseReleased(MouseEvent evt)(Code)



moveDot
public void moveDot(int offset)(Code)



moveDot
public void moveDot(int offset, Rectangle scrollRect, int scrollPolicy)(Code)
Makes selection by moving dot but leaving mark



paint
public void paint(Graphics g)(Code)
Renders the caret



paintCustomCaret
protected void paintCustomCaret(Graphics g)(Code)



propertyChange
public void propertyChange(PropertyChangeEvent evt)(Code)



removeChangeListener
public void removeChangeListener(ChangeListener l)(Code)
Removes listeners to caret position changes



removeUpdate
public void removeUpdate(DocumentEvent evt)(Code)



resetBlink
synchronized void resetBlink()(Code)



setBlinkRate
public synchronized void setBlinkRate(int rate)(Code)
Sets the caret blink rate.
Parameters:
  rate - blink rate in milliseconds, 0 means no blink



setDot
public void setDot(int offset)(Code)



setDot
public void setDot(int offset, Rectangle scrollRect, int scrollPolicy)(Code)
Sets the caret position to some position. This causes removal of the active selection.



setMagicCaretPosition
public void setMagicCaretPosition(Point p)(Code)
Saves the current caret position. This is used when caret up or down actions occur, moving between lines that have uneven end positions.
Parameters:
  p - the Point to use for the saved position



setSelectionVisible
public void setSelectionVisible(boolean v)(Code)
Sets the selection visibility



setVisible
public void setVisible(boolean v)(Code)
Sets the caret visibility



setVisibleImpl
protected void setVisibleImpl(boolean v)(Code)



settingsChange
public void settingsChange(SettingsChangeEvent evt)(Code)
Called when settings were changed. The method is called also in constructor, so the code must count with the evt being null.



update
protected void update(Rectangle scrollRect, int scrollPolicy)(Code)
Update the caret. The document is read-locked while calling this method.
Parameters:
  scrollRect - rectangle that should be visible after the updating of thecaret. It can be null to do no scrolling (only update caret)or it can be caret rectangle to update the caret and make itvisible or some other rectangle to guarantee that therectangle will be visible.
Parameters:
  scrollPolicy - scrolling policy as defined in EditorUI. It has no meaning ifscrollRect is null.



updateType
void updateType()(Code)



Fields inherited from java.awt.Rectangle
public int height(Code)(Java Doc)
public int width(Code)(Java Doc)
public int x(Code)(Java Doc)
public int y(Code)(Java Doc)

Methods inherited from java.awt.Rectangle
public void add(int newx, int newy)(Code)(Java Doc)
public void add(Point pt)(Code)(Java Doc)
public void add(Rectangle r)(Code)(Java Doc)
public boolean contains(Point p)(Code)(Java Doc)
public boolean contains(int x, int y)(Code)(Java Doc)
public boolean contains(Rectangle r)(Code)(Java Doc)
public boolean contains(int X, int Y, int W, int H)(Code)(Java Doc)
public Rectangle2D createIntersection(Rectangle2D r)(Code)(Java Doc)
public Rectangle2D createUnion(Rectangle2D r)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public Rectangle getBounds()(Code)(Java Doc)
public Rectangle2D getBounds2D()(Code)(Java Doc)
public double getHeight()(Code)(Java Doc)
public Point getLocation()(Code)(Java Doc)
public Dimension getSize()(Code)(Java Doc)
public double getWidth()(Code)(Java Doc)
public double getX()(Code)(Java Doc)
public double getY()(Code)(Java Doc)
public void grow(int h, int v)(Code)(Java Doc)
public boolean inside(int X, int Y)(Code)(Java Doc)
public Rectangle intersection(Rectangle r)(Code)(Java Doc)
public boolean intersects(Rectangle r)(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public void move(int x, int y)(Code)(Java Doc)
public int outcode(double x, double y)(Code)(Java Doc)
public void reshape(int x, int y, int width, int height)(Code)(Java Doc)
public void resize(int width, int height)(Code)(Java Doc)
public void setBounds(Rectangle r)(Code)(Java Doc)
public void setBounds(int x, int y, int width, int height)(Code)(Java Doc)
public void setLocation(Point p)(Code)(Java Doc)
public void setLocation(int x, int y)(Code)(Java Doc)
public void setRect(double x, double y, double width, double height)(Code)(Java Doc)
public void setSize(Dimension d)(Code)(Java Doc)
public void setSize(int width, int height)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void translate(int dx, int dy)(Code)(Java Doc)
public Rectangle union(Rectangle r)(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.