Initialize.
@param itsLocation The location of this component within the parent.
@param parentScreen The parent screen.
@param fieldConverter The field this screen field is linked to.
@param iDisplayFieldDesc Do I display the field desc?
355084
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        if (properties != null)
            m_StaticString = (String)properties.get(ScreenModel.DISPLAY_STRING);
        if (m_StaticString == null)
            m_StaticString = DBConstants.BLANK;
        super.init(itsLocation, parentScreen, null, ScreenConstants.DONT_DISPLAY_DESC, properties);
    }
1235283
public void setupSFields()
    {
        Converter converter = new FieldLengthConverter(this.getRecord(Resource.RESOURCE_FILE).getField(Resource.CODE), 30);
        new SEditText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this,converter, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(ResourceScreenRecord.RESOURCE_SCREEN_RECORD_FILE).getField(ResourceScreenRecord.LANGUAGE).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(ResourceScreenRecord.RESOURCE_SCREEN_RECORD_FILE).getField(ResourceScreenRecord.LOCALE).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
    }
134480
public void setupSFields()
    {
        Record record = this.getMainRecord();
        BaseField field = record.getField(DBConstants.MAIN_FIELD);
        if (field == record.getCounterField())
            field.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, ScreenConstants.DEFAULT_DISPLAY);
        super.setupSFields();
    }
476026
public static void centerOnParent(Window window, Component parent) {
		if (parent == null || !parent.isShowing()) {
			// call our own centerOnScreen so we work around bug in
			// setLocationRelativeTo(null)
			centerOnScreen(window);
		}
		else {
			window.setLocationRelativeTo(parent);
		}
	}
1351624
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int sDisplayFieldDesc)
    {
        m_classInfo = null;
        super.init(itsLocation, parentScreen, fieldConverter, sDisplayFieldDesc, "", "Print Java", MenuConstants.PRINT, null, null);
    }
405998
public int initField(boolean bDisplayOption)                    // Init this field override for other value
    {
        if ((this.getDefault() == null) || (this.getDefault() instanceof String))
            return this.setString((String)this.getDefault(), bDisplayOption, Constants.INIT_MOVE);   // zero out the field
        return this.setData(this.getDefault(), bDisplayOption, Constants.INIT_MOVE);
    }
30669
public void initRecord(boolean bDisplay) throws DBException
    {
        int iFieldCount = this.getFieldCount();      // Number of fields to read in
        for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq < iFieldCount + Constants.MAIN_FIELD; iFieldSeq++)
        {
            FieldInfo field = this.getField(iFieldSeq);
            field.initField(bDisplay);
        }
        this.setEditMode(Constants.EDIT_NONE);
    }
399596
protected void initFields(Element parent, CmsXmlContentDefinition contentDef) throws CmsXmlException {

        for (Element fieldElem : parent.elements(N_SETTING)) {
            initField(fieldElem, contentDef);
        }
    }
282230
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & MessageLog.MESSAGE_SCREEN_MODE) == MessageLog.MESSAGE_SCREEN_MODE)
        {
            if ((this.getEditMode() == DBConstants.EDIT_ADD) || (this.getEditMode() == DBConstants.EDIT_NONE))
            {
                String strObjectID = parentScreen.getProperty(DBConstants.OBJECT_ID);
                if ((strObjectID != null) && (strObjectID.length() > 0))
                {
                    try {
                        this.setHandle(strObjectID, DBConstants.BOOKMARK_HANDLE);
                    } catch (DBException ex)    {
                        ex.printStackTrace();
                    }
                }
            }
            if ((this.getEditMode() == DBConstants.EDIT_CURRENT) || (this.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
            {
                String strScreenClass = this.getProperty(ScreenMessageTransport.SCREEN_SCREEN);
                if (strScreenClass == null)
                    strScreenClass = this.getProperty(DBParams.SCREEN);
                if (strScreenClass != null)
                {
                    parentScreen.setProperty(TrxMessageHeader.LOG_TRX_ID, this.getProperty(TrxMessageHeader.LOG_TRX_ID));
                    screen = Record.makeNewScreen(strScreenClass, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, null, true);
                }
            }
            if (screen == null) // ? I don't NOW what else to do?
                screen = Record.makeNewScreen(MESSAGE_LOG_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        }
        else if ((iDocMode & MessageLog.SOURCE_SCREEN_MODE) == MessageLog.SOURCE_SCREEN_MODE)
        {
            String strReferenceClass = this.getProperty(TrxMessageHeader.REFERENCE_CLASS);
            String strReferenceID = this.getField(MessageLog.REFERENCE_ID).toString();
            if (strReferenceID == null)
                strReferenceID = this.getProperty(TrxMessageHeader.REFERENCE_ID);
            if ((strReferenceClass != null) && (strReferenceID != null))
            {
                Record record = Record.makeRecordFromClassName(strReferenceClass, this.findRecordOwner());
                if (record != null)
                {
                    try {
                        record.addNew();
                        record.getCounterField().setString(strReferenceID);
                        if (record.seek(null))
                        {
                            iDocMode = ScreenConstants.MAINT_MODE;
                            screen = record.makeScreen(itsLocation, parentScreen, iDocMode, properties);
                        }
                    } catch (DBException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
        else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
            screen = Record.makeNewScreen(MESSAGE_LOG_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else
            screen = Record.makeNewScreen(MESSAGE_LOG_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        return screen;
    }
1177670
public ScreenComponent setupPopupView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption)
    {
        ScreenComponent screenField = null;
        Record record = this.makeReferenceRecord();
        //  Set up the listener to read the current record on a valid main record
        screenField = this.setupIconView(itsLocation, targetScreen, converter, iDisplayFieldDesc, bIncludeBlankOption);
        
        if ((!(targetScreen instanceof GridScreenParent)) && (iDisplayFieldDesc != ScreenConstants.DONT_DISPLAY_FIELD_DESC))
        {   // If it is not in a grid screen, add the description
            if (screenField != null)
            {
                itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR);
                iDisplayFieldDesc = ScreenConstants.DONT_DISPLAY_FIELD_DESC;
            }
            screenField = this.setupTablePopup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, -1, -1, bIncludeBlankOption, false);
        }
        
        return screenField;
    }
817514
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & ScreenConstants.DOC_MODE_MASK) == ScreenConstants.DETAIL_MODE)
            screen = Record.makeNewScreen(UserRegistrationModel.USER_REGISTRATION_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
            screen = Record.makeNewScreen(USER_ENTRY_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DISPLAY_MODE) == ScreenConstants.DISPLAY_MODE)
            screen = Record.makeNewScreen(USER_INFO_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & UserInfo.VERBOSE_MAINT_MODE) == UserInfo.VERBOSE_MAINT_MODE)
            screen = Record.makeNewScreen(USER_INFO_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & UserInfo.LOGIN_SCREEN_MODE) == UserInfo.LOGIN_SCREEN_MODE)
            screen = Record.makeNewScreen(USER_LOGIN_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & UserInfo.PREFERENCES_SCREEN_MODE) == UserInfo.PREFERENCES_SCREEN_MODE)
            screen = Record.makeNewScreen(USER_PREFERENCES_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & UserInfo.PASSWORD_CHANGE_SCREEN_MODE) == UserInfo.PASSWORD_CHANGE_SCREEN_MODE)
            screen = Record.makeNewScreen(USER_PASSWORD_CHANGE_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else
            screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        return screen;
    }
