Applies default values to all properties that have not been set.

@since 1.8.0
507659
public void applyDefaults() {
		if (size == -1) {
			size = 8;
		}
		if (family == null) {
			family = "Verdana";
		}
		if (weight == null) {
			weight = "normal";
		}
		if (style == null) {
			style = "normal";
		}
		if (color == null) {
			color = "#000000"; // black
		}
		if (opacity == -1) {
			opacity = 1;
		}
	}
1115624
public function initDefaultProperties()
    {
        if (isset($this->schema) && $this->setPropertyDefaultValue($this->schema)) {
            $this->property_value = $this->schema->default;
        }
    }
1176176
public function setDefault()
    {
        if($this->settings->getValue(InputSettings::DEFAULTS_PARAM)) {
            $this->element->setDefault($this->settings->getValue(InputSettings::DEFAULTS_PARAM));
        }
    }
1263630
public void applyDefaults() {
		if (getName() == null) {
			setName(DEFAULT_NAME);
		}
		if (getFeatureStyles().size() == 0) {
			getFeatureStyles().add(new FeatureStyleInfo());
		}
		for (FeatureStyleInfo featureStyle : getFeatureStyles()) {
			featureStyle.applyDefaults();
		}
		if (getLabelStyle().getLabelAttributeName() == null) {
			getLabelStyle().setLabelAttributeName(LabelStyleInfo.ATTRIBUTE_NAME_ID);
		}
		getLabelStyle().getBackgroundStyle().applyDefaults();
		getLabelStyle().getFontStyle().applyDefaults();
	}
95685
def _setDefaults(self):
        

        for configName, configDict in self.configs.items():
            self._setConfig(configName, configDict['default'])
885915
public function apply_default_settings() {
        global $CFG;

        foreach ($this->forceable as $property) {

            if (isset($CFG->{"grade_$property"})) {

                if ($CFG->{"grade_$property"} == -1) {
                    continue; //temporary bc before version bump
                }
                $this->$property = $CFG->{"grade_$property"};
            }
        }
    }
192218
private function applyDefaults(): void
    {
        $timezone = $this->config->get('timezone');
        if ($timezone != null) {
            date_default_timezone_set($timezone);
        }

        $encoding = $this->config->get('encoding');
        if ($encoding != null) {
            mb_internal_encoding($encoding);
            ini_set('default_charset', $encoding);
        }

        $locales = $this->config->get('locales');
        if ($locales != null) {
            foreach ((array) $locales as $category => $locale) {
                setlocale($category, $locale);
            }
        }
    }
1145429
protected function setDefaults()
    {
        $this->attributes['name']      = $this->name;
        $this->attributes['classname'] = get_called_class();
        $attributesAdapter             = new AttributesAdapter($this->name);
        $defaults                      = $attributesAdapter->defaults();
        if (!isset($this->attributes['width']) && isset($this->attributes['default_width'])) {
            $this->attributes['width'] = $this->attributes['default_width'];
        }
        if (!isset($this->attributes['height']) && isset($this->attributes['default_height'])) {
            $this->attributes['height'] = $this->attributes['default_height'];
        }
        $this->attributes = array_merge($defaults, $this->attributes);

        $attributes = app(Service::class)->findOne(array_merge($defaults, $this->attributes), uri());

        $this->attributes            = array_merge($this->attributes, $attributes);
        $this->attributes['desktop'] = array_only($this->attributes, ['x', 'y', 'width', 'height']);

        return $this->attributes;
    }
24768
private function setToDefault():void
    {
        $this->session = null;
        $this->id = null;
        $this->name = null;
    }
760737
protected function apply_defaults() {
        parent::apply_defaults();

        // We want to set the solr_filegroupingid to id if it isn't set.
        if (!isset($this->data['solr_filegroupingid'])) {
            $this->data['solr_filegroupingid'] = $this->data['id'];
        }
    }
906297
protected function setDefaultAttributes()
    {
        if (!empty($this->attributes)) {
            foreach ($this->attributes as $attr => $val) {
                $this->realSetAttribute($attr, $val);
            }
        }
    }
1180943
public void setToDefaults() {
		this.themeFont = "";
		this.fontNr = "";
		this.fontName = "";
		this.fontFamily = "";
		
		this.charset = "";
		this.fprq = 0;
		this.panose = "";
		this.nontaggedname = "";
		this.falt = "";
		this.fontemb = "";
		this.fontType = "";
		this.fontFile = "";
		this.fontFileCpg = "";
		this.fbias = 0;
		this.cpg = "";
		this.trueType = "";
		this.state = SETTING_NORMAL;
	}
204716
protected function setDefaults()
  {
    $this->importPaths = array();
    $this->pluginPaths = array();
    $this->sourceMap = self::DEFAULT_SOURCEMAP;
    $this->mapComment = self::DEFAULT_MAPCOMMENT;
    $this->lineNumbers = self::DEFAULT_LINENUMBERS;
    $this->precision = self::DEFAULT_PRECISION;
    $this->style = self::DEFAULT_STYLE;
  }
555191
function applyPresets(model, defaults, presets) {
    if (!model || !presets) { return; }

    var opts = model.presets || presets[model.preset] ||
        (model.preset && presets[model.type + '.' + model.preset]) || presets[model.type];
    if (!opts) { return; }

    for (var name in opts) {
        if (opts.hasOwnProperty(name)) {
            if (!defaults || defaults[name] === undefined) {
                throw new Error('No defaults value for ' + name + ' but in presets.' + model.preset);
            }
            else {
                model[name] = opts[name];
            }
        }
    }
}
210357
protected function setForgottenDefaults()
    {
        // ==== unchecked values ====
        $this->repairConfigValue('bcrypt_cost', 10);

        // cookies* values
        $this->repairConfigValue('cookie_name', 'phpauth_session_cookie');

        // verify* values
        $this->repairConfigValue('verify_password_min_length', 3);

        $this->repairConfigValue('verify_email_min_length', 5);

        $this->repairConfigValue('verify_email_max_length', 100);

        $this->repairConfigValue('verify_email_use_banlist', 1);

        // emailmessage* values

        $this->repairConfigValue('emailmessage_suppress_activation', 0);

        $this->repairConfigValue('emailmessage_suppress_reset', 0);

        $this->repairConfigValue('mail_charset', "UTF-8");

        // others
        $this->repairConfigValue('allow_concurrent_sessions', false);
	}
811399
function setDefaults(scope, defaults) {
        if (!defaults) { return; }

        // store defaults for use in generateRemodel
        scope.defaults = defaults;

        for (var name in defaults) {
            if (defaults.hasOwnProperty(name) && scope[name] === undefined) {
                scope[name] = defaults[name];
            }
        }
    }
989391
void defaults () {
		minWidth = new MinWidthValue<C, T>(layout.toolkit);
		minHeight =new MinHeightValue<C, T>(layout.toolkit);
		prefWidth = new PrefWidthValue<C, T>(layout.toolkit);
		prefHeight = new PrefHeightValue<C, T>(layout.toolkit);
		maxWidth = new MaxWidthValue<C, T>(layout.toolkit);
		maxHeight = new MaxHeightValue<C, T>(layout.toolkit);
		spaceTop = new FixedValue<C, T>(layout.toolkit,0);
		spaceLeft = new FixedValue<C, T>(layout.toolkit,0);
		spaceBottom = new FixedValue<C, T>(layout.toolkit,0);
		spaceRight = new FixedValue<C, T>(layout.toolkit,0);
		padTop = new FixedValue<C, T>(layout.toolkit,0);
		padLeft = new FixedValue<C, T>(layout.toolkit,0);
		padBottom = new FixedValue<C, T>(layout.toolkit,0);
		padRight = new FixedValue<C, T>(layout.toolkit,0);
		fillX = 0f;
		fillY = 0f;
		align = CENTER;
		expandX = 0;
		expandY = 0;
		ignore = false;
		colspan = 1;
		uniformX = null;
		uniformY = null;
	}