Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-05

oracle.apps.fnd.applcore.dt.setid.piLayout.editor
Class AbstractLovEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor
          extended by oracle.apps.fnd.applcore.dt.setid.piLayout.editor.AbstractLovEditor
All Implemented Interfaces:
java.beans.PropertyEditor, oracle.bali.xml.model.metadata.ContextualPropertyEditor

public abstract class AbstractLovEditor
extends oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor

An abstract class to ease the burden of implementation of an LOV type property editor. NB this class has certain contractual conditions that are required to be met to ensure correct operation. This class also assumes that a database connection is used for data retrieval. The concrete constructor of this class must create assign tableModel a valid object.

Author:
Michael Luetchford <michael.luetchford@oracle.com>

Nested Class Summary
protected  class AbstractLovEditor.SearchRunnable
          Inner class for implementing the thread for search processing.
 
Field Summary
protected  oracle.bali.xml.model.metadata.PropertyEditorContext _propertyEditorContext
           
protected  java.lang.String _textValue
           
protected  java.lang.String _value
           
protected  SearchField lovField
           
protected  javax.swing.JLabel lovHintText
           
protected  javax.swing.JScrollPane lovScrollPane
           
protected  javax.swing.JPanel mainPanel
           
protected  NiceTable table
           
protected  oracle.apps.fnd.applcore.dt.setid.piLayout.editor.AbstractSQLTableModel tableModel
           
 
Fields inherited from class oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor
mInspectable, mObj
 
Constructor Summary
AbstractLovEditor()
           
 
Method Summary
 void clearContext()
           
 java.lang.String getAsText()
          Retrieve the text version of the Value selected.
 java.awt.Component getCustomEditor()
          Retrieve the custom editor component.
protected abstract  java.lang.String getDisplayTextFromValueQuery()
          Helper method to provide a lookup query for the Display Text value given a selected Value.
protected  java.lang.String getLookup(java.lang.String value, java.lang.String query)
          Helper method used in conjunction with getDisplayTextFromValueQuery and getValueFromDisplayTextQuery to retrieve a lookup value.
abstract  java.lang.Object getValue()
          The value selected.
protected abstract  java.lang.String getValueFromDisplayTextQuery()
          Helper method to provide a lookup query for the selected Value given a selected Display Text value.
 void setAsText(java.lang.String string)
          Set the text value of the value selected for this LOV.
 void setContext(oracle.bali.xml.model.metadata.PropertyEditorContext propertyEditorContext)
           
 void setValue(java.lang.Object value)
          Set the value selected for this LOV.
 boolean supportsCustomEditor()
          Flag to indicate if a custom editor is provided.
 
Methods inherited from class oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor
createUniqueKey, getAttribute, getAttribute, getAttributeDef, getAttributes, getContext, getJboObject, getKey, getNode, getOwnerNode, getXmlContext, saveObject
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener
 

Field Detail

mainPanel

protected javax.swing.JPanel mainPanel

tableModel

protected oracle.apps.fnd.applcore.dt.setid.piLayout.editor.AbstractSQLTableModel tableModel

table

protected NiceTable table

lovHintText

protected javax.swing.JLabel lovHintText

lovField

protected SearchField lovField

lovScrollPane

protected javax.swing.JScrollPane lovScrollPane

_value

protected java.lang.String _value

_textValue

protected java.lang.String _textValue

_propertyEditorContext

protected oracle.bali.xml.model.metadata.PropertyEditorContext _propertyEditorContext
Constructor Detail

AbstractLovEditor

public AbstractLovEditor()
Method Detail

getDisplayTextFromValueQuery

protected abstract java.lang.String getDisplayTextFromValueQuery()
Helper method to provide a lookup query for the Display Text value given a selected Value.

Returns:
the lookup query.
See Also:
getLookup(java.lang.String, java.lang.String)

getValueFromDisplayTextQuery

protected abstract java.lang.String getValueFromDisplayTextQuery()
Helper method to provide a lookup query for the selected Value given a selected Display Text value.

Returns:
the lookup query.
See Also:
getLookup(java.lang.String, java.lang.String)

getAsText

public java.lang.String getAsText()
Retrieve the text version of the Value selected.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor
Returns:
the text version of the Value selected.

getCustomEditor

public java.awt.Component getCustomEditor()
Retrieve the custom editor component.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Overrides:
getCustomEditor in class java.beans.PropertyEditorSupport
Returns:
the editor component.

setValue

public void setValue(java.lang.Object value)
Set the value selected for this LOV.

Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class java.beans.PropertyEditorSupport
Parameters:
value - object passed into setValue.

setAsText

public void setAsText(java.lang.String string)
Set the text value of the value selected for this LOV.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor
Parameters:
string - The text value
Throws:
java.lang.IllegalArgumentException

getLookup

protected java.lang.String getLookup(java.lang.String value,
                                     java.lang.String query)
Helper method used in conjunction with getDisplayTextFromValueQuery and getValueFromDisplayTextQuery to retrieve a lookup value.

Parameters:
value - The value to use in the lookup query.
query - The query used for the lookup.
Returns:
The retrieved lookup value
See Also:
getDisplayTextFromValueQuery(), getValueFromDisplayTextQuery()

getValue

public abstract java.lang.Object getValue()
The value selected.

Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class java.beans.PropertyEditorSupport
Returns:
the value selected.

supportsCustomEditor

public boolean supportsCustomEditor()
Flag to indicate if a custom editor is provided.

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor
Overrides:
supportsCustomEditor in class java.beans.PropertyEditorSupport
Returns:
boolean to indicate if a custom editor is provided.

clearContext

public void clearContext()
Specified by:
clearContext in interface oracle.bali.xml.model.metadata.ContextualPropertyEditor
Overrides:
clearContext in class oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor

setContext

public void setContext(oracle.bali.xml.model.metadata.PropertyEditorContext propertyEditorContext)
Specified by:
setContext in interface oracle.bali.xml.model.metadata.ContextualPropertyEditor
Overrides:
setContext in class oracle.jbo.dt.jdevx.ui.xmlef.editors.StringPropertyEditor

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-05

Copyright © 2012 Oracle. All Rights Reserved.