public void loadFieldProperties(Field fldProperties)
    {
        if (fldProperties == null)
            return;
        boolean[] rgbEnabled = this.setEnableListeners(false);;
        try {
            this.setKeyArea(PropertiesInput.KEY_KEY);
            // First, delete the old records
            this.close();
            while (this.hasNext())
            {
                this.next();
                this.edit();
                this.remove();
            }
            // Now, add the properties to the record
            Map<String,Object> properties = ((PropertiesField)fldProperties).getProperties();
            Iterator<String> iterator = properties.keySet().iterator();
            while (iterator.hasNext())
            {
                String strKey = iterator.next();
                String strValue = (String)properties.get(strKey);
                this.addNew();
                this.getField(PropertiesInput.KEY).setString(strKey);
                if (this.seek(null))
                {
                    this.edit();
                    this.remove();
                }
                this.addNew();
                this.getField(PropertiesInput.KEY).setString(strKey);
                this.getField(PropertiesInput.VALUE).setString(strValue);
                this.add();
            }
            if (this.getRecordOwner() instanceof GridScreen)
                ((GridScreen)this.getRecordOwner()).reSelectRecords();
        } catch (DBException ex) {
            ex.printStackTrace();
        } finally {
            this.setEnableListeners(rgbEnabled);
        }
    }
public void loadFieldProperties ( Field fldProperties ) { if ( fldProperties == null ) return ; boolean [ ] rgbEnabled = this . setEnableListeners ( false ) ; ; try { this . setKeyArea ( PropertiesInput . KEY_KEY ) ; this . close ( ) ; while ( this . hasNext ( ) ) { this . next ( ) ; this . edit ( ) ; this . remove ( ) ; } Map < String , Object > properties = ( ( PropertiesField ) fldProperties ) . getProperties ( ) ; Iterator < String > iterator = properties . keySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { String strKey = iterator . next ( ) ; String strValue = ( String ) properties . get ( strKey ) ; this . addNew ( ) ; this . getField ( PropertiesInput . KEY ) . setString ( strKey ) ; if ( this . seek ( null ) ) { this . edit ( ) ; this . remove ( ) ; } this . addNew ( ) ; this . getField ( PropertiesInput . KEY ) . setString ( strKey ) ; this . getField ( PropertiesInput . VALUE ) . setString ( strValue ) ; this . add ( ) ; } if ( this . getRecordOwner ( ) instanceof GridScreen ) ( ( GridScreen ) this . getRecordOwner ( ) ) . reSelectRecords ( ) ; } catch ( DBException ex ) { ex . printStackTrace ( ) ; } finally { this . setEnableListeners ( rgbEnabled ) ; } }
LoadFieldProperties Method.