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

E13403-04

oracle.javatools.controls.completionfield
Class FileSystemFieldInsightProvider

java.lang.Object
  extended by oracle.javatools.controls.completionfield.FileSystemFieldInsightProvider
All Implemented Interfaces:
FieldInsightProvider

public class FileSystemFieldInsightProvider
extends java.lang.Object
implements FieldInsightProvider

Provides field insight for filenames.


Constructor Summary
FileSystemFieldInsightProvider()
           
FileSystemFieldInsightProvider(boolean onlyDirectories)
           
 
Method Summary
 void completeInsight(javax.swing.text.Document doc, int pos, java.lang.Object insightObject)
          Complete insight for the specified position in the specified document, using the specified insight object.
 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 pos)
          Get insight data for the specified position in the specified document.
 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?
 boolean isOnlyDirectories()
           
protected  boolean isValid(java.io.File f)
          Is the specified file valid for inclusion in the list? Subclasses can override this to filter out certain files.
 void setOnlyDirectories(boolean onlyDirectories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemFieldInsightProvider

public FileSystemFieldInsightProvider(boolean onlyDirectories)

FileSystemFieldInsightProvider

public FileSystemFieldInsightProvider()
Method Detail

setOnlyDirectories

public void setOnlyDirectories(boolean onlyDirectories)

isOnlyDirectories

public boolean isOnlyDirectories()

isValid

protected boolean isValid(java.io.File f)
Is the specified file valid for inclusion in the list? Subclasses can override this to filter out certain files.


getCellRenderer

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

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

handlesInsight

public boolean handlesInsight(javax.swing.text.Document doc,
                              int pos)
Description copied from interface: FieldInsightProvider
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 FieldInsightProvider
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 pos)
Description copied from interface: FieldInsightProvider
Get insight data for the specified position in the specified document.

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

completeInsight

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

Specified by:
completeInsight in interface FieldInsightProvider
Parameters:
doc - the document to complete
pos - the position to complete at
insightObject - the insight object to complete with

isAutoPopupChar

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

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

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

E13403-04

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