public class ExpressionEditSupport extends java.lang.Object implements java.awt.event.FocusListener, CompletionProvider
| Constructor and Description |
|---|
ExpressionEditSupport(javax.swing.text.JTextComponent comp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInsightObjects(java.util.Set objs)
Add objects to insight objects collection.
|
void |
addToExpressionField(java.lang.String text)
Adds the given text to the registered expression text component.
|
void |
clearUndo()
Clear undo list.
|
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.
|
static java.util.Map |
createInsightMap(FromObject[] froms)
Create map of insight objects from given FromObjects.
|
static java.util.Map |
createInsightMap(SystemObject[] sysObjs)
Create map of insight objects from given SystemObjects.
|
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.
|
static java.util.Collection |
getColumns(FromObject from)
Get columns for given from object.
|
java.lang.Object[] |
getInsightData(javax.swing.text.Document doc, int i)
Get insight data for the specified position in the specified document.
|
boolean |
handlesInsight(javax.swing.text.Document doc, int i)
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 |
setInsightMap(java.util.Map relsToCols)
Map of usable relation aliases to Column[].
|
void |
setInsightObjects(java.util.Set objs)
List of objects to insightfully show the names for.
|
public ExpressionEditSupport(javax.swing.text.JTextComponent comp)
public void addToExpressionField(java.lang.String text)
public void clearUndo()
public void setInsightMap(java.util.Map relsToCols)
public void setInsightObjects(java.util.Set objs)
public void addInsightObjects(java.util.Set objs)
public void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerpublic void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerpublic javax.swing.ListCellRenderer getCellRenderer()
CompletionProvidergetCellRenderer in interface CompletionProvider
public boolean handlesInsight(javax.swing.text.Document doc,
int i)
CompletionProviderhandlesInsight in interface CompletionProviderdoc - the document of the component to provide insight fori - the current caret position within the document
public java.lang.Object[] getInsightData(javax.swing.text.Document doc,
int i)
CompletionProvidergetInsightData in interface CompletionProviderdoc - the document to provide insight fori - the current caret position within the document
public void completeInsight(javax.swing.text.Document doc,
int i,
java.lang.Object insert)
CompletionProvidercompleteInsight in interface CompletionProviderdoc - the document to completei - the position to complete atinsert - the insight object to complete withpublic boolean isAutoPopupChar(char c)
CompletionProviderisAutoPopupChar in interface CompletionProviderc - the character before the caret position.public static java.util.Map createInsightMap(FromObject[] froms)
froms - array of fromspublic static java.util.Map createInsightMap(SystemObject[] sysObjs)
sysObjs - array of system objectspublic static java.util.Collection getColumns(FromObject from)
from - sql from object