Business Components

oracle.jbo.uicli.jui
Class JUPanelBinding

java.lang.Object
  |
  +--oracle.jbo.uicli.binding.JUFormBinding
        |
        +--oracle.jbo.uicli.jui.JUPanelBinding

public class JUPanelBinding
extends JUFormBinding

JUPanelBinding class is a container class that manages JUIteratorBindings, etc by extending the JUFormBinding class and provides:

  • management of JUNavigationBarInterfaces bound to the iterators behind the iterator binding objects,
  • management of JUIteratorChangedListeners like NavigationBars, StatusBars and Menus.
  • management of JUPanelValidationListeners that perform attribute, panel and transaction level validations.
  • switching of iterators behind iterator-binding objects so that all relevant controls in this form are updated with new data from the new iterator.


    Field Summary
    TypeField
    protected  java.lang.String mAppName
               
    protected  java.util.ArrayList mIteratorChangedListeners
               
    protected  java.util.ArrayList mNavigationBarList
               
     
    Fields inherited from class oracle.jbo.uicli.binding.JUFormBinding
    mAM, mApplication
     
    Constructor Summary
    JUPanelBinding()
              *** For internal framework use only ***
    JUPanelBinding(javax.swing.JPanel panel)
              Applications should use this constructor to create a panel binding and associate it with a swing JPanel object.
    JUPanelBinding(java.lang.String appName, javax.swing.JPanel panel)
              Creates an instance of this class, associating it with a JPanel object and a JUApplication identified by appName.
    JUPanelBinding(java.lang.String appName, java.lang.String amName, javax.swing.JPanel panel)
              Creates an instance of this class, associating it with a JPanel object and a JUApplication identified by appName.
     
    Method Summary
    TypeMethod
     void addBindingWithCellEditor(JUPanelStopEditingListener binding)
              Adds a listener that's interested in notification such that it stops it's controls edit process before the panel is moved to a different set of data.
     void addIteratorChangedListener(JUIteratorChangedListener l)
              Add a listener that should be notified when the iterator behind an iterator binding object changes, or the display mode changes from find to data mode or vice-versa
     void addNavigationBar(JUNavigationBarInterface navBar)
              Add a NavigationBar (or like object) that needs to listen into changes in an iterator, and focus events, etc.
     void addValidationListener(JUPanelValidationListener l)
              Adds the given listener to this panel's validation listeners list.
     void beforeCurrencyChange(JUPanelValidationEvent ev)
              Notifies all JUPanelValidationListeners with the beforeCurrencyChange event.
     void beforeSaveTransaction(JUPanelValidationEvent ev)
              Notifies all JUPanelValidationListeners with the beforeSaveTransaction event.
     void beforeSetAttribute(JUPanelValidationEvent ev)
              Notifies all JUPanelValidationListeners with the beforeSetAttribute event.
     void bindRowSetIterator(java.lang.String iterBindingName, RowSetIterator rsi)
              Binds the iterator identified by iterBindingName in this panel with another iterator.
     void bindRowSetIterator(java.lang.String iterBindingName, java.lang.String voInstanceName)
              Binds the iterator identified by iterBindingName in this panel with another ViewObject in the current application module identified by the given voInstanceName
    protected  void callBeforeRowNavigated(JUIteratorBinding iter)
              Forces the current control to stop it's editing mode (if any like in JTable).
    protected  void callBeforeSaveTransaction(Transaction txn)
              Forces the current control to stop it's editing mode (if any like in JTable).
    protected  void callBeforeSetAttribute(JUControlBinding ctrl, Row row, AttributeDef ad, java.lang.Object value)
              Calls beforeSetAttribute method to notify all validation listeners.
     void focusGained(JUIteratorBinding iterBinding, JUControlBinding binding, int attrIndex)
              Notifies the JUApplication object of focusGained event so that it could pass it on to its StatusBarInterface listeners (like JUStatusBar to update status message) Then this method notifies each JUNavigationBarInterface object in this object's list of the change in focus, so that the NavigationBars could adjust their display based on the current iterator binding.
     java.lang.String getApplicationName()
              Returns the name of the JUApplication object in which this Panel binding was created.
     java.lang.String getAppModuleName()
              Returns the Application Module instance name to which this Panel binding is connected to.
     java.util.ArrayList getValidationListeners()
              Returns a list of JUPanelValidationListeners (returns an empty list if no such listener was registered).
    protected  void initializeApplicationModule()
              Sets up the JUApplication and Application Module references based on name passed to this object via the constructors or various setter methods.
     void initializePanel(java.util.ArrayList controls)
              *** For internal framework use only ***
     boolean isTransactionDirty()
              Returns true, if the Transaction behind the associated ApplicationModule has pending changes In 3 tier, this method will go across the tier boundary to get the actual middle-tier transaction status.
    protected  void notifyIteratorChanged(JUIteratorBinding iterBnd, boolean refresh)
              Notifies all JUIteratorChangedListeners and JUNavigationBarInterface objects registered with this panel, of the change in iterator binding.
     void removeBindingWithCellEditor(JUPanelStopEditingListener binding)
              Removes a listener from the list.
     void removeIteratorChangedListener(JUIteratorChangedListener l)
              Remove a listener from this list.
     void removeNavigationBar(JUNavigationBarInterface navBar)
              Removes a JUNavigationBarInterface listener object from the list.
     void removeValidationListener(JUPanelValidationListener l)
              Removes the given listener from this panel's validation listeners list.
     void setFindMode(boolean mode)
              Sets this panel and all it's associated iterators into find mode.
     void setPanel(java.lang.Object panel)
              Sets the given object as the JPanel object associated with this panel binding.
     void stopEditing()
              Notifies all JUPanelStopEditingListeners to stop editing, so that their values could be updated with new set of data.
     
    Methods inherited from class oracle.jbo.uicli.binding.JUFormBinding
    addControlBinding, addControlBinding, addIterBinding, addIterBinding, addStatusBarInterface, clearIterBindings, displayInShortForm, displayStatus, displayStatus, execute, executeIfNeeded, findControlBinding, findIterBinding, getApplication, getApplicationModule, getControlBinding, getControlType, getDef, getDisplayHeight, getDisplayHint, getDisplayWidth, getHint, getIterBindingList, getIterBindings, getLabel, getName, getPanel, getRangeIterBinding, getRowIterBinding, getTooltip, hasFormatInformation, initializeFromDef, initializeFromDef, isFindMode, removeControlBinding, removeControlBinding, removeIterBinding, removeStatusBarInterface, reportException, setApplication, setApplicationModule, setName, setPanelInternal
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    mAppName

    protected java.lang.String mAppName

    mNavigationBarList

    protected java.util.ArrayList mNavigationBarList

    mIteratorChangedListeners

    protected java.util.ArrayList mIteratorChangedListeners
    Constructor Detail

    JUPanelBinding

    public JUPanelBinding()
    *** For internal framework use only ***

    JUPanelBinding

    public JUPanelBinding(javax.swing.JPanel panel)
    Applications should use this constructor to create a panel binding and associate it with a swing JPanel object. The binding thus created needs to be added to a JUApplication object and is not completely usable till then.

    JUPanelBinding

    public JUPanelBinding(java.lang.String appName,
                          javax.swing.JPanel panel)
    Creates an instance of this class, associating it with a JPanel object and a JUApplication identified by appName. This constructor is used in the JClient designtime generated code to pass in the name of the Application Model definition name that identifies the middle-tier (BC4J) connection and configuration information.

    JUPanelBinding

    public JUPanelBinding(java.lang.String appName,
                          java.lang.String amName,
                          javax.swing.JPanel panel)
    Creates an instance of this class, associating it with a JPanel object and a JUApplication identified by appName. This constructor is used in the JClient designtime generated code to pass in the name of the Application Model definition name that identifies the middle-tier (BC4J) connection and configuration information. This constructor also takes in the application module name incase the BC4J application module for this panel is a nested application module.
    Method Detail

    initializeApplicationModule

    protected void initializeApplicationModule()
    Sets up the JUApplication and Application Module references based on name passed to this object via the constructors or various setter methods.
    Overrides:
    initializeApplicationModule in class JUFormBinding

    initializePanel

    public void initializePanel(java.util.ArrayList controls)
    *** For internal framework use only ***
    Overrides:
    initializePanel in class JUFormBinding

    bindRowSetIterator

    public void bindRowSetIterator(java.lang.String iterBindingName,
                                   java.lang.String voInstanceName)
    Binds the iterator identified by iterBindingName in this panel with another ViewObject in the current application module identified by the given voInstanceName

    bindRowSetIterator

    public void bindRowSetIterator(java.lang.String iterBindingName,
                                   RowSetIterator rsi)
    Binds the iterator identified by iterBindingName in this panel with another iterator. This method notifies all JUIteratorChangeListeners in this panel of the change so that various NavigationBars, Menus and Status bars could adjust their displays. Applications could register their own JUIteratorChangeListeners so that they get notified of data change due to a change in iterator, to allow them to update the displays (like change button enabled state etc.).

    notifyIteratorChanged

    protected final void notifyIteratorChanged(JUIteratorBinding iterBnd,
                                               boolean refresh)
    Notifies all JUIteratorChangedListeners and JUNavigationBarInterface objects registered with this panel, of the change in iterator binding. If refresh parameter is true, like when there's a change in iterator behind the iterator binding instance or, change in data/find mode of the panel, then this method raises a rangeRefreshed event on the iteratorBinding object so that all controls also adjust/udpate their displays.
    Overrides:
    notifyIteratorChanged in class JUFormBinding

    addIteratorChangedListener

    public final void addIteratorChangedListener(JUIteratorChangedListener l)
    Add a listener that should be notified when the iterator behind an iterator binding object changes, or the display mode changes from find to data mode or vice-versa

    removeIteratorChangedListener

    public final void removeIteratorChangedListener(JUIteratorChangedListener l)
    Remove a listener from this list.

    addNavigationBar

    public final void addNavigationBar(JUNavigationBarInterface navBar)
    Add a NavigationBar (or like object) that needs to listen into changes in an iterator, and focus events, etc. By default the framework adds all Navigation Bars bound to the Panel Binding object into this list, so that these Navigation bars adjust their display based on current iterator in focus/use.

    removeNavigationBar

    public final void removeNavigationBar(JUNavigationBarInterface navBar)
    Removes a JUNavigationBarInterface listener object from the list.

    focusGained

    public void focusGained(JUIteratorBinding iterBinding,
                            JUControlBinding binding,
                            int attrIndex)
    Notifies the JUApplication object of focusGained event so that it could pass it on to its StatusBarInterface listeners (like JUStatusBar to update status message) Then this method notifies each JUNavigationBarInterface object in this object's list of the change in focus, so that the NavigationBars could adjust their display based on the current iterator binding.
    Overrides:
    focusGained in class JUFormBinding

    getApplicationName

    public final java.lang.String getApplicationName()
    Returns the name of the JUApplication object in which this Panel binding was created.

    getAppModuleName

    public final java.lang.String getAppModuleName()
    Returns the Application Module instance name to which this Panel binding is connected to.

    isTransactionDirty

    public final boolean isTransactionDirty()
    Returns true, if the Transaction behind the associated ApplicationModule has pending changes In 3 tier, this method will go across the tier boundary to get the actual middle-tier transaction status.

    setPanel

    public final void setPanel(java.lang.Object panel)
    Sets the given object as the JPanel object associated with this panel binding.
    Overrides:
    setPanel in class JUFormBinding

    getValidationListeners

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

    addValidationListener

    public final void addValidationListener(JUPanelValidationListener l)
    Adds the given listener to this panel's validation listeners list.

    removeValidationListener

    public final void removeValidationListener(JUPanelValidationListener l)
    Removes the given listener from this panel's validation listeners list.

    callBeforeSetAttribute

    protected void callBeforeSetAttribute(JUControlBinding ctrl,
                                          Row row,
                                          AttributeDef ad,
                                          java.lang.Object value)
    Calls beforeSetAttribute method to notify all validation listeners.
    Overrides:
    callBeforeSetAttribute in class JUFormBinding

    callBeforeRowNavigated

    protected void callBeforeRowNavigated(JUIteratorBinding iter)
    Forces the current control to stop it's editing mode (if any like in JTable). Calls beforeRowNavigated method to notify all validation listeners.
    Overrides:
    callBeforeRowNavigated in class JUFormBinding

    callBeforeSaveTransaction

    protected void callBeforeSaveTransaction(Transaction txn)
    Forces the current control to stop it's editing mode (if any like in JTable). Calls beforeSaveTransaction method to notify all validation listeners.
    Overrides:
    callBeforeSaveTransaction in class JUFormBinding

    beforeSetAttribute

    public void beforeSetAttribute(JUPanelValidationEvent ev)
    Notifies all JUPanelValidationListeners with the beforeSetAttribute event. This event is raised before a control-binding sets the value from a control into the corresponding BC4J row's attribute.

    beforeCurrencyChange

    public void beforeCurrencyChange(JUPanelValidationEvent ev)
    Notifies all JUPanelValidationListeners with the beforeCurrencyChange event. This event is raised before an interator-binding object moves the current row to another row.

    beforeSaveTransaction

    public void beforeSaveTransaction(JUPanelValidationEvent ev)
    Notifies all JUPanelValidationListeners with the beforeSaveTransaction event. The JClient framework calls this method before invoking commit() on the bc4j Transaction.

    setFindMode

    public void setFindMode(boolean mode)
    Sets this panel and all it's associated iterators into find mode.
    Overrides:
    setFindMode in class JUFormBinding

    addBindingWithCellEditor

    public void addBindingWithCellEditor(JUPanelStopEditingListener binding)
    Adds a listener that's interested in notification such that it stops it's controls edit process before the panel is moved to a different set of data.

    removeBindingWithCellEditor

    public void removeBindingWithCellEditor(JUPanelStopEditingListener binding)
    Removes a listener from the list.

    stopEditing

    public void stopEditing()
    Notifies all JUPanelStopEditingListeners to stop editing, so that their values could be updated with new set of data. This method is invoked before changing the find/data mode, or switching iterators behind an iterator binding or before committing/rolling back the database transaction.

    Business Components