Java Doc for EditorUI.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.lang.Object
   org.netbeans.editor.EditorUI

All known Subclasses:   org.netbeans.editor.ext.ExtEditorUI,
EditorUI
public class EditorUI implements ChangeListener,PropertyChangeListener,SettingsChangeListener(Code)
Editor UI for the component. All the additional UI features like advanced scrolling, info about fonts, abbreviations, keyword matching are based on this class.
author:
   Miloslav Metelka
version:
   1.00

Inner Class :static class ComponentLock

Field Summary
final public static  StringCOMPONENT_PROPERTY
    
final public static  StringOVERWRITE_MODE_PROPERTY
    
final public static  intSCROLL_DEFAULT
     Default scrolling type is used for the standard setDot() call.
final public static  intSCROLL_FIND
     Scrolling type for find operations, that can request additional configurable area in each direction, so the context around is visible too.
final public static  intSCROLL_MOVE
     Scrolling type used for regular caret moves.
final public static  intSCROLL_SMALLEST
     Scrolling type where the smallest covering for the requested rectangle is used.
 intdefaultSpaceWidth
    
 booleanhighlightSearch
    
 intlineNumberDigitWidth
     Width of one digit used for line numbering.
 booleanlineNumberEnabled
     Enable displaying line numbers.
 InsetslineNumberMargin
    
 intlineNumberMaxDigitCount
    
 booleanlineNumberVisible
     Whether to show line numbers or not.
 booleanlineNumberVisibleSetting
     This flag corresponds to the LINE_NUMBER_VISIBLE setting.
 intlineNumberWidth
     Line number total width with indentation.
 PropertyChangeSupportpropertyChangeSupport
    
 Hashtableprops
    
 MaprenderingHints
    
 InsetsscrollFindInsets
     How much columns/lines to add when the scroll is performed so that the component is not scrolled so often.
 InsetsscrollJumpInsets
     How much columns/lines to add when the scroll is performed so that the component is not scrolled so often.
 StatusBarstatusBar
    
 inttextLeftMarginWidth
     Margin between the line-number bar and the text.
 ColortextLimitLineColor
    
 booleantextLimitLineVisible
    
 inttextLimitWidth
    
 InsetstextMargin
     This is the full margin around the text.
 RectanglevirtualSize
     This is the size of the editor as component while the real size of the lines edited can be lower.
 booleanvirtualSizeUpdated
     Flag saying whether either the width or height in virtualSize were updated.

Constructor Summary
public  EditorUI()
    
public  EditorUI(BaseDocument printDoc)
    

Method Summary
public  booleanaddLayer(DrawLayer layer, int visibility)
     Add new layer and use its priority to position it in the chain.
public  voidaddPropertyChangeListener(PropertyChangeListener l)
    
public  voidaddPropertyChangeListener(String propertyName, PropertyChangeListener l)
    
public  voidadjustCaret(int percentFromWindowTop)
     Set the dot according to the currently visible screen window.
public  voidadjustWindow(int caretPercentFromWindowTop)
    
public  voidcaretMoveDot(int offset, Rectangle scrollRect, int scrollPolicy)
     Set the position of the caret and scroll the extent if necessary.
Parameters:
  offset - position where the caret should be placed
Parameters:
  scrollRect - rectangle that should become visible.
public  voidcaretSetDot(int offset, Rectangle scrollRect, int scrollPolicy)
     Set the position of the caret and scroll the extent if necessary.
Parameters:
  offset - position where the caret should be placed
Parameters:
  scrollRect - rectangle that should become visible.
 voidcheckLineLimit()
    
protected  MapcreateColoringMap()
    
public  DrawLayerfindLayer(String layerName)
    
final protected  voidfirePropertyChange(String propertyName, Object oldValue, Object newValue)
    
public  AbbrevgetAbbrev()
    
public  ColoringgetColoring(String coloringName)
    
public  MapgetColoringMap()
    
final public  JTextComponentgetComponent()
    
public  ObjectgetComponentLock()
     Get the lock assuring the component will not be changed by installUI() or uninstallUI().
public  ColoringgetDefaultColoring()
    
final public  BaseDocumentgetDocument()
     Get the document to work on.
final  DrawLayerListgetDrawLayerList()
    
public  JComponentgetExtComponent()
     Create or get extended editor component.
public  RectanglegetExtentBounds()
    
public  RectanglegetExtentBounds(Rectangle r)
     Get position of the component extent.
public  intgetLineAscent()
    