1032066
public void setupSFields()
    {
        Converter fieldConverter = this.getScreenRecord().getField(UserScreenRecord.STATUS_LINE);
        new SStaticText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, fieldConverter, ScreenConstants.DONT_DISPLAY_FIELD_DESC);
        this.getRecord(UserScreenRecord.USER_SCREEN_RECORD_FILE).getField(UserScreenRecord.USER).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        Converter converter = new HashSHAConverter(this.getScreenRecord().getField(UserScreenRecord.PASSWORD));
        converter = new FieldLengthConverter(converter, 20);
        converter.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(UserScreenRecord.USER_SCREEN_RECORD_FILE).getField(UserScreenRecord.SAVEUSER).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        SCannedBox loginButton = new SCannedBox(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.LOGIN);
        loginButton.setRequestFocusEnabled(true);
        BaseApplication application = (BaseApplication)this.getTask().getApplication();
        String strDesc = application.getResources(ResourceConstants.MAIN_RESOURCE, true).getString(UserEntryScreen.CREATE_NEW_USER);
        String strCommand = Utility.addURLParam(null, DBParams.SCREEN, UserEntryScreen.class.getName());
        new SCannedBox(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST_BUTTON_WITH_GAP, ScreenConstants.DONT_SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, strDesc, MenuConstants.FORM, strCommand, MenuConstants.FORM + "Tip");
        this.setDefaultButton(loginButton);
    }
226102
public void addConverterToPass(Converter converter)
    {
        if (m_vconvDependent == null)
            m_vconvDependent = new Vector<Converter>();
        m_vconvDependent.add(converter);
        this.setEnableTranslation(false);
        if ((this.getNextConverter() == null)
            || (this.getNextConverter().getField() == null))
        {
        this.setEnableTranslation(true);
            return;
        }
        for (int iSeq = 0; ; iSeq++)
        {
            ScreenComponent sField = (ScreenComponent)this.getNextConverter().getField().getComponent(iSeq);
            if (sField == null)
                break;
            if (!this.isConverterInPath(sField))
                continue;  // This converter does not belong to this screen field
            if (converter != null)
                if (converter.getField() != null)
            {
                boolean bFound = false;
                for (int iSeq2 = 0; ; iSeq2++)
                {
                    if (converter.getField().getComponent(iSeq2) == null)
                        break;
                    if (converter.getField().getComponent(iSeq2) == sField)
                        bFound = true;
                }
                if (!bFound)
                    converter.addComponent(sField);
            }
        }
        this.setEnableTranslation(true);
    }
590836
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties)
    {
        super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
    }
322647
public void init(BaseSession parentSessionObject, Record record, Map<String, Object> objectID)
    {
        m_topScreen = null;
        super.init(parentSessionObject, record, objectID);
    }
199428
public void displayField()                  // init this field override for other value
    {
        if (m_vScreenField == null)
            return;
        for (Enumeration<Object> e = m_vScreenField.elements() ; e.hasMoreElements() ;) { 
            ScreenComponent sField = (ScreenComponent)e.nextElement();
            sField.fieldToControl();    // Display using the new value(s)
        }
    }
1233452
public ScreenComponent setupTableLookup(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Rec record, String iQueryKeySeq, String iDisplayFieldSeq, boolean bIncludeBlankOption, boolean bIncludeFormButton)
    {
        Converter fldDisplayFieldDesc = null;
        if (iDisplayFieldSeq == null)
            iDisplayFieldSeq = ((Record)record).getDefaultDisplayFieldName();
        if (iDisplayFieldSeq != null)
            fldDisplayFieldDesc = ((Record)record).getField(iDisplayFieldSeq);
        return this.setupTableLookup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, iQueryKeySeq, fldDisplayFieldDesc, bIncludeBlankOption, bIncludeFormButton);
    }