Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.db.util.insight
Class InsightManager

java.lang.Object
  extended by oracle.ide.db.util.insight.InsightManager
All Implemented Interfaces:
java.awt.event.FocusListener, java.util.EventListener, CompletionProvider

public class InsightManager
extends java.lang.Object
implements java.awt.event.FocusListener, CompletionProvider


Constructor Summary
InsightManager(javax.swing.text.JTextComponent comp, InsightProvider insightProvider)
           
 
Method Summary
 void addToInsightTextField(java.lang.String text)
          Adds the given text to the registered expression text component.
 void clearUndo()
           
 void completeInsight(javax.swing.text.Document doc, int i, java.lang.Object insert)
          Complete insight for the specified position in the specified document, using the specified insight object.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 javax.swing.ListCellRenderer getCellRenderer()
          Get the cell renderer used for the completion list this provider handles.
 java.lang.Object[] getInsightData(javax.swing.text.Document doc, int i)
          Get insight data for the specified position in the specified document.
 javax.swing.text.JTextComponent getInsightTextComponent()
           
 CompletionPopupHandler getPopupHandler()
           
 InsightProvider getQueryInsightParser()
           
 boolean handlesInsight(javax.swing.text.Document doc, int pos)
          Does this provider handle insight for the specified document? This method is normally called when an insight trigger of some kind happens (e.g.
 boolean isAutoPopupChar(char c)
          Should the specified character trigger an automatic popup completion list that might be handled by this insight provider?
 void setQueryInsightParser(InsightProvider insightProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsightManager

public InsightManager(javax.swing.text.JTextComponent comp,
                      InsightProvider insightProvider)
Method Detail

getInsightTextComponent

public javax.swing.text.JTextComponent getInsightTextComponent()

getQueryInsightParser

public InsightProvider getQueryInsightParser()

setQueryInsightParser

public void setQueryInsightParser(InsightProvider insightProvider)

getCellRenderer

public javax.swing.ListCellRenderer getCellRenderer()
Description copied from interface: CompletionProvider
Get the cell renderer used for the completion list this provider handles.

Specified by:
getCellRenderer in interface CompletionProvider
Returns:
a list cell renderer.

handlesInsight

public boolean handlesInsight(javax.swing.text.Document doc,
                              int pos)
Description copied from interface: CompletionProvider
Does this provider handle insight for the specified document? This method is normally called when an insight trigger of some kind happens (e.g. a delay timer for popup insight has expired, or the user explicitly requested insight). The implementation should examine the text in the document, based on the specified caret position, and decide whether it will handle insight for this location. If so, it should return true.

Specified by:
handlesInsight in interface CompletionProvider
Parameters:
doc - the document of the component to provide insight for
pos - the current caret position within the document
Returns:
true if this provider can provide an insight list for the specified location in the document.

getInsightData

public java.lang.Object[] getInsightData(javax.swing.text.Document doc,
                                         int i)
Description copied from interface: CompletionProvider
Get insight data for the specified position in the specified document.

Specified by:
getInsightData in interface CompletionProvider
Parameters:
doc - the document to provide insight for
i - the current caret position within the document
Returns:
an array of insight objects.

completeInsight

public void completeInsight(javax.swing.text.Document doc,
                            int i,
                            java.lang.Object insert)
Description copied from interface: CompletionProvider
Complete insight for the specified position in the specified document, using the specified insight object.

Specified by:
completeInsight in interface CompletionProvider
Parameters:
doc - the document to complete
i - the position to complete at
insert - the insight object to complete with

isAutoPopupChar

public boolean isAutoPopupChar(char c)
Description copied from interface: CompletionProvider
Should the specified character trigger an automatic popup completion list that might be handled by this insight provider?

Specified by:
isAutoPopupChar in interface CompletionProvider
Parameters:
c - the character before the caret position.

addToInsightTextField

public void addToInsightTextField(java.lang.String text)
Adds the given text to the registered expression text component.


clearUndo

public void clearUndo()

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

getPopupHandler

public CompletionPopupHandler getPopupHandler()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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