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

E13403-03

oracle.javatools.editor.insight
Class TooltipInsightData

java.lang.Object
  extended by oracle.javatools.editor.insight.TooltipInsightData
All Implemented Interfaces:
InsightData, ListInsightData

public abstract class TooltipInsightData
extends java.lang.Object
implements ListInsightData

The TooltipInsightData interface contains public API routines for an InsightData model that is based on a list model, and is used for displaying tooltip (hint) information only. As a result, no-op implementations have been provided for methods that only apply to a completion insight implementation.

Note that this is provided for convenience, and is not required for use with TooltipInsightView. Your implementation may implement ListInsightData directly instead.

See Also:
InsightData, ListInsightData

Constructor Summary
TooltipInsightData()
           
 
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).
abstract  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.
abstract  javax.swing.ListModel getListModel()
          Fetch a ListModel instance which represents this data model so that it can be displayed in a JList.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TooltipInsightData

public TooltipInsightData()
Method Detail

getListModel

public abstract javax.swing.ListModel getListModel()
Fetch a ListModel instance which represents this data model so that it can be displayed in a JList. The ListModel is pretty generalized (routines for getting size, getting elements, and getting notification of changes), and is convenient for us to use.

Specified by:
getListModel in interface ListInsightData
Returns:
the ListModel instance representing this data

getData

public abstract 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.

Specified by:
getData in interface InsightData
Returns:
an array containing the data items in this InsightData

getMatchingData

public 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.

Specified by:
getMatchingData in interface InsightData
Returns:
an array containing a subset of the data items in this InsightData that matches the user input so far

getMatchingDataCount

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

Specified by:
getMatchingDataCount in interface InsightData
Returns:
the count of matching data items

getDefault

public java.lang.Object getDefault()
Fetches the data item which should be selected in the view by default. This method simply returns null, as the tooltip view does not highlight any defaults.

Specified by:
getDefault in interface InsightData
Returns:
null for the default data item

complete

public 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 method is not used for a tooltip implementation, and will cause an IllegalStateException to be thrown.

Specified by:
complete in interface InsightData
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

public 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 method is not used for a tooltip implementation, and will cause an IllegalStateException to be thrown.

Specified by:
partialComplete in interface InsightData

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

E13403-03

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