oracle.jbo.uicli.jui
Class JULovButtonBinding
java.lang.Object
|
+--oracle.jbo.uicli.binding.JUControlBinding
|
+--oracle.jbo.uicli.binding.JUCtrlValueBinding
|
+--oracle.jbo.uicli.binding.JUCtrlAttrsBinding
|
+--oracle.jbo.uicli.binding.JUCtrlListBinding
|
+--oracle.jbo.uicli.jui.JULovButtonBinding
- All Implemented Interfaces:
- java.awt.event.ActionListener, AttributeList, javax.swing.ButtonModel, java.util.EventListener, java.awt.ItemSelectable, RowNavigationListener,
RowSetListener
- public class JULovButtonBinding
- extends JUCtrlListBinding
- implements java.awt.event.ActionListener, javax.swing.ButtonModel
Binds a JButton with an iterator such that on button action, an Lov Dialog (either a framework
default dialog or an application customized one) is brought up and on the dialog close, the current
row from the associated iterator is used to update values of bound attributes in a target row of a
target RowIterator. This behavior is quite like JUComboBoxBinding or JUListSingleSelBinding in their LovMode.
This kind of control/binding is used when the Lov row count is large enough to make navigation in
a ListBox or ComboBox difficult. Also this binding allows easier application customization as
the display of Lov data is completely delegated to the LovDialog/LovPanel.
- See Also:
JUComboBoxBinding
,
JUListSingleSelBinding
JULovButtonBinding(java.lang.Object control,
JUIteratorBinding iterBinding,
java.lang.String[] targetAttrs,
RowSetIterator lovRsi,
JULovPanelInterface lovPanel,
java.lang.String[] listAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
|
JULovButtonBinding(java.lang.Object control,
JUIteratorBinding iterBinding,
java.lang.String[] targetAttrs,
RowSetIterator lovRsi,
java.lang.String[] lovVOAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
|
Type | Method |
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
void |
addActionListener(java.awt.event.ActionListener l)
|
void |
addChangeListener(javax.swing.event.ChangeListener l)
|
void |
addControlToPanel(java.lang.Object panel,
java.lang.Object layoutObject,
java.lang.Object layoutCons)
*** For internal framework use only *** |
void |
addItemListener(java.awt.event.ItemListener l)
|
static javax.swing.ButtonModel |
createLovBinding(JUFormBinding formBinding,
javax.swing.AbstractButton control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String[] voAttrNames,
java.lang.String lovVOInstanceName,
java.lang.String[] lovVOAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
This method should be used to create a JULovButtonBinding and bind it to a JButton control. |
java.lang.String |
getActionCommand()
|
static javax.swing.ButtonModel |
getInstance(JUFormBinding formBinding,
javax.swing.AbstractButton control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String[] voAttrNames,
java.lang.String lovVOInstanceName,
java.lang.String[] lovVOAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
Deprecated. since 9.0.2 use createLovBinding() |
JULovPanelInterface |
getLovPanelInterface()
|
RowSetIterator |
getLOVRowSetIterator()
Returns the RowSetIterator used to display LOV data. |
int |
getMnemonic()
|
protected javax.swing.ButtonModel |
getModelImpl(java.lang.Object control)
*** For internal framework use only *** |
java.lang.Object[] |
getSelectedObjects()
|
java.lang.Object |
getValueAt(int attrIndex)
Gets the value from the control for the attribute at the given index. |
boolean |
isArmed()
|
boolean |
isEnabled()
|
boolean |
isPressed()
|
boolean |
isRollover()
|
boolean |
isSelected()
|
void |
performLOVAction()
This method is invoked when action is to be performed on the associated button. |
void |
removeActionListener(java.awt.event.ActionListener l)
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
|
void |
removeItemListener(java.awt.event.ItemListener l)
|
void |
setActionCommand(java.lang.String s)
|
void |
setArmed(boolean b)
|
void |
setDataValueAt(java.lang.Object value,
int attrIndex)
|
void |
setEnabled(boolean b)
|
void |
setGroup(javax.swing.ButtonGroup group)
|
void |
setHelpAction(java.awt.event.ActionListener al)
If the default LOV dialog is being used to display LOV Data, this method should be
used by applications to set the ActionListener that is triggered on activating the
help button in the LOV Dialog. |
void |
setMnemonic(int key)
|
void |
setPressed(boolean b)
|
void |
setRollover(boolean b)
|
void |
setSelected(boolean b)
|
void |
setValueAt(java.lang.Object value,
int attrIndex)
Updates the control/control-binding with the latest value of the
attribute at the given index with the given value. |
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlListBinding |
convertValueList, findListIndex, findMatchingListValue,
findValue, getAttrValuesFromRSI, getListOperMode, getSelectedIndex, getSelectedValue,
getValueFromList, getValueList, isSingleAttrList,
matchTargetWithLov, navigated,
rangeRefreshed, rangeScrolled,
rowDeleted, rowInserted, rowUpdated,
setAttributeFromValueList, setListOperMode, setSelectedIndex,
setSingleAttrList, setTargetAttrsFromLovRow,
setupListItems, setValueList, updateValuesFromRow |
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding |
findAttributeDef, getAttribute, getAttribute,
getAttributeCount, getAttributeDef, getAttributeDefs,
getAttributeFromRow, getAttributeFromRow,
getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf,
getAttributeNames, isAttributeUpdateable, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, stopEditing,
updateRowDeleted, updateRowInserted |
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding |
executeQuery, executeQueryIfNeeded, getAllRowsInRange,
getApplicationModule, getControl, getCurrentRow,
getDef, getFormBinding, getIteratorBinding,
getLayoutObject, getName, getRowAtRangeIndex,
getRowIterator, getTransaction, getViewObject,
isControlQueriable, reportException, setFormBinding,
setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mLovRSI
protected RowSetIterator mLovRSI
- RowSet which contains data that is to be displayed in the LOV.
mLovAttrs
protected java.lang.String[] mLovAttrs
- Attribute names that are being displayed by this LOV.
mLovPanel
protected JULovPanelInterface mLovPanel
- Panel that displays LOV data.
JULovButtonBinding
public JULovButtonBinding(java.lang.Object control,
JUIteratorBinding iterBinding,
java.lang.String[] targetAttrs,
RowSetIterator lovRsi,
java.lang.String[] lovVOAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
JULovButtonBinding
public JULovButtonBinding(java.lang.Object control,
JUIteratorBinding iterBinding,
java.lang.String[] targetAttrs,
RowSetIterator lovRsi,
JULovPanelInterface lovPanel,
java.lang.String[] listAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
createLovBinding
public static javax.swing.ButtonModel createLovBinding(JUFormBinding formBinding,
javax.swing.AbstractButton control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String[] voAttrNames,
java.lang.String lovVOInstanceName,
java.lang.String[] lovVOAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
- This method should be used to create a JULovButtonBinding and bind it to a JButton control.
It returns the model associated with JButton that can be used in setModel calls to the JButton.
- Parameters:
formBinding
- The containing JUPanelBinding in which the given iterator binding
would be found/created.control
- The control instance to bind to a ViewObject's attribute.voInstanceName
- Name of the instance of the ViewObject in a BC4J ApplicationModulevoIterName
- Runtime instance name
of the iterator in the ViewObject (optional)voIterBindingName
- Instance name of the iterator binding that uniquely identifies an
iterator binding object in this given JUPanelBinding instance.voAttrNames
- The names of the attributes of the target ViewObject rows that are updated
when a Lov row is selected.lovVOInstanceName
- Name of the instance of the ViewObject in BC4J application module to
use for LOV display and selection.lovVOAttrNames
- Names of the attributes that are used to update the target ViewObject
attributes.lovDisplayedAttrNames
- Names of the attribytes that are used to create the display of
each row in the Lov ViewObject.
getInstance
public static javax.swing.ButtonModel getInstance(JUFormBinding formBinding,
javax.swing.AbstractButton control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String[] voAttrNames,
java.lang.String lovVOInstanceName,
java.lang.String[] lovVOAttrNames,
java.lang.String[] lovVODisplayedAttrNames)
- Deprecated. since 9.0.2 use createLovBinding()
getValueAt
public java.lang.Object getValueAt(int attrIndex)
- Description copied from class:
JUCtrlAttrsBinding
- Gets the value from the control for the attribute at the given index.
(The index is calculated from the list of attributes this control binding is
bound to as passed in the constructor).
Framework uses this method to get the attribute value from the control
and pass it on to the Row object on the BC4J side.
- Overrides:
getValueAt
in class JUCtrlListBinding
setDataValueAt
public void setDataValueAt(java.lang.Object value,
int attrIndex)
- Overrides:
setDataValueAt
in class JUCtrlAttrsBinding
setValueAt
public void setValueAt(java.lang.Object value,
int attrIndex)
- Description copied from class:
JUCtrlAttrsBinding
- Updates the control/control-binding with the latest value of the
attribute at the given index with the given value. This method is used
by the framework to update the control with attribute values from a BC4J row.
- Overrides:
setValueAt
in class JUCtrlAttrsBinding
getLovPanelInterface
public JULovPanelInterface getLovPanelInterface()
setHelpAction
public void setHelpAction(java.awt.event.ActionListener al)
- If the default LOV dialog is being used to display LOV Data, this method should be
used by applications to set the ActionListener that is triggered on activating the
help button in the LOV Dialog. This allows applications to display custom help
for the LOV dialog.
getModelImpl
protected javax.swing.ButtonModel getModelImpl(java.lang.Object control)
- *** For internal framework use only ***
addControlToPanel
public void addControlToPanel(java.lang.Object panel,
java.lang.Object layoutObject,
java.lang.Object layoutCons)
- *** For internal framework use only ***
- Overrides:
addControlToPanel
in class JUControlBinding
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
performLOVAction
public void performLOVAction()
- This method is invoked when action is to be performed on the associated button.
It gets the current row from the Lov RowSetIterator and update the values from this
row in to the current row of the target RowSetIterator by mapping each element
in the lovAttributeNames[] in the source/lov Row with each element in the attributeNames[]
in the target Row.
isArmed
public boolean isArmed()
- Specified by:
isArmed
in interface javax.swing.ButtonModel
isSelected
public boolean isSelected()
- Specified by:
isSelected
in interface javax.swing.ButtonModel
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface javax.swing.ButtonModel
isPressed
public boolean isPressed()
- Specified by:
isPressed
in interface javax.swing.ButtonModel
isRollover
public boolean isRollover()
- Specified by:
isRollover
in interface javax.swing.ButtonModel
setArmed
public void setArmed(boolean b)
- Specified by:
setArmed
in interface javax.swing.ButtonModel
setSelected
public void setSelected(boolean b)
- Specified by:
setSelected
in interface javax.swing.ButtonModel
setEnabled
public void setEnabled(boolean b)
- Specified by:
setEnabled
in interface javax.swing.ButtonModel
setPressed
public void setPressed(boolean b)
- Specified by:
setPressed
in interface javax.swing.ButtonModel
setRollover
public void setRollover(boolean b)
- Specified by:
setRollover
in interface javax.swing.ButtonModel
setMnemonic
public void setMnemonic(int key)
- Specified by:
setMnemonic
in interface javax.swing.ButtonModel
getMnemonic
public int getMnemonic()
- Specified by:
getMnemonic
in interface javax.swing.ButtonModel
setActionCommand
public void setActionCommand(java.lang.String s)
- Specified by:
setActionCommand
in interface javax.swing.ButtonModel
getActionCommand
public java.lang.String getActionCommand()
- Specified by:
getActionCommand
in interface javax.swing.ButtonModel
setGroup
public void setGroup(javax.swing.ButtonGroup group)
- Specified by:
setGroup
in interface javax.swing.ButtonModel
addActionListener
public void addActionListener(java.awt.event.ActionListener l)
- Specified by:
addActionListener
in interface javax.swing.ButtonModel
removeActionListener
public void removeActionListener(java.awt.event.ActionListener l)
- Specified by:
removeActionListener
in interface javax.swing.ButtonModel
addItemListener
public void addItemListener(java.awt.event.ItemListener l)
- Specified by:
addItemListener
in interface javax.swing.ButtonModel
removeItemListener
public void removeItemListener(java.awt.event.ItemListener l)
- Specified by:
removeItemListener
in interface javax.swing.ButtonModel
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener l)
- Specified by:
addChangeListener
in interface javax.swing.ButtonModel
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener l)
- Specified by:
removeChangeListener
in interface javax.swing.ButtonModel
getSelectedObjects
public java.lang.Object[] getSelectedObjects()
- Specified by:
getSelectedObjects
in interface java.awt.ItemSelectable
getLOVRowSetIterator
public RowSetIterator getLOVRowSetIterator()
- Returns the RowSetIterator used to display LOV data. This could
be used to programmtically set a current selection in the Lov RowSetIterator.