AddMasterListeners Method.
488050
public void addMasterListeners()
    {
        super.addMasterListeners();
                
        ((PasswordPropertiesField)this.getField(MessageTransport.PROPERTIES)).addPasswordProperty(org.jbundle.base.message.trx.transport.email.MessageReceivingPopClientProcess.POP3_PASSWORD);
        ((PasswordPropertiesField)this.getField(MessageTransport.PROPERTIES)).addPasswordProperty(org.jbundle.base.message.trx.transport.email.EmailMessageTransport.SMTP_PASSWORD);
    }
102995
public void addListeners()
    {
        super.addListeners();
        
        Record recIssue = this.getMainRecord();
        SortOrderHandler keyBehavior = new SortOrderHandler(this, true);
        this.getScreenRecord().getField(IssueScreenRecord.KEY_ORDER).setValue(1);
        this.getScreenRecord().getField(IssueScreenRecord.KEY_ORDER).addListener(keyBehavior);
        
        recIssue.addListener(new CompareFileFilter(Issue.PROJECT_ID, this.getScreenRecord().getField(IssueScreenRecord.PROJECT_ID), "=", null, true));
        recIssue.addListener(new CompareFileFilter(Issue.PROJECT_VERSION_ID, this.getScreenRecord().getField(IssueScreenRecord.PROJECT_VERSION_ID), "=", null, true));
        recIssue.addListener(new CompareFileFilter(Issue.ISSUE_TYPE_ID, this.getScreenRecord().getField(IssueScreenRecord.ISSUE_TYPE_ID), "=", null, true));
        recIssue.addListener(new CompareFileFilter(Issue.ISSUE_STATUS_ID, this.getScreenRecord().getField(IssueScreenRecord.ISSUE_STATUS_ID), "=", null, true));
        recIssue.addListener(new CompareFileFilter(Issue.ASSIGNED_USER_ID, this.getScreenRecord().getField(IssueScreenRecord.ASSIGNED_USER_ID), "=", null, true));
        recIssue.addListener(new CompareFileFilter(Issue.ISSUE_PRIORITY_ID, this.getScreenRecord().getField(IssueScreenRecord.ISSUE_PRIORITY_ID), "=", null, true));
        
        this.getScreenRecord().getField(IssueScreenRecord.PROJECT_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(IssueScreenRecord.PROJECT_VERSION_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(IssueScreenRecord.ISSUE_TYPE_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(IssueScreenRecord.ISSUE_STATUS_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(IssueScreenRecord.ASSIGNED_USER_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(IssueScreenRecord.ISSUE_PRIORITY_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(IssueScreenRecord.PROJECT_ID).addListener(new FieldReSelectHandler(this));
        
        this.getScreenRecord().getField(IssueScreenRecord.PROJECT_VERSION_ID).addListener(new RegisterValueHandler(null));
        this.getScreenRecord().getField(IssueScreenRecord.ISSUE_TYPE_ID).addListener(new RegisterValueHandler(null));
        this.getScreenRecord().getField(IssueScreenRecord.ISSUE_STATUS_ID).addListener(new RegisterValueHandler(null));
        this.getScreenRecord().getField(IssueScreenRecord.ASSIGNED_USER_ID).addListener(new RegisterValueHandler(null));
        this.getScreenRecord().getField(IssueScreenRecord.ISSUE_PRIORITY_ID).addListener(new RegisterValueHandler(null));
    }
140198
final void setMaster() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "setMaster");

        synchronized (getMessageLockArtefact()) {
            master = compatibilityWrapperOrSelf;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "setMaster");
    }
921572
public void addMasterListeners()
    {
        super.addMasterListeners();
        this.getField(ProgramControl.LAST_PACKAGE_UPDATE).setEnabled(false);
        
        this.addListener(new FileListener()
        {
            public void doNewRecord(boolean bDisplayOption)
            {
                super.doNewRecord(bDisplayOption);
                
                PropertiesStringField field = (PropertiesStringField)this.getOwner().getField(ProgramControl.BASE_DIRECTORY);
                field.enableConversion = false;
                if (!field.isModified())
                    if (field.getDefault().equals(field.getData()))
                {
                    try {
                        String home = System.getProperty("user.home");
                        String current = System.getProperty("user.dir");
                        if (!home.equals(current))
                            if (current.startsWith(home))
                        {   // Set the base directory to the current directories' home
                            current = Utility.addToPath((String)field.getDefault(), current.substring(home.length()));
                            int lastPathSeparator = current.lastIndexOf(File.separator);
                            if (lastPathSeparator == -1)
                                lastPathSeparator = current.lastIndexOf('/');
                            if (lastPathSeparator != -1)
                            {
                                ((InitOnceFieldHandler)field.getListener(InitOnceFieldHandler.class)).setFirstTime(true);
                                field.setString(current.substring(0, lastPathSeparator), DBConstants.DISPLAY, DBConstants.INIT_MOVE);
                            }
                        }
                    } catch (SecurityException e) {
                        // Ignore (default is fine)
                    }
                }
                field.enableConversion = true;
            }
        });
    }
896974
public void addContextMenuComponentListener(
        CmsContextMenu.ContextMenuOpenedListener.ComponentListener contextMenuComponentListener) {

        addListener(
            ContextMenuOpenedOnComponentEvent.class,
            contextMenuComponentListener,
            ContextMenuOpenedListener.ComponentListener.MENU_OPENED_FROM_COMPONENT);
    }
819041
public void addListeners()
    {
        super.addListeners();
        Record record = this.getMainRecord();
        Record recClassInfo = this.getRecord(ClassInfo.CLASS_INFO_FILE);
        if (recClassInfo != null)
        {
            record.setKeyArea(LogicFile.SEQUENCE_KEY);
            SubFileFilter listener = new SubFileFilter(recClassInfo.getField(ClassInfo.CLASS_NAME), LogicFile.METHOD_CLASS_NAME, null, null, null, null, true);
            record.addListener(listener);
            recClassInfo.getField(ClassInfo.CLASS_NAME).addListener(new FieldReSelectHandler(this));
        }
    }
440405
public void addListeners()
    {
        super.addListeners();
        
        this.getMainRecord().addListener(new FileListener(null)
        {
            public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
            {   // Return an error to stop the change
                if (iChangeType == DBConstants.AFTER_ADD_TYPE)
                {
                    strMessage = DBConstants.BLANK;
                    afterAdd();
                    if ((strMessage != null) && (strMessage.toUpperCase().startsWith("ERROR")))
                        return getTask().setLastError(strMessage);
                }
                return super.doRecordChange(field, iChangeType, bDisplayOption);
            }
        });
        
        MessageManager messageManager = ((Application)this.getTask().getApplication()).getMessageManager();
        if (messageManager != null)
        {
            Object source = this;
            BaseMessageFilter filter = new BaseMessageFilter(MessageConstants.TRX_RETURN_QUEUE, MessageConstants.INTERNET_QUEUE, source, null);
            filter.addMessageListener(this);
            messageManager.addMessageFilter(filter);
            m_intRegistryID = filter.getRegistryID();
        }
    }
832980
private void deliverMasterChangedAnnouncement(final DeviceUpdate update) {
        for (final MasterListener listener : getMasterListeners()) {
            try {
                listener.masterChanged(update);
            } catch (Throwable t) {
                logger.warn("Problem delivering master changed announcement to listener", t);
            }
        }
    }
691091
def add_master( *args )
      args.map do |key|
        key = to_key(key)
        @masters << key unless @masters.include? key
        key
      end
    end
1070734
public synchronized void addWeakListener(L listener) {
    Preconditions.checkNotNull(listener);

    _log.info("Adding a weak listener " + listener);
    _autoListeners.put(listener, null);
  }
109220
def add_listener(self, listener, message_type, data=None, one_shot=False):
        """"""
        lst = self._one_shots if one_shot else self._listeners

        if message_type not in lst:
            lst[message_type] = []

        lst[message_type].append(Listener(listener, data))
1141178
public void addListeners()
    {
        super.addListeners();
        
        this.getMainRecord().setKeyArea(MessageLog.TIMEOUT_KEY);
        int iMessageStatus = ((ReferenceField)this.getScreenRecord().getField(MessageTimeoutScreenRecord.MESSAGE_STATUS_ID)).getIDFromCode(MessageStatus.SENT);
        this.getScreenRecord().getField(MessageTimeoutScreenRecord.MESSAGE_STATUS_ID).setValue(iMessageStatus);
        
        this.getMainRecord().addListener(new SubFileFilter(this.getScreenRecord().getField(MessageTimeoutScreenRecord.MESSAGE_STATUS_ID), MessageLog.MESSAGE_STATUS_ID, null, null, null, null));
        this.getScreenRecord().getField(MessageTimeoutScreenRecord.START_TIMEOUT).setToLimit(DBConstants.START_SELECT_KEY);
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.TIMEOUT_TIME), this.getScreenRecord().getField(MessageTimeoutScreenRecord.START_TIMEOUT), ">="));
    }
1067774
public void addListeners()
    {
        if (ScreenConstants.HTML_SCREEN_TYPE.equalsIgnoreCase(this.getViewFactory().getViewSubpackage()))
            if (this.getProperty(EDIT_PARAM) == null)
                this.setEditing(false);     // For HTML default is no editing (specify explicitly by edit=true)
        super.addListeners();
    }
1005611
public void addListeners()
    {
        this.getRecord(UserInfo.USER_INFO_FILE).getField(UserInfo.USER_NAME).setEnabled(false);
        this.readCurrentUser();
        
        super.addListeners();
        
        this.getMainRecord().addListener(new UserPasswordHandler(true));
    }
1225786
private void setTempoMaster(DeviceUpdate newMaster) {
        DeviceUpdate oldMaster = tempoMaster.getAndSet(newMaster);
        if ((newMaster == null && oldMaster != null) ||
                (newMaster != null && ((oldMaster == null) || !newMaster.getAddress().equals(oldMaster.getAddress())))) {
            // This is a change in master, so report it to any registered listeners
            deliverMasterChangedAnnouncement(newMaster);
        }
    }
927766
@Override
    public void addListeners(TrainingListener... listeners) {
        if (this.trainingListeners == null) {
            setListeners(listeners);
            return;
        }

        for (TrainingListener listener : listeners)
            trainingListeners.add(listener);
    }
195300
public void addListeners()
    {
        super.addListeners();
        this.addMainKeyBehavior();
        this.getMainRecord().getField(UserInfo.USER_GROUP_ID).addListener(new InitFieldHandler(this.getRecord(UserControl.USER_CONTROL_FILE).getField(UserControl.ANON_USER_GROUP_ID)));
        ((UserInfo)this.getMainRecord()).addPropertyListeners();
    }