Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


oracle.jbo.uicli.jui
Class JUButtonGroupBinding

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.JUButtonGroupBinding
All Implemented Interfaces:
java.awt.event.ActionListener, AttributeList, java.util.EventListener, RowNavigationListener, RowSetListener

public class JUButtonGroupBinding
extends JUCtrlListBinding
implements java.awt.event.ActionListener

Binds a group of buttons in a panel to an attribute in a ViewObject such that on selection of a given button, this binding works like a LOV binding or used to display an enumerated list for update. When used like an LOV, it will update selected attributes in the target ViewObject's current row with values from the row that is represented by the selected button.

When the binding is used to display an enumerated list of values in a set of buttons grouped together, it will update a value in one of the attributes of the current row in a target ViewObject. This behaves like the attribute binding in a list control with a static list of values.


Field Summary

 

Fields inherited from class oracle.jbo.uicli.binding.JUCtrlListBinding
LIST_OPER_NAVIGATE, LIST_OPER_SET_ATTRIBUTE, mFirstDisplayAttr, mListAttrNames, mListDisplayAttrNames, mListIterBinding, mSingleAttrList, mStaticList, mValueList

 

Constructor Summary
JUButtonGroupBinding(javax.swing.AbstractButton[] buttons, JUIteratorBinding iterBinding, java.lang.String attrName, java.lang.Object[] valueList)
          Use this constructor to setup an enumerated list of values and bind them to an attribute in a ViewObject (like a static list of values bound to an attribute in a ListBox or a ComboBox).
JUButtonGroupBinding(JUButtonGroupControlInterface control, JUIteratorBinding iterBinding, java.lang.String[] attrNames, JUIteratorBinding listIterBinding, java.lang.String[] listAttrNames, java.lang.String listDisplayAttrName)
          Use this constructor to bind a set of group buttons (created by the given control in createButtons method) based on values as returned from the given LOV viewobject.

 

Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
          *** For internal framework use only ***
static JUButtonGroupBinding createEnumerationBinding(JUFormBinding formBinding, javax.swing.AbstractButton[] buttons, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, java.lang.Object[] valueList)
          Given a list of buttons (that display the values for the given valueList) bind to an attribute of a ViewObject, such that on selection of one of the buttons in the list, the value of the selected attribute in the current row of the ViewObject is updated with the equivalent value in the valueList array.
static JUButtonGroupBinding createLovBinding(JUFormBinding formBinding, JUButtonGroupControlInterface 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 lovVODisplayedAttrName)
          This method should be used to create a JUButtonGroupBinding and bind it to a control.
static JUButtonGroupBinding getInstance(JUFormBinding formBinding, javax.swing.AbstractButton[] buttons, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, java.lang.Object[] valueList)
          Deprecated. since 9.0.2 use createLovBinding() or createEnumerationBinding instead
static JUButtonGroupBinding getInstance(JUFormBinding formBinding, JUButtonGroupControlInterface control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, java.lang.String listVOInstanceName, java.lang.String listVOAttrName)
          Deprecated. since 9.0.2 use createLovBinding() or createEnumerationBinding instead
 void setDataValueAt(java.lang.Object value, int attrIndex)
          Sets the button with the given value as selected in the control as well as update the target attribute with the selected value.
 void setSelectedIndex(int indx)
          Sets the button at the given index as selected in the control as well as update the target attribute with the selected value.
protected  void setupListItems(boolean clean, boolean keepSelectedIndex)
          Sets up the list of values that are displayed by the associated control.
 void setValueAt(java.lang.Object value, int attrIndex)
          Matches the given value to a button in the associated control and sets it as selected.

 

Methods inherited from class oracle.jbo.uicli.binding.JUCtrlListBinding
convertValueList, findListIndex, findMatchingListValue, findValue, getAttrValuesFromRSI, getListOperMode, getSelectedIndex, getSelectedValue, getValueAt, getValueFromList, getValueList, isSingleAttrList, matchTargetWithLov, navigated, rangeRefreshed, rangeScrolled, rowDeleted, rowInserted, rowUpdated, setAttributeFromValueList, setListOperMode, setSingleAttrList, setTargetAttrsFromLovRow, setValueList, updateTargetFromSelectedValue, updateValuesFromRow

 

Methods inherited from class oracle.jbo.uicli.binding.JUCtrlAttrsBinding
refreshControl, updateNavigated, updateRangeScrolled, updateValuesFromRows

 

Methods inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding
findAttributeDef, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDefs, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, getAttributeValues, isArrayIteratorType, isAttributeUpdateable, setArrayIteratorType, 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, reportException, setFormBinding, setName

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

JUButtonGroupBinding

public JUButtonGroupBinding(javax.swing.AbstractButton[] buttons,
JUIteratorBinding iterBinding,
                            java.lang.String attrName,
                            java.lang.Object[] valueList)
Use this constructor to setup an enumerated list of values and bind them to an attribute in a ViewObject (like a static list of values bound to an attribute in a ListBox or a ComboBox). For example, say an attriute may contain only two values M/F. RadioButtons grouped together could be used to display Male/Female in the UI, while upon selection of either, the corresponding attribute value is updated with M/F. This kind of usage can be bound via this constructor.

JUButtonGroupBinding

public JUButtonGroupBinding(JUButtonGroupControlInterface control,
JUIteratorBinding iterBinding,
                            java.lang.String[] attrNames,
JUIteratorBinding listIterBinding,
                            java.lang.String[] listAttrNames,
                            java.lang.String listDisplayAttrName)
Use this constructor to bind a set of group buttons (created by the given control in createButtons method) based on values as returned from the given LOV viewobject. This constructor creates an LOV binding.
Method Detail

createLovBinding

public static JUButtonGroupBinding createLovBinding(JUFormBinding formBinding,
JUButtonGroupControlInterface 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 lovVODisplayedAttrName)
This method should be used to create a JUButtonGroupBinding and bind it to a control.
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 ApplicationModule.
voIterName - Runtime instance name of the iterator in the ViewObject (optional).
voIterBindingName - Instance name of the iterator binding that uniquely identifies an iterator binding object used to read/write data 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.

getInstance

public static JUButtonGroupBinding getInstance(JUFormBinding formBinding,
JUButtonGroupControlInterface control,
                                               java.lang.String voInstanceName,
                                               java.lang.String voIterName,
                                               java.lang.String voIterBindingName,
                                               java.lang.String attrName,
                                               java.lang.String listVOInstanceName,
                                               java.lang.String listVOAttrName)
Deprecated. since 9.0.2 use createLovBinding() or createEnumerationBinding instead

createEnumerationBinding

public static JUButtonGroupBinding createEnumerationBinding(JUFormBinding formBinding,
                                                            javax.swing.AbstractButton[] buttons,
                                                            java.lang.String voInstanceName,
                                                            java.lang.String voIterName,
                                                            java.lang.String voIterBindingName,
                                                            java.lang.String attrName,
                                                            java.lang.Object[] valueList)
Given a list of buttons (that display the values for the given valueList) bind to an attribute of a ViewObject, such that on selection of one of the buttons in the list, the value of the selected attribute in the current row of the ViewObject is updated with the equivalent value in the valueList array.

getInstance

public static JUButtonGroupBinding getInstance(JUFormBinding formBinding,
                                               javax.swing.AbstractButton[] buttons,
                                               java.lang.String voInstanceName,
                                               java.lang.String voIterName,
                                               java.lang.String voIterBindingName,
                                               java.lang.String attrName,
                                               java.lang.Object[] valueList)
Deprecated. since 9.0.2 use createLovBinding() or createEnumerationBinding instead

setupListItems

protected void setupListItems(boolean clean,
                              boolean keepSelectedIndex)
Sets up the list of values that are displayed by the associated control. This method creates the list of buttons by calling the control's createButtons() method passing it the list of Strings to be used for display.
Overrides:
setupListItems in class JUCtrlListBinding

addControlToPanel

public void addControlToPanel(java.lang.Object panel,
                              java.lang.Object layoutObject,
                              java.lang.Object layoutCons)
*** For internal framework use only ***
Specified by:
addControlToPanel in class JUControlBinding

setValueAt

public void setValueAt(java.lang.Object value,
                       int attrIndex)
Matches the given value to a button in the associated control and sets it as selected.
Specified by:
setValueAt in class JUCtrlAttrsBinding

setSelectedIndex

public void setSelectedIndex(int indx)
Sets the button at the given index as selected in the control as well as update the target attribute with the selected value.
Overrides:
setSelectedIndex in class JUCtrlListBinding

setDataValueAt

public void setDataValueAt(java.lang.Object value,
                           int attrIndex)
Sets the button with the given value as selected in the control as well as update the target attribute with the selected value.
Specified by:
setDataValueAt in class JUCtrlAttrsBinding

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

Oracle9i Business Components for Java API Reference
Oracle9i Jdeveloper (9.0.4)
B10391-01


 

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