Set the field that owns this listener.
@owner The field that this listener is being added to (if null, this listener is being removed).
970390
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
        {
            InitFieldHandler behavior = (InitFieldHandler)this.getOwner().getListener(InitFieldHandler.class.getName());
            if (this.getOwner().getRecord().getEditMode() == DBConstants.EDIT_CURRENT)
                behavior = null;    // Special case - if there is a current record, make sure initonce works.
            if (behavior != null)
                this.setFirstTime(false);  // If InitFieldHandler already set the initial value, don't set the first time.
        }
    }
231367
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null) if (!this.getOwner().isNull())
            // Display the screen that is supposed to be up now
            this.fieldChanged(DBConstants.DISPLAY, DBConstants.INIT_MOVE);
    }
745145
public void removePortOwnershipListener(CommPortOwnershipListener c) {
        LOGGER.fine("CommPortIdentifier:removePortOwnershipListener()");
        /* why is this called twice? */
        if (ownershipListener != null) {
            ownershipListener.removeElement(c);
        }
    }
1101045
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null) if (m_fldToDisable != null)
            if (this.getOwner().getRecord() != m_fldToDisable.getRecord())
                m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Make sure you remove this listener if m_fldToDisable is gone.
        if (owner != null)
            if (m_fldToDisable == null)
                m_fldToDisable = this.getOwner();
        if (owner != null)
            this.fieldChanged(DBConstants.DONT_DISPLAY, DBConstants.INIT_MOVE);
        if (owner == null)
            m_fldToDisable.setEnabled(true);    // Remove the behavior = reenable the field
    }
339558
public AccessControlTranslation withOwner(OwnerOverride owner) {
        setOwner(owner == null ? null : owner.toString());
        return this;
    }
337724
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            Record recUserInfo = this.getOwner();
            RecordOwner recordOwner = recUserInfo.getRecordOwner();
            Record recUserScreenRecord = (Record)recordOwner.getScreenRecord();
            // This will flag the password as changed:
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
        }
    }
1329761
public void setOwner(Graph<DataT, NodeT> ownerGraph) {
        if (this.ownerGraph != null) {
            throw new RuntimeException("Changing owner graph is not allowed");
        }
        this.ownerGraph = ownerGraph;
    }
1031526
public void setEnableFieldListeners(Object[] rgobjEnabledFields)
    {
        for (int i = 0; i < this.getFieldCount(); i++)
        {
            this.getField(i).setEnableListeners((boolean[])rgobjEnabledFields[i]);
        }
    }
895144
function() {

		// avoid setting nulls to non-nullable fields.
		if (this._scope.isConnected()) {

			// turning off both of them to avoid infinite loop. From architect's point of view, better solution would be
			// to hang up developer's browser, but if it happens in production - it may have disastrous consequences.
			Lava.suspendListener(this._widget_property_changed_listener);
			this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener);
			this._widget.set(this._property_name, this._scope.getValue());
			Lava.resumeListener(this._widget_property_changed_listener);
			this._scope_changed_listener && Lava.resumeListener(this._scope_changed_listener);

		}

	}
155751
function (name, handler, options) {
            if (handler) {
                var _handlers = this.__handlers__;
                var _listeners = _handlers[name] = _handlers[name] || [
                    {
                        owner: null,
                        handler: null,
                        context: null
                    }
                ];

                _listeners.push(zn.extend({
                    owner: this,
                    handler: handler
                }, options));
            }

            return this;
        }
1045331
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null) if (m_fldMain != null) if (m_fldMain.getRecord() != owner)
            m_fldMain.addListener(new FieldRemoveBOnCloseHandler(this));
    }
1019158
public void setOwnerObject(GVRSceneObject owner) {
        if (owner != null)
        {
            if (getNative() != 0)
            {
                NativeComponent.setOwnerObject(getNative(), owner.getNative());
            }
            this.owner = owner;
            onAttach(owner);
        }
        else
        {
            if (null != this.owner) {
                onDetach(this.owner);
                if (getNative() != 0) {
                    NativeComponent.setOwnerObject(getNative(), 0L);
                }
                this.owner = null;
            }
        }
    }
96462
public void addListener(ISUPListener listener) {
        if (listener == null) {
            throw new NullPointerException("Listener must not be null!");
        }
        if (this.listeners.contains(listener)) {
            throw new IllegalArgumentException("Listener already present: " + listener + " !");
        } else {
            this.listeners.add(listener);
        }

    }
306442
public void setOwner(ListenerOwner owner)
    {
        if (owner == null)
        {
            this.saveValue(m_recordOwnerCache);
            m_recordOwnerCache = null;
        }
        super.setOwner(owner);
        if (owner != null)
            this.retrieveValue();
    }
169604
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            BaseField field = m_field;
            if (field != null)
                if (field.getRecord() != owner)
            {   // Points to different file... make sure this is removed if the other file is closed
                field.addListener(new FieldRemoveBOnCloseHandler(this));
            }
        }
    }
886297
public void addListener(FieldListener listener, BaseField field)
    {
        super.addListener(listener, field);
        if (listener.getOwner().getRecord() == this.getRecord())   // Only replicate listeners added to base.
        {
            Iterator<BaseTable> iterator = this.getTables();
            while (iterator.hasNext())
            {
                BaseTable table = iterator.next();
                if ((table != null) && (table != this.getNextTable()))
                {
                    BaseField fldInTable = table.getRecord().getField(field.getFieldName());
                    if (fldInTable != null)
                    {
                        FieldListener newBehavior = null; // Clone the file behaviors
                        try   {
                            newBehavior = (FieldListener)listener.clone(fldInTable);  // Clone the file behaviors
                        } 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)
                                fldInTable.addListener(newBehavior);        // Add them to the new query
                    }
                }
            }
        }
    }
1046314
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
            this.getOwner().setOpenMode(this.getOwner().getOpenMode() | DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY);    // Make sure keys are updated before sync
    }