public final class JUTabbedPaneListener
implements javax.swing.event.ChangeListener, java.awt.event.ContainerListener
This listener is associated with JTabbedPane instances in an ADF Swing
environment. This listener is needed because switching active tab panes
does not set the focus to the components in the active pane.
If multiple tabs are re-using the same navigation bar, then the navigation bar
needs to be refreshed whenever the active tab changes.
public static void registerContainer(JUPanelBinding panelBinding,
This method is called from JUPanelBinding.
When a panelBinding is associated with a UI container, we want to grab a reference
to that container. If the container already contains a JTabbedPane, we'll register
as ChangeListener for that JTabbedPane. We also register for the container listener
events, so we'll be informed if a JTabbedPane is added later on.
public static void unregisterContainer(java.awt.Container container)
public void componentAdded(java.awt.event.ContainerEvent e)
componentAdded in interface java.awt.event.ContainerListener
public void componentRemoved(java.awt.event.ContainerEvent e)
componentRemoved in interface java.awt.event.ContainerListener
public void stateChanged(javax.swing.event.ChangeEvent e)
This method is called by JTabbedPane when the active tab changes.
We check if there are any components in the active tab and if so,
inform the panelBinding that they've gained focus.
stateChanged in interface javax.swing.event.ChangeListener