Java Doc for CompletionItem.java in  » IDE-Netbeans » editor » org » netbeans » spi » editor » completion » 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 Netbeans » editor » org.netbeans.spi.editor.completion 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.spi.editor.completion.CompletionItem

All known Subclasses:   org.netbeans.lib.editor.codetemplates.CodeTemplateCompletionItem,
CompletionItem
public interface CompletionItem (Code)
The interface representing a single item of the result list that can be displayed in the completion popup.
author:
   Miloslav Metelka, Dusan Balek
version:
   1.01




Method Summary
 CompletionTaskcreateDocumentationTask()
     Returns a task used to obtain a documentation associated with the item if there is any.
 CompletionTaskcreateToolTipTask()
     Returns a task used to obtain a tooltip hint associated with the item if there is any.
 voiddefaultAction(JTextComponent component)
     Gets invoked when user presses VK_ENTER key or when she double-clicks on this item with the mouse cursor.
 CharSequencegetInsertPrefix()
     Returns a text used for finding of a longest common prefix after the TAB gets pressed or when the completion is opened explicitly.
 intgetPreferredWidth(Graphics g, Font defaultFont)
     Get the preferred visual width of this item.
The visual height of the item is fixed to 16 points.
Parameters:
  g - graphics that can be used for determining the preferred widthe.g.
 intgetSortPriority()
     Returns the item's priority.
 CharSequencegetSortText()
     Returns a text used to sort items alphabetically.
 booleaninstantSubstitution(JTextComponent component)
     When enabled for the item the instant substitution should process the item in the same way like when the item is displayed and Enter key gets pressed by the user.
Instant substitution is invoked when there would be just a single item displayed in the completion popup window.
The implementation can invoke the CompletionItem.defaultAction(JTextComponent) if necessary.
This method gets invoked from AWT thread.
Parameters:
  component - non-null text component for which the completion was invoked.
 voidprocessKeyEvent(KeyEvent evt)
     Process the key pressed when this completion item was selected in the completion popup window.
This method gets invoked from AWT thread.
Parameters:
  evt - non-null key event of the pressed key.
 voidrender(Graphics g, Font defaultFont, Color defaultColor, Color backgroundColor, int width, int height, boolean selected)
     Render this item into the given graphics.



Method Detail
createDocumentationTask
CompletionTask createDocumentationTask()(Code)
Returns a task used to obtain a documentation associated with the item if there is any.



createToolTipTask
CompletionTask createToolTipTask()(Code)
Returns a task used to obtain a tooltip hint associated with the item if there is any.



defaultAction
void defaultAction(JTextComponent component)(Code)
Gets invoked when user presses VK_ENTER key or when she double-clicks on this item with the mouse cursor.
This method gets invoked from AWT thread.
Parameters:
  component - non-null text component for which the completion was invoked.



getInsertPrefix
CharSequence getInsertPrefix()(Code)
Returns a text used for finding of a longest common prefix after the TAB gets pressed or when the completion is opened explicitly.
The completion infrastructure will evaluate the insert prefixes of all the items present in the visible result and finds the longest common prefix.

Generally the returned text does not need to contain all the information that gets inserted when the item is selected.
For example in java completion the field name should be returned for fields or a method name for methods (but not parameters) or a non-FQN name for classes. non-null character sequence containing the insert prefix.
Returning an empty string will effectively disable the TAB completionas the longest common prefix will be empty.
since:
   1.4




getPreferredWidth
int getPreferredWidth(Graphics g, Font defaultFont)(Code)
Get the preferred visual width of this item.
The visual height of the item is fixed to 16 points.
Parameters:
  g - graphics that can be used for determining the preferred widthe.g. getting of the font metrics.
Parameters:
  defaultFont - default font used for rendering.



getSortPriority
int getSortPriority()(Code)
Returns the item's priority. A lower value means a lower index of the item in the completion result list.



getSortText
CharSequence getSortText()(Code)
Returns a text used to sort items alphabetically.



instantSubstitution
boolean instantSubstitution(JTextComponent component)(Code)
When enabled for the item the instant substitution should process the item in the same way like when the item is displayed and Enter key gets pressed by the user.
Instant substitution is invoked when there would be just a single item displayed in the completion popup window.
The implementation can invoke the CompletionItem.defaultAction(JTextComponent) if necessary.
This method gets invoked from AWT thread.
Parameters:
  component - non-null text component for which the completion was invoked. true if the instant substitution was successfully done.false means that the instant substitution should not be donefor this item and the completion item should normally be displayed.



processKeyEvent
void processKeyEvent(KeyEvent evt)(Code)
Process the key pressed when this completion item was selected in the completion popup window.
This method gets invoked from AWT thread.
Parameters:
  evt - non-null key event of the pressed key. It should be consumedin case the item is sensitive to the given key. The source of this event is the text component to which the corresponding action shouldbe performed.



render
void render(Graphics g, Font defaultFont, Color defaultColor, Color backgroundColor, int width, int height, boolean selected)(Code)
Render this item into the given graphics.
Parameters:
  g - graphics to render the item into.
Parameters:
  defaultFont - default font used for rendering.
Parameters:
  defaultColor - default color used for rendering.
Parameters:
  backgroundColor - color used for background.
Parameters:
  width - width of the area to render into.
Parameters:
  height - height of the are to render into.
Parameters:
  selected - whether this item is visually selected in the listinto which the items are being rendered.



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