public  intgetLineHeight()
    
public  intgetLineNumberDigitWidth()
    
public  InsetsgetLineNumberMargin()
    
public static  FramegetParentFrame(Component c)
    
public  ObjectgetProperty(Object key)
    
protected static  MapgetSharedColoringMap(Class kitClass)
     Gets the coloring map that can be shared by the components with the same kit.
public  StatusBargetStatusBar()
    
public  InsetsgetTextMargin()
    
public  WordMatchgetWordMatch()
    
public  booleanhasExtComponent()
     Whether this ui uses extComponent or not.
protected  voidinstallUI(JTextComponent c)
     Called when the BaseTextUI is being installed into the component.
 booleanisFontsInited()
     Return whether the fonts are already initialized or not.
public  booleanisGlyphGutterVisible()
    
public  booleanisLineNumberEnabled()
    
protected  voidmodelChanged(BaseDocument oldDoc, BaseDocument newDoc)
    
protected  voidpaint(Graphics g)
     This method is called by textui to do the paint.
public  voidpropertyChange(PropertyChangeEvent evt)
    
public  voidputProperty(Object key, Object value)
    
public  DrawLayerremoveLayer(String layerName)
    
public  voidremovePropertyChangeListener(PropertyChangeListener l)
    
public  voidremovePropertyChangeListener(String propertyName, PropertyChangeListener l)
    
public  voidrepaint(int startY)
    
public  voidrepaint(int startY, int height)
    
public  voidrepaintBlock(int startPos, int endPos)
     Repaint the block between the given positions.
public  voidrepaintOffset(int pos)
    
public  voidscrollRectToVisible(Rectangle r, int scrollPolicy)
    
 booleanscrollRectToVisibleFragile(Rectangle r, int scrollPolicy)
    
 voidsetExtentPosition(int x, int y)
    
public  voidsetLineNumberEnabled(boolean lineNumberEnabled)
    
public  voidsettingsChange(SettingsChangeEvent evt)
    
public  voidstateChanged(ChangeEvent evt)
    
protected  voiduninstallUI(JTextComponent c)
     Called when the BaseTextUI is being uninstalled from the component.
protected  voidupdate(Graphics g)
    
public  voidupdateLineNumberWidth(int maxDigitCount)
     Update the width that will be occupied by the line number.
Parameters:
  maxDigitCount - maximum digit count that can the line number have.
protected  voidupdateScrollPaneCornerColor()
    
public  voidupdateTextMargin()
    
public  booleanupdateVirtualHeight(int height)
     Possibly update virtual height.
public  booleanupdateVirtualWidth(int width)
     Possibly update virtual width.

Field Detail
COMPONENT_PROPERTY
final public static String COMPONENT_PROPERTY(Code)



OVERWRITE_MODE_PROPERTY
final public static String OVERWRITE_MODE_PROPERTY(Code)



SCROLL_DEFAULT
final public static int SCROLL_DEFAULT(Code)
Default scrolling type is used for the standard setDot() call. If the area is on the screen, it jumps to it, otherwise it centers the requested area vertically in the middle of the window and it uses smallest covering on the right side.



SCROLL_FIND
final public static int SCROLL_FIND(Code)
Scrolling type for find operations, that can request additional configurable area in each direction, so the context around is visible too.



SCROLL_MOVE
final public static int SCROLL_MOVE(Code)
Scrolling type used for regular caret moves. The scrollJump is used when the caret requests area outside the screen.



SCROLL_SMALLEST
final public static int SCROLL_SMALLEST(Code)
Scrolling type where the smallest covering for the requested rectangle is used. It's useful for going to the end of the line for example.



defaultSpaceWidth
int defaultSpaceWidth(Code)
Width of the space in the default coloring's font



highlightSearch
boolean highlightSearch(Code)
Should the search words be colored?



lineNumberDigitWidth
int lineNumberDigitWidth(Code)
Width of one digit used for line numbering. It's based on the information from the line coloring.



lineNumberEnabled
boolean lineNumberEnabled(Code)
Enable displaying line numbers. Both this flag and lineNumberVisibleSetting must be true to have the line numbers visible in the window. This flag is false by default. It's turned on automatically if the getExtComponent is called.



lineNumberMargin
Insets lineNumberMargin(Code)
Margin on the left and right side of the line number



lineNumberMaxDigitCount
int lineNumberMaxDigitCount(Code)
Current maximum count of digits in line number



