Class GUIRunner.TabChangeListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.ChangeListener
    Enclosing class:
    GUIRunner

    static class GUIRunner.TabChangeListener
    extends java.lang.Object
    implements javax.swing.event.ChangeListener
    A listener to the switching of a tab in the foreground; the other in the background.
    • Field Detail

      • SEL_IND1

        private static final int SEL_IND1
        The index of the tab selected initially. This may be 0 or 1. Note that the failure list is the 0th tab for some reason as seen from GUIRunner.setCenter(Actions). It must be the one initially in the foreground.
        See Also:
        Constant Field Values
      • EMPTY_SELECTOR

        private static final GUIRunner.Selector EMPTY_SELECTOR
        Registered with the unselected Selector.
      • tabbedPane

        private final javax.swing.JTabbedPane tabbedPane
    • Method Detail

      • setSelUnSel

        private void setSelUnSel​(int index)
        Makes the tab with the given index in the foreground and the other one in the background. This must be invoked with the index of the tab initially in the foreground and if the tab is changed, this methd must be invoked accordingly.

        As described for GUIRunner.Selector.registerSelector(GUIRunner.Selector), the tab in the foreground receives its selection events directly, whereas the one in the background must be registered at the one in the foreground to receive the according selections. For sake of unification, the one in the background also sends selection events to the one which is registered, but this is just EMPTY_SELECTOR.

        Parameters:
        index - the index of the tab/Selector in the foreground. This may be either 0 or 1.
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent che)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener