docs: public void matchListeners(BaseField field, boolean bCloneListeners, boolean bMatchEnabledState, boolean bSyncReferenceFields, boolean bMatchSelectedState)
      {
          FieldListener listener = this.getListener();
          // Don't add the listeners that already exist in the target record (from the record's addListeners() method).
          FieldListener fieldListener = field.getListener();
          while ((listener != null) && (fieldListener != null))
          {   // Get through the first listeners (The ones added in init in the addListeners() method)
              if (!fieldListener.getClass().getName().equals(listener.getClass().getName()))
                  break;  // Not the same... STOP. and start looking for matching listeners.
              if (bMatchEnabledState)
                  fieldListener.setEnabledListener(listener.isEnabledListener());
              listener = (FieldListener)listener.getNextListener();    // Skip to the next one in the chain.
              fieldListener = (FieldListener)fieldListener.getNextListener();
          }
          while (listener != null)
          {   // Clone all the file behaviors (that want to be cloned)
              int iBehaviorCount = 0;
              FieldListener thisListener = this.getListener(listener.getClass());
              while ((thisListener != null) && (thisListener != listener))
              {   // There are more than one, count which one it is.
                  iBehaviorCount++;
                  thisListener = (FieldListener)thisListener.getListener(listener.getClass());
              }
              FieldListener newBehavior = null;
              newBehavior = field.getListener(listener.getClass());
              while (iBehaviorCount > 0)
              {   // Get the correct one
                  iBehaviorCount--;
                  if (newBehavior != null)
                      newBehavior = (FieldListener)newBehavior.getListener(listener.getClass());
              }
              if ((bCloneListeners) && (newBehavior == null))
              {
                  try   {
                      newBehavior = (FieldListener)listener.clone(field); // Clone the field behavior
                  } catch (CloneNotSupportedException ex)   {
                      newBehavior = null;
                  }
                  if (newBehavior != null)
                      if (newBehavior.getOwner() == null)     // This should have been set, just being careful (ie., next line never called)
                          field.addListener(newBehavior);        // Add them to the new query
              }
              if ((bMatchEnabledState) && (newBehavior != null))
                  newBehavior.setEnabledListener(listener.isEnabledListener());
              listener = (FieldListener)listener.getNextListener();            // Do the next one in the chain
          }
          if ((bSyncReferenceFields) && (field instanceof ReferenceField))
          {
              Record recReference = ((ReferenceField)field).getReferenceRecord(null, false);
              if (recReference != null)
                  ((ReferenceField)field).setReferenceRecord(recReference);
          }
          if (bMatchSelectedState)
              field.setSelected(this.isSelected());
      }