|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.binding.JUCtrlBoolBinding | +--oracle.jbo.uicli.jui.JUButtonBinding
Implements binding a Swing AbstractButton object with a BC4J attribute.
Swing Classes like JCheckBox, JRadioButton, JButton can be bound using this class to display/update boolean values for an attribute. Applications can customize the boolean values to any two desired values that a particular attribute can accept like Y/N for checkbox states of True/False or Checked/Unchecked.
By default the binding sends a java.lang.Boolean.TRUE for checked or selected state of a button, to the BC4J attribute.
Fields inherited from class oracle.jbo.uicli.binding.JUCtrlListBinding |
LIST_OPER_NAVIGATE, LIST_OPER_SET_ATTRIBUTE, mListAttrNames,
mListDisplayAttrNames, mListIterBinding, mStaticList,
mValueList |
Constructor Summary |
JUButtonBinding(javax.swing.AbstractButton control,
JUIteratorBinding iterBinding,
java.lang.String attrName)
|
JUButtonBinding(javax.swing.AbstractButton control,
JUIteratorBinding iterBinding,
java.lang.String attrName,
java.lang.Object[] valueList,
boolean boolVal)
|
Method Summary |
Type | Method |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Binding subclasses can override this method to implement custom action for actionPerformed event without having to add this binding as an ActionListener in the Application. |
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 |
createActionBinding(JUPanelBinding formBinding,
java.awt.Component control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
int action)
Use this method to bind an AbstractButton to a BC4J ViewObject and assign one of the enumerated set of actions to this Button, so that when this button is pressed (on actionPerformed) the desired action(method) is invoked on the associated RowSet. |
static javax.swing.ButtonModel |
createBooleanBinding(JUFormBinding formBinding,
javax.swing.AbstractButton control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String attrName,
java.lang.Object[] valueList,
boolean boolVal)
Use this method to bind an AbstractButton to a BC4J Attribute when the Application usage determines the attribute values for true and false states to be used to set the attribute values. |
java.lang.String |
getActionCommand()
|
static javax.swing.ButtonModel |
getAttributeBinding(JUFormBinding formBinding,
javax.swing.AbstractButton control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String attrName)
Use this method to bind an AbstractButton to a BC4J Attribute when the default settings for true and false states are to be used to set the attribute values. |
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 attrName)
Deprecated. since 9.0.2 use createAttributeBinding or createBooleanBinding methods instead. |
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 attrName,
java.lang.Object[] valueList,
boolean boolVal)
Deprecated. since 9.0.2 use createAttributeBinding or createBooleanBinding methods instead. |
static javax.swing.ButtonModel |
getInstance(JUPanelBinding formBinding,
java.awt.Component control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
int action)
Deprecated. since 9.0.2 use createActionBinding method instead. |
int |
getMnemonic()
|
protected javax.swing.ButtonModel |
getModelImpl(javax.swing.AbstractButton control)
Returns the button model that this binding is bound to. |
java.lang.Object[] |
getSelectedObjects()
|
java.lang.Object |
getValueAt(int attrIndex)
Returns the current boolean value that the associated button represents. |
boolean |
isArmed()
|
boolean |
isEnabled()
|
boolean |
isPressed()
|
boolean |
isRollover()
|
boolean |
isSelected()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Updates the BC4J attribute based on the current setting of the 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)
This method is overridden to be a no-op for Button Binding. |
void |
setEnabled(boolean b)
|
void |
setGroup(javax.swing.ButtonGroup group)
|
void |
setMnemonic(int key)
|
void |
setPressed(boolean b)
|
void |
setRollover(boolean b)
|
void |
setSelected(boolean b)
|
void |
setValueAt(java.lang.Object value,
int attrIndex)
Matches the given value with one of the values given in the constructor or to Boolean.TRUE or FALSE and then sets the associated button to matching boolean state. |
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlBoolBinding |
findValue, getValueFromBoolean |
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlListBinding |
convertValueList, findListIndex, findMatchingListValue,
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.JUCtrlAttrsBinding |
updateNavigated, updateRangeScrolled,
updateValuesFromRows |
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 |
Constructor Detail |
public JUButtonBinding(javax.swing.AbstractButton control, JUIteratorBinding iterBinding, java.lang.String attrName)
public JUButtonBinding(javax.swing.AbstractButton control, JUIteratorBinding iterBinding, java.lang.String attrName, java.lang.Object[] valueList, boolean boolVal)
Method Detail |
public static javax.swing.ButtonModel getAttributeBinding(JUFormBinding formBinding, javax.swing.AbstractButton control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName)
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.attrName
- The name of the attribute of this ViewObject rows that contains data
to display/edit in the associated button.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 attrName)
public static javax.swing.ButtonModel createBooleanBinding(JUFormBinding formBinding, javax.swing.AbstractButton control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String attrName, java.lang.Object[] valueList, boolean boolVal)
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.attrName
- The name of the attribute of this ViewObject rows that contains data
to display/edit in the associated button.valueList
- A list of two values that are used by this binding to set into
the BC4J attribute when this button updates an attribute.boolVal
- If true means, the first value in the above list valueList means 'true'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 attrName, java.lang.Object[] valueList, boolean boolVal)
public static javax.swing.ButtonModel createActionBinding(JUPanelBinding formBinding, java.awt.Component control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, int action)
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.action
- An enumerated action-id which determines which method to invoke
on the associated RowSet when this button is pressed.public static javax.swing.ButtonModel getInstance(JUPanelBinding formBinding, java.awt.Component control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, int action)
protected javax.swing.ButtonModel getModelImpl(javax.swing.AbstractButton control)
public void addControlToPanel(java.lang.Object panel, java.lang.Object layoutObject, java.lang.Object layoutCons)
addControlToPanel
in class JUControlBinding
public java.lang.Object getValueAt(int attrIndex)
getValueAt
in class JUCtrlListBinding
attrIndex
- This argument is ignored for this binding.public void setValueAt(java.lang.Object value, int attrIndex)
setValueAt
in class JUCtrlAttrsBinding
value
- Should either be Boolean.TRUE or Boolean.FALSE or
one of the two values provided in the constructor or create binding
method. If the values do not match, this method sets the button
state to false.attrIndex
- This argument is ignored for this binding.public void setDataValueAt(java.lang.Object value, int attrIndex)
setDataValueAt
in class JUCtrlAttrsBinding
public boolean isArmed()
isArmed
in interface javax.swing.ButtonModel
public boolean isSelected()
isSelected
in interface javax.swing.ButtonModel
public boolean isEnabled()
isEnabled
in interface javax.swing.ButtonModel
public boolean isPressed()
isPressed
in interface javax.swing.ButtonModel
public boolean isRollover()
isRollover
in interface javax.swing.ButtonModel
public void setArmed(boolean b)
setArmed
in interface javax.swing.ButtonModel
public void setSelected(boolean b)
setSelected
in interface javax.swing.ButtonModel
public void setEnabled(boolean b)
setEnabled
in interface javax.swing.ButtonModel
public void setPressed(boolean b)
setPressed
in interface javax.swing.ButtonModel
public void setRollover(boolean b)
setRollover
in interface javax.swing.ButtonModel
public void setMnemonic(int key)
setMnemonic
in interface javax.swing.ButtonModel
public int getMnemonic()
getMnemonic
in interface javax.swing.ButtonModel
public void setActionCommand(java.lang.String s)
setActionCommand
in interface javax.swing.ButtonModel
public java.lang.String getActionCommand()
getActionCommand
in interface javax.swing.ButtonModel
public void setGroup(javax.swing.ButtonGroup group)
setGroup
in interface javax.swing.ButtonModel
public void addActionListener(java.awt.event.ActionListener l)
addActionListener
in interface javax.swing.ButtonModel
public void removeActionListener(java.awt.event.ActionListener l)
removeActionListener
in interface javax.swing.ButtonModel
public void addItemListener(java.awt.event.ItemListener l)
addItemListener
in interface javax.swing.ButtonModel
public void removeItemListener(java.awt.event.ItemListener l)
removeItemListener
in interface javax.swing.ButtonModel
public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener
in interface javax.swing.ButtonModel
public void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener
in interface javax.swing.ButtonModel
public java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |