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

@since 1.8.0
168743
public void applyDefaults() {
		if (fillColor == null) {
			fillColor = "#ffffff"; // white
		}
		if (strokeColor == null) {
			strokeColor = "#000000"; // black
		}
		if (strokeOpacity == -1) {
			strokeOpacity = 1; // fully opaque by default
		}
		if (fillOpacity == -1) {
			fillOpacity = .5f; // 50% transparent by default
		}
		if (strokeWidth == -1) {
			strokeWidth = 1; // white
		}
		if (symbol == null) { // circle with radius 10 by default
			symbol = new SymbolInfo();
		}
		if (symbol.getCircle() == null && symbol.getRect() == null && symbol.getImage() == null) {
			symbol.setCircle(new CircleInfo());
			symbol.getCircle().setR(10);
		}
	}
293317
public function reset()
	{
		// Get the default values for the class from the table.
		foreach ($this->getFields() as $k => $v)
		{
			// If the property is not the primary key or private, reset it.
			if ($k != $this->_tbl_key && (strpos($k, '_') !== 0))
			{
				$this->$k = $v->Default;
			}
		}
	}
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;
	}
182666
public function LoadDefaults()
	{
		$fms = $this->_phreezer->GetFieldMaps(get_class($this));

		foreach ($fms as $fm)
		{
			$prop = $fm->PropertyName;
			$this->$prop = $fm->DefaultValue;
		}
	}
377731
public function applyDefaults(array $defaults)
    {
        foreach($defaults as $dkey => $dvalue)
        {
            if(!$this->exists($dkey))
            {
                $this[$dkey] = $dvalue;
            }
        }
    }
867224
private function setMissingDefaults()
    {
        if (!isset($this->data['contenttype_groups'])) {
            $this->data['contenttype_groups'] = array('Content');
        }

        if ($this->notSetOrEmpty($this->data, 'names')) {
            $this->data['names'] = array(
                $this->data['main_language_code'] => $this->identifierToReadable($this->data['identifier']),
            );
        }

        foreach (array('name_schema', 'url_alias_schema') as $schema) {
            if ($this->notSetOrEmpty($this->data, $schema)) {
                $this->data[$schema] = sprintf('<%s>', $this->data['fields'][key($this->data['fields'])]->data['identifier']);
            }
        }
    }
531486
protected function apply_defaults() {
        $this->log('applying restore defaults', backup::LOG_DEBUG);
        restore_controller_dbops::apply_config_defaults($this);
        $this->set_status(backup::STATUS_CONFIGURED);
    }
1115624
public function initDefaultProperties()
    {
        if (isset($this->schema) && $this->setPropertyDefaultValue($this->schema)) {
            $this->property_value = $this->schema->default;
        }
    }
259129
void resetDefaultsFlag() {

        hasDefaultValues = false;

        for (int i = 0; i < colDefaults.length; i++) {
            hasDefaultValues = hasDefaultValues || colDefaults[i] != null;
        }
    }
906297
protected function setDefaultAttributes()
    {
        if (!empty($this->attributes)) {
            foreach ($this->attributes as $attr => $val) {
                $this->realSetAttribute($attr, $val);
            }
        }
    }
402511
public function initDefaults() {
        /**
         * @var Tree $this
         */
        $module = Yii::$app->controller->module;
        $iconTypeAttribute = null;
        extract($module->dataStructure);
        $this->setDefault($iconTypeAttribute, TreeView::ICON_CSS);
        foreach (static::$boolAttribs as $attr) {
            $val = in_array($attr, static::$falseAttribs) ? false : true;
            $this->setDefault($attr, $val);
        }
    }
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
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;
  }
438217
def setDefault(self, key, value):
        
        if value is None:
            self._defaults.pop(key, None)
        else:
            self._defaults[key] = value
115910
public function setDefaultValues(array $defaultValues)
    {
        foreach ($defaultValues as $name => $value) {
            if (isset($this->fields[$name])) {
                $this->data[$name] = $value;
            }
        }
    }
1146491
public void resetToDefaults()
    {
        gatekeeper.signIn();
        try
        {
            for (Iterator<Entry<String, ChangeStack<String>>> iter = properties.entrySet()
                                                                               .iterator(); iter.hasNext();)
            {
                Entry<String, ChangeStack<String>> entry = iter.next();

                String defaultValue = getDefaultValue(entry.getKey());
                if (defaultValue == null)
                {
                    iter.remove();
                    continue;
                }

                entry.getValue().push(defaultValue);
            }
        }
        finally
        {
            gatekeeper.signOut();
        }
    }
853888
protected function setDefaultDataTypes()
    {
        foreach ($this->_params as $key => $value) {
            switch (gettype($value)) {
                case "boolean":
                    $this->_types[$key] = 'boolean';
                    break;
                case "integer":
                    $this->_types[$key] = 'integer';
                    break;
                case "double":
                    $this->_types[$key] = 'float';
                    break;
                case "string":
                    $this->_types[$key] = 'string';
                    break;
                case "array":
                    $this->_types[$key] = 'array';
                    break;
                default:
                    $this->_types[$key] = null;
                    break;
            }
        }
    }