|
org.netbeans.modules.editor.completion/1 1.6.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.spi.editor.completion.CompletionResultSet
public final class CompletionResultSet
Listener interface for passing the query results.
Field Summary | |
---|---|
static int |
PRIORITY_SORT_TYPE
Sort type returned from getSortType()
that prefers priority of the item (CompletionItem.getSortPriority() )
over the text of the item (CompletionItem.getSortText() ). |
static int |
TEXT_SORT_TYPE
Sort type returned from getSortType()
that prefers text of the item (CompletionItem.getSortText() ). |
Method Summary | |
---|---|
boolean |
addAllItems(Collection items)
Add the collection of the completion items to this result set. |
boolean |
addItem(CompletionItem item)
Add the completion item to this result set. |
void |
estimateItems(int estimatedItemCount,
int estimatedItemWidth)
Indicate that adding of the items to this result set will likely need a long time so the resulting number of items and their visual size should be estimated so that the completion infrastructure can estimate the size of the popup window and display the items added subsequently without changing its bound extensively. |
void |
finish()
Mark that this result set is finished and there will be no more modifications done to it. |
int |
getSortType()
Get the sort type currently used by the code completion. |
boolean |
isFinished()
Check whether this result set is finished. |
void |
setAnchorOffset(int anchorOffset)
Set the document offset to which the returned completion items or documentation or tooltip should be anchored. |
void |
setDocumentation(CompletionDocumentation documentation)
Set the documentation to this result set. |
void |
setTitle(String title)
Set title that will be assigned to the completion popup window. |
void |
setToolTip(JToolTip toolTip)
Set the tooltip to this result set. |
void |
setWaitText(String waitText)
Set the explicit value displayed in a label when the completion results do not get computed during a certain timeout (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PRIORITY_SORT_TYPE
getSortType()
that prefers priority of the item (CompletionItem.getSortPriority()
)
over the text of the item (CompletionItem.getSortText()
).
public static final int TEXT_SORT_TYPE
getSortType()
that prefers text of the item (CompletionItem.getSortText()
).
over the priority of the item (CompletionItem.getSortPriority()
)
Method Detail |
---|
public void setTitle(String title)
CompletionProvider.COMPLETION_QUERY_TYPE
.
public void setAnchorOffset(int anchorOffset)
public boolean addItem(CompletionItem item)
item
- non-null completion item.
public boolean addAllItems(Collection items)
items
- collection of items to be added.
public void estimateItems(int estimatedItemCount, int estimatedItemWidth)
finish()
gets called on this result set
before displaying any of the items added to this result set.
By calling of this method the task also confirms
that the items added by addItem(CompletionItem)
subsequently
are already in the order corresponding to the getSortType()
.
estimatedItemCount
- estimated number of the items that will
be added to this result set by addItem(CompletionItem)
.
If the estimate is significantly lower than the reality then
the vertical scrollbar granularity may be decreased or the vertical
scrollbar can be removed completely once the result set is finished.
If the estimate is significantly higher than the reality then
the vertical scrollbar granularity may be increased
once the result set is finished.estimatedItemWidth
- estimated maximum visual width of a completion item.public void setDocumentation(CompletionDocumentation documentation)
CompletionProvider.createTask(int, javax.swing.text.JTextComponent)
with CompletionProvider.DOCUMENTATION_QUERY_TYPE
or for CompletionItem.createDocumentationTask()
.
public void setToolTip(JToolTip toolTip)
CompletionProvider.createTask(int, javax.swing.text.JTextComponent)
with CompletionProvider.TOOLTIP_QUERY_TYPE
or for CompletionItem.createToolTipTask()
.
public void finish()
public boolean isFinished()
finish()
.public int getSortType()
PRIORITY_SORT_TYPE
or TEXT_SORT_TYPE
.
public void setWaitText(String waitText)
waitText
- description of what the query copmutation
is currently (doing or waiting for).
null
can be passed
to restore using of the default text.
|
org.netbeans.modules.editor.completion/1 1.6.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |