Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.javatools.editor.insight
Interface InsightData

All Known Subinterfaces:
ListInsightData
All Known Implementing Classes:
TooltipInsightData

public interface InsightData

The InsightData interface is the data model that contains the Insight information generated by the InsightProvider implementation.

This interface contains minimal methods to access the data information by intention, to allow implementations to devise their own data model (i.e., list vs. tree.)

See Also:
Insight, InsightProvider, InsightView

Method Summary
 boolean complete(java.lang.Object selectedObject)
          Perform an Insight completion in the user's document using this particular data item (i.e., the selected item in the InsightView).
 java.lang.Object[] getData()
          Fetches the list of data items contains in this InsightData instance.
 java.lang.Object getDefault()
          Fetches the data item which should be selected in the view by default.
 java.lang.Object[] getMatchingData()
          Fetches a subset of the list of data items in this InsightData which matches what the user has typed so far.
 int getMatchingDataCount()
          Fetches the count of data items in this InsightData which matches what the user has typed so far.
 void partialComplete()
          Performs a partial Insight completion in the user's document based on the text entered in the user's document so far and the information available in this InsightData instance.

 

Method Detail

getData

java.lang.Object[] getData()
Fetches the list of data items contains in this InsightData instance. These data items may be opaque and will be interpreted only by the Insight implementation.
Returns:
an array containing the data items in this InsightData

getMatchingData

java.lang.Object[] getMatchingData()
Fetches a subset of the list of data items in this InsightData which matches what the user has typed so far. For example, if the user has typed "eq" so far, then the matching data may contain "equals" or "equalsIgnoreCase". If the user hasn't typed anything, then this should just return the same array as getData(). As with getData(), these data items may be opaque.
Returns:
an array containing a subset of the data items in this InsightData that matches the user input so far

getMatchingDataCount

int getMatchingDataCount()
Fetches the count of data items in this InsightData which matches what the user has typed so far.
Returns:
the count of matching data items

getDefault

java.lang.Object getDefault()
Fetches the data item which should be selected in the view by default. This typically is based on what the user has already typed in the document - for example, it might be the first item in the list that starts with what the user has typed. This may return null if there is no default item which should be selected.
Returns:
the default data item which should be selected

complete

boolean complete(java.lang.Object selectedObject)
Perform an Insight completion in the user's document using this particular data item (i.e., the selected item in the InsightView). This generally occurs when the user hits the "Enter" key while Insight information is visible. Once the completion is done, this will return true if Insight should be triggered to auto-popup again. It is up to the caller of this method to hide the Insight view and re-trigger Insight if necessary.
Parameters:
selectedObject - object from the data set to use for completion
Returns:
true if Insight should be re-triggered after hiding the Insight window

partialComplete

void partialComplete()
Performs a partial Insight completion in the user's document based on the text entered in the user's document so far and the information available in this InsightData instance. This generally occurs when the user hits the "Tab" key while Insight information is available.

For example, suppose the user has typed "s.eq" in the document, and Insight information is currently displaying:

Hitting "Tab" will enter "ual" into the document so that the user's document now reads "s.equal". The Insight information should also be updated to reflect the new document contents.

Even if there is only one selection applicable to the partial match, this will not perform a "complete" where Insight is dismissed. It is up to the user to hit "Enter" to perform the actual completion.


Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


Copyright © 1997, 2011, Oracle. All rights reserved.