lineNumberVisible
boolean lineNumberVisible(Code)
Whether to show line numbers or not. This flag is obtained using bitwise AND operation on lineNumberEnabled flag and lineNumberVisibleSetting flag.



lineNumberVisibleSetting
boolean lineNumberVisibleSetting(Code)
This flag corresponds to the LINE_NUMBER_VISIBLE setting.



lineNumberWidth
int lineNumberWidth(Code)
Line number total width with indentation. It includes left and right line-number margins and lineNumberDigitWidth * lineNumberMaxDigitCount.



propertyChangeSupport
PropertyChangeSupport propertyChangeSupport(Code)
Property change support for firing property changes



props
Hashtable props(Code)
EditorUI properties



renderingHints
Map renderingHints(Code)



scrollFindInsets
Insets scrollFindInsets(Code)
How much columns/lines to add when the scroll is performed so that the component is not scrolled so often. Negative number means portion of the extent width/height



scrollJumpInsets
Insets scrollJumpInsets(Code)
How much columns/lines to add when the scroll is performed so that the component is not scrolled so often. Negative number means portion of the extent width/height



statusBar
StatusBar statusBar(Code)
Status bar



textLeftMarginWidth
int textLeftMarginWidth(Code)
Margin between the line-number bar and the text.



textLimitLineColor
Color textLimitLineColor(Code)



textLimitLineVisible
boolean textLimitLineVisible(Code)



textLimitWidth
int textLimitWidth(Code)



textMargin
Insets textMargin(Code)
This is the full margin around the text. The left margin is an addition of component's margin and lineNumberWidth and textLeftMarginWidth.



virtualSize
Rectangle virtualSize(Code)
This is the size of the editor as component while the real size of the lines edited can be lower. The reason why to use this virtual size is that each resizing of the component means revalidating and therefore repainting of the whole component.



virtualSizeUpdated
boolean virtualSizeUpdated(Code)
Flag saying whether either the width or height in virtualSize were updated.




Constructor Detail
EditorUI
public EditorUI()(Code)
Construct extended UI for the use with a text component



EditorUI
public EditorUI(BaseDocument printDoc)(Code)
Construct extended UI for printing the given document




Method Detail
addLayer
public boolean addLayer(DrawLayer layer, int visibility)(Code)
Add new layer and use its priority to position it in the chain. If there's the layer with same visibility then the inserted layer will be placed after it.
Parameters:
  layer - layer to insert into the chain



addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)(Code)



addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener l)(Code)



adjustCaret
public void adjustCaret(int percentFromWindowTop)(Code)
Set the dot according to the currently visible screen window. #param percentFromWindowTop percentage giving the distance of the caret from the top of the currently visible window.



adjustWindow
public void adjustWindow(int caretPercentFromWindowTop)(Code)



caretMoveDot
public void caretMoveDot(int offset, Rectangle scrollRect, int scrollPolicy)(Code)
Set the position of the caret and scroll the extent if necessary.
Parameters:
  offset - position where the caret should be placed
Parameters:
  scrollRect - rectangle that should become visible. It can be null when noscrolling should be done.
Parameters:
  scrollPolicy - policy to be used when scrolling.



caretSetDot
public void caretSetDot(int offset, Rectangle scrollRect, int scrollPolicy)(Code)
Set the position of the caret and scroll the extent if necessary.
Parameters:
  offset - position where the caret should be placed
Parameters:
  scrollRect - rectangle that should become visible. It can be null when noscrolling should be done.
Parameters:
  scrollPolicy - policy to be used when scrolling.



checkLineLimit
void checkLineLimit()(Code)



createColoringMap
protected Map createColoringMap()(Code)



findLayer
public DrawLayer findLayer(String layerName)(Code)
Find the layer with some layer name in the layer hierarchy



firePropertyChange
final protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)



getAbbrev
public Abbrev getAbbrev()(Code)



getColoring
public Coloring getColoring(String coloringName)(Code)



getColoringMap
public Map getColoringMap()(Code)



getComponent
final public JTextComponent getComponent()(Code)



getComponentLock
public Object getComponentLock()(Code)
Get the lock assuring the component will not be changed by installUI() or uninstallUI(). It's useful for the classes that want to listen for the component change in EditorUI.



getDefaultColoring
public Coloring getDefaultColoring()(Code)



getDocument
final public BaseDocument getDocument()(Code)
Get the document to work on. Either component's document or printed document is returned. It can return null in case the component's document is not instance of BaseDocument.



getDrawLayerList
final DrawLayerList getDrawLayerList()(Code)



getExtComponent
public JComponent getExtComponent()(Code)
Create or get extended editor component. The extended component should normally be used for editing files instead of just the JEditorPane because it offers status bar and possibly other useful components. The getExtComponent() should not be used when the JEditorPane is included in dialog.
See Also:   EditorUI.hasExtComponent()



getExtentBounds
public Rectangle getExtentBounds()(Code)



getExtentBounds
public Rectangle getExtentBounds(Rectangle r)(Code)
Get position of the component extent. The (x, y) are set to (0, 0) if there's no viewport or (-x, -y) if there's one.



getLineAscent
public int getLineAscent()(Code)



getLineHeight
public int getLineHeight()(Code)



getLineNumberDigitWidth
public int getLineNumberDigitWidth()(Code)
Returns width of the one digit



getLineNumberMargin
public Insets getLineNumberMargin()(Code)
Returns the line number margin



getParentFrame
public static Frame getParentFrame(Component c)(Code)
Finds the frame - parent of editor component



getProperty
public Object getProperty(Object key)(Code)



getSharedColoringMap
protected static Map getSharedColoringMap(Class kitClass)(Code)
Gets the coloring map that can be shared by the components with the same kit. Only the component coloring map is provided.



getStatusBar
public StatusBar getStatusBar()(Code)



getTextMargin
public Insets getTextMargin()(Code)
Get the begining of the area covered by text



getWordMatch
public WordMatch getWordMatch()(Code)



hasExtComponent
public boolean hasExtComponent()(Code)
Whether this ui uses extComponent or not.
See Also:   EditorUI.getExtComponent()



installUI
protected void installUI(JTextComponent c)(Code)
Called when the BaseTextUI is being installed into the component.



isFontsInited
boolean isFontsInited()(Code)
Return whether the fonts are already initialized or not.



isGlyphGutterVisible
public boolean isGlyphGutterVisible()(Code)
Is glyph gutter created and visible for the document or not



isLineNumberEnabled
public boolean isLineNumberEnabled()(Code)



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



paint
protected void paint(Graphics g)(Code)
This method is called by textui to do the paint. It is forwarded either to paint through the image and then copy the image area to the screen or to paint directly to this graphics. The real work occurs in draw-engine.



propertyChange
public void propertyChange(PropertyChangeEvent evt)(Code)



putProperty
public void putProperty(Object key, Object value)(Code)



removeLayer
public DrawLayer removeLayer(String layerName)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener l)(Code)



repaint
public void repaint(int startY)(Code)



repaint
public void repaint(int startY, int height)(Code)



repaintBlock
public void repaintBlock(int startPos, int endPos) throws BadLocationException(Code)
Repaint the block between the given positions.



repaintOffset
public void repaintOffset(int pos) throws BadLocationException(Code)



scrollRectToVisible
public void scrollRectToVisible(Rectangle r, int scrollPolicy)(Code)



scrollRectToVisibleFragile
boolean scrollRectToVisibleFragile(Rectangle r, int scrollPolicy)(Code)
Must be called with EventDispatchThread



setExtentPosition
void setExtentPosition(int x, int y)(Code)



setLineNumberEnabled
public void setLineNumberEnabled(boolean lineNumberEnabled)(Code)



settingsChange
public void settingsChange(SettingsChangeEvent evt)(Code)



stateChanged
public void stateChanged(ChangeEvent evt)(Code)



uninstallUI
protected void uninstallUI(JTextComponent c)(Code)
Called when the BaseTextUI is being uninstalled from the component.



update
protected void update(Graphics g)(Code)



updateLineNumberWidth
public void updateLineNumberWidth(int maxDigitCount)(Code)
Update the width that will be occupied by the line number.
Parameters:
  maxDigitCount - maximum digit count that can the line number have. if it'slower or equal to zero it will be computed automatically.



updateScrollPaneCornerColor
protected void updateScrollPaneCornerColor()(Code)



updateTextMargin
public void updateTextMargin()(Code)



updateVirtualHeight
public boolean updateVirtualHeight(int height)(Code)
Possibly update virtual height. If the height is really updated, the method returns true. There is a slight difference against virtual width in that if the height is shrinked too much the virtual height is shrinked too. 0 can be used to update to the real height.



updateVirtualWidth
public boolean updateVirtualWidth(int width)(Code)
Possibly update virtual width. If the width is really updated, the method returns true.



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.