Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.uicli.jui
Class JUActionBinding

java.lang.Object
  extended byjava.util.AbstractMap
      extended byoracle.jbo.common.JboAbstractMap
          extended byoracle.adf.model.binding.DCControlBinding
              extended byoracle.jbo.uicli.binding.JUControlBinding
                  extended byoracle.jbo.uicli.binding.JUCtrlActionBinding
                      extended byoracle.jbo.uicli.jui.JUActionBinding
All Implemented Interfaces:
java.awt.event.ActionListener, javax.swing.ButtonModel, java.util.EventListener, java.awt.ItemSelectable, java.util.Map

public class JUActionBinding
extends JUCtrlActionBinding
implements java.awt.event.ActionListener, javax.swing.ButtonModel

Implements binding for a JButton to one of the commonly-used methods on the associated RowSet. The super class JUCtrlActionBinding has all the necessary logic to bind to a BC4J RowSet. This class is a public facade to allow a Swing JButton to work with the logic in the superclass.

This class also implements Swing ButtonModel to allow design time to associate a binding editor with a JButton.

See Also:
JUCtrlActionBinding

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
 
Fields inherited from class oracle.jbo.uicli.binding.JUCtrlActionBinding
ACTION_BINDING_CONTAINER_EXECUTE, ACTION_BINDING_CONTAINER_FIND, ACTION_COMMIT_TRANSACTION, ACTION_CREATE_INSERT_ROW, ACTION_CREATE_ROW, ACTION_EXECUTE, ACTION_FIND, ACTION_FIRST, ACTION_INVOKE_METHOD, ACTION_ITERATOR_BINDING_EXECUTE, ACTION_ITERATOR_BINDING_FIND, ACTION_LAST, ACTION_NEXT, ACTION_NEXT_SET, ACTION_PREVIOUS, ACTION_PREVIOUS_SET, ACTION_REMOVE_CURRENT_ROW, ACTION_RESET, ACTION_RESET_STATE, ACTION_ROLLBACK_TRANSACTION
 
Fields inherited from class oracle.adf.model.binding.DCControlBinding
ATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, mInternalGet_KeyResolved, ROW_KEY_STR
 
Constructor Summary
JUActionBinding(java.lang.Object control, DCBindingContainer form, DCInvokeMethodDef methodInfo)
           
JUActionBinding(java.lang.Object control, JUIteratorBinding iterBinding, int action)
          This constructor binds the given JButton object (control) with an enumerated action in the RowSet identified by the given iterator binding.
JUActionBinding(java.lang.Object control, JUIteratorBinding iterBinding, int action, boolean addAsActionListener)
          This constructor binds the given JButton object (control) with an enumerated action in the RowSet identified by the given iterator binding.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Calls JUCtrlActionBinding.invoke() method to perform the associated RowSet action.
 void addActionBindingListener(JUActionBindingListener l)
          Adds the given listener to this Action Binding's listeners list.
 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)
           
 void doIt()
          Override to implement ActionBinding events.
 java.util.ArrayList getActionBindingListeners()
          Returns a list of JUActionBindingListener (returns an empty list if no such listener was registered).
 java.lang.String getActionCommand()
           
 java.lang.Object getControlModel(java.lang.Object control)
          Gets the associated View's model object.
 int getMnemonic()
           
protected  javax.swing.ButtonModel getModelImpl(java.lang.Object control)
          Returns the button model to which this binding class and the given control are associated.
 java.lang.Object[] getSelectedObjects()
           
 boolean isArmed()
           
 boolean isEnabled()
           
 boolean isPressed()
           
 boolean isRollover()
           
 boolean isSelected()
           
 void removeActionBindingListener(JUActionBindingListener l)
          Removes the given listener from this Action Binding's listeners list.
 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 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)
           
 
Methods inherited from class oracle.jbo.uicli.binding.JUCtrlActionBinding
actionIdToName, actionNameToId, getActionId, getDataControl, getEnabledString, getError, getInvokeMethodDef, getParams, getParamsMap, getPath, getResult, ignoreUpdates, internalGet, invoke, isActionEnabled, isArrayIteratorType, refreshControl, reportException, resetInputState, setArrayIteratorType, setInvoke, setParams
 
Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding
getFormBinding, getIteratorBinding, reportException, setFormBinding
 
Methods inherited from class oracle.adf.model.binding.DCControlBinding
addToDCExceptions, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getBindingContainer, getControl, getCurrentRow, getDCIteratorBinding, getDef, getDefFullName, getDefName, getErrors, getFullName, getLayoutObject, getName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewObject, hashCode, internalSetName, isControlQueriable, needsEstimatedRowCount, processInputException, release, removeFromDCExceptions, resetAttributeExceptionInRow, setBindingContainer, setControl, setName, toString
 
Methods inherited from class oracle.jbo.common.JboAbstractMap
entrySet, equals
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JUActionBinding

public JUActionBinding(java.lang.Object control,
                       JUIteratorBinding iterBinding,
                       int action)
This constructor binds the given JButton object (control) with an enumerated action in the RowSet identified by the given iterator binding. Also adds this binding class as an ActionListener on the given control.


JUActionBinding

public JUActionBinding(java.lang.Object control,
                       JUIteratorBinding iterBinding,
                       int action,
                       boolean addAsActionListener)
This constructor binds the given JButton object (control) with an enumerated action in the RowSet identified by the given iterator binding. Optionally adds this binding class as an ActionListener on the given control.


JUActionBinding

public JUActionBinding(java.lang.Object control,
                       DCBindingContainer form,
                       DCInvokeMethodDef methodInfo)
Method Detail

getControlModel

public java.lang.Object getControlModel(java.lang.Object control)
Gets the associated View's model object.

Overrides:
getControlModel in class DCControlBinding

getModelImpl

protected javax.swing.ButtonModel getModelImpl(java.lang.Object control)
Returns the button model to which this binding class and the given control are associated. If control is null and there is no button model associated with this binding object, it creates a new instance of DefaultButtonModel and returns it.

Framework uses this method to get the button model for the associated control.


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 JUCtrlActionBinding

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Calls JUCtrlActionBinding.invoke() method to perform the associated RowSet action.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

doIt

public void doIt()
Override to implement ActionBinding events.

Overrides:
doIt in class JUCtrlActionBinding

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

getActionBindingListeners

public final java.util.ArrayList getActionBindingListeners()
Returns a list of JUActionBindingListener (returns an empty list if no such listener was registered).


addActionBindingListener

public final void addActionBindingListener(JUActionBindingListener l)
Adds the given listener to this Action Binding's listeners list.


removeActionBindingListener

public final void removeActionBindingListener(JUActionBindingListener l)
Removes the given listener from this Action Binding's listeners list.


Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

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