Constructs a instance with the specified settings.

@constructor
@param {Object} settings Name/value object with settings.
@setting {Boolean} multiline Multiline label.
437987
function (settings) {
        var self = this;

        self._super(settings);
        self.classes.add('widget').add('infobox');
        self.canFocus = false;
      }
614897
public void setSettings(LinkedHashMap<String, Object> settings) {
        Settings.Builder builder = Settings.settingsBuilder();
        for (Map.Entry<String, Object> entry : settings.entrySet()) {
            builder.put(entry.getKey(), entry.getValue());
        }
        this.settings = builder.build();
    }
779959
function (value) {
            this.trueValue = this.formater ? this.formater.format(value) : value;
            this.showValue = this.masker ? this.masker.format(this.trueValue).value : this.trueValue;
            this.setShowValue(this.showValue);
            this.slice = true;
            this.dataModel.setValue(this.field, this.trueValue);
            this.slice = false;
        }
1088918
function(node, text, settings) {
      var prefix = settings('prefix') || '',
          size = node[prefix + 'size'];

      var fontSize = (settings('labelSize') === 'fixed') ?
        settings('defaultLabelSize') :
        settings('labelSizeRatio') * size;

      // Case when we don't want to display the label
      if (!settings('forceLabels') && size < settings('labelThreshold'))
        return;

      if (typeof node.label !== 'string')
        return;

      // Updating
      text.setAttributeNS(null, 'x',
        Math.round(node[prefix + 'x'] + size + 3));
      text.setAttributeNS(null, 'y',
        Math.round(node[prefix + 'y'] + fontSize / 3));

      // Showing
      text.style.display = '';

      return this;
    }
675568
function(settings, styles) {
  if (_.isArray(styles) && styles.length > 0) {
    _.each(styles, function(obj) {
      if (!_.has(obj, 'name')) {
        return;
      }
      var style = _.findWhere(settings.styles, { name: obj.name });
      if (!_.isUndefined(style)) {
        style.configure(obj);
      } else {
        settings.styles.push( toGrawlixStyle(obj) );
      }
    });
  }
  return settings;
}
431087
function (settings) {
            var xy = this.bezier.coordinates,
                ctx = this.canvas.getContext("2d"),
                setting;

            var defaultSettings = {
                handleTimingFunction: "#2893ef",
                handleThickness: 0.008,
                vBorderThickness: 0.02,
                hBorderThickness: 0.01,
                bezierTimingFunction: "#2893ef",
                bezierThickness: 0.03
            };

            settings = settings || {};

            for (setting in defaultSettings) {
                if (defaultSettings.hasOwnProperty(setting)) {
                    if (!settings.hasOwnProperty(setting)) {
                        settings[setting] = defaultSettings[setting];
                    }
                }
            }

            ctx.clearRect(-0.5, -0.5, 2, 2);

            // Draw control handles
            ctx.beginPath();
            ctx.fillStyle = settings.handleTimingFunction;
            ctx.lineWidth = settings.handleThickness;
            ctx.strokeStyle = settings.handleTimingFunction;

            ctx.moveTo(0, 0);
            ctx.lineTo(xy[0], xy[1]);
            ctx.moveTo(1, 1);
            ctx.lineTo(xy[2], xy[3]);

            ctx.stroke();
            ctx.closePath();

            ctx.beginPath();
            ctx.arc(xy[0], xy[1], 1.5 * settings.handleThickness, 0, 2 * Math.PI, false);
            ctx.closePath();

            ctx.fill();

            ctx.beginPath();
            ctx.arc(xy[2], xy[3], 1.5 * settings.handleThickness, 0, 2 * Math.PI, false);
            ctx.closePath();

            ctx.fill();

            // Draw bezier curve
            ctx.beginPath();
            ctx.lineWidth = settings.bezierThickness;
            ctx.strokeStyle = settings.bezierColor;
            ctx.moveTo(0, 0);
            ctx.bezierCurveTo(xy[0], xy[1], xy[2], xy[3], 1, 1);
            ctx.stroke();
            ctx.closePath();
        }
865060
function MySQL(client, conSettings) {
    'use strict';
    this.name = 'mysql';
    this._models = {};
    this.log = console.log;
    this.client = client;
    this.settings = conSettings;
}
1373408
def set_settings(self, settings):
        
        for k, v in settings.items():
            setattr(self, k, v)
154679
public App addSetting(String name, Object value) {
		if (!StringUtils.isBlank(name) && value != null) {
			getSettings().put(name, value);
			for (AppSettingAddedListener listener : ADD_SETTING_LISTENERS) {
				listener.onSettingAdded(this, name, value);
				logger.debug("Executed {}.onSettingAdded().", listener.getClass().getName());
			}
		}
		return this;
	}
688061
function Options(options) {
  if (!(this instanceof Options)) {
    return new Options(options);
  }
  this.defaults = this.defaults || {};
  this.options = this.options || {};
  if (options) {
    this.option(options);
  }
}
208039
function(items, settings) {
            // Param mapping
            if (typeof settings === 'undefined' && $.isPlainObject(items)) {
                // (settings)
                settings = items;
                items = null;
            }

            this.settings = $.extend({}, Garnish.BaseDrag.defaults, settings);

            this.$items = $();
            this._ = {};

            if (items) {
                this.addItems(items);
            }
        }
1357317
function(settings) {
        for (var k in settings) {
            if (settings.hasOwnProperty(k)) {
                this.param(k, settings[k]);
            }
        }
        return this;
    }
723211
function create(context) {
    const settings = Object.assign({}, defaults, context.options[0]);

    function check(setting, node, list, format) {
        const val = settings[setting];
        const lines = list.map(line);

        if ((isLongerThan(val, lines) || isAlways(val)) && hasDuplicates(lines)) {
            const message = messages.always[setting];
            const fix = (f) => f.replaceTextRange(node.range, format(node));
            context.report({ node, message, fix });
        }

        if (isNever(val) && hasMultiple(lines)) {
            const message = messages.never[setting];
            context.report({ node, message });
        }
    }

    return {
        CallExpression(node) {
            if (!isAmdCall(node) || node.arguments.length < 2) return;

            const args = withoutModuleId(node.arguments);
            const deps = args[0];
            const func = args[1];

            if (!isArrayExpr(deps) || !isFunctionExpr(func)) return;

            const indent = indentation(func);

            check("paths", deps, deps.elements, formatPaths(indent));
            check("names", func, func.params, formatNames(indent, context));
        }
    };
}
717302
function (customSettings) {
      if(Utils.isObject(customSettings)){
        this.settings = Utils.extend(this.settings, customSettings);
      }else{
        throw new TypeError('Setup should be called with an options object.');
      }
      return this.settings;
    }
311920
function(options) {

   	/**
   	 * Configuration object to set the options for this class and the parent classes. See constructor details for options added by this class.
   	 */
   	this.options = {};
   	
   	// Basic options
   	this.options.name = options.name;
   	this.options.value = options.value;
   	this.options.id = options.id || Dom.generateId();
   	this.options.label = options.label;
   	this.options.description = options.description;
   
      // Define default messages
	   this.options.messages = {};
	   this.options.messages.required = (options.messages && options.messages.required) ? options.messages.required : inputEx.messages.required;
	   this.options.messages.invalid = (options.messages && options.messages.invalid) ? options.messages.invalid : inputEx.messages.invalid;
	   //this.options.messages.valid = (options.messages && options.messages.valid) ? options.messages.valid : inputEx.messages.valid;
	
	   // Other options
	   this.options.className = options.className ? options.className : 'inputEx-Field';
	   this.options.required = lang.isUndefined(options.required) ? false : options.required;
	   this.options.showMsg = lang.isUndefined(options.showMsg) ? false : options.showMsg;
	}
214172
function(items, settings) {
            // Param mapping
            if (typeof settings === 'undefined' && $.isPlainObject(items)) {
                // (settings)
                settings = items;
                items = null;
            }

            settings = $.extend({}, Garnish.Drag.defaults, settings);
            this.base(items, settings);
        }
1042670
function(settings) {
    this.events = [];
    this.setSettings(settings);
    this.bytesLoaded = 0;
    this.bytesTotal = 0;
    this.paused = !this.settings.autoStart;

    var _self = this;
    var _fileList = [];
    var _completed = new List('item.uuid');
    var _errors = new List('item.uuid');
    var _queue = new List('item.uuid');

    var onStart = function(event) {
        var e = new FileManagerEvent('file_start', {
            bytesLoaded: event.bytesLoaded,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray()
        });

        _self.dispatchEvent(e);
    };

    var onPause = function(event) {
        var e = new FileManagerEvent('file_pause', {
            bytesLoaded: event.bytesLoaded,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray()
        });

        _self.dispatchEvent(e);
    };

    var onProgress = function(event) {
        _self.bytesLoaded += event.bytesLoaded;

        // @deprecated
        var e = new FileManagerEvent('file_progress', {
            bytesLoaded: event.bytesLoaded,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray()
        });

        _self.dispatchEvent(e);

        e = new FileManagerEvent('progress', {
            bytesLoaded: event.bytesLoaded,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray()
        });

        _self.dispatchEvent(e);
    };

    var onError = function(event) {
        _queue.remove(event.target);
        _errors.add(event.target);

        // @deprecated
        var e = new FileManagerEvent('file_error', {
            bytesLoaded: 0,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray(),
            fileError: event
        });

        _self.dispatchEvent(e);

        e = new FileManagerEvent('error', {
            bytesLoaded: 0,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray(),
            fileError: event
        });

        _self.dispatchEvent(e);
        
        queue.apply(_self);
    };

    var onComplete = function(event) {
        _completed.add(event.target);
        _queue.remove(event.target);

        // @deprecated
        var e = new FileManagerEvent('file_complete', {
            bytesLoaded: event.bytesLoaded,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray(),
            data: event.data
        });

        _self.dispatchEvent(e);

        e = new FileManagerEvent('complete', {
            bytesLoaded: event.bytesLoaded,
            bytesTotal: event.bytesTotal,
            totalBytesLoaded: _self.bytesLoaded,
            totalBytesTotal: _self.bytesTotal,
            currentTarget: event.target,
            file: event.file,
            queue: _queue.toArray(),
            errors: _errors.toArray(),
            fileList: _fileList,
            completed: _completed.toArray(),
            data: event.data
        });

        _self.dispatchEvent(e);
        
        queue.apply(_self);
    };

    _queue.add = function(item) {
        if (!!item.uuid) {
            item.on('start', onStart);
            item.on('pause', onPause);
            item.on('progress', onProgress);
            item.on('error', onError);
            item.on('complete', onComplete);

            this.list[item.uuid] = item;
            ++this.length;
        }
    };
    _queue.remove = function(item) {
        if (!!item.uuid) {
            item.off('start', onStart);
            item.off('pause', onPause);
            item.off('progress', onProgress);
            item.off('error', onError);
            item.off('complete', onComplete);

            delete this.list[item.uuid];
            --this.length;
        }
    };

    this.addFile = function(file) {
        if (!file instanceof File || !this.validate(file)) {
            // If it's an actual file, just throw it in the error queue
            if (file instanceof File) {
                _errors.add(file);
                var e = new FileManagerEvent('invalid', {
                    bytesLoaded: 0,
                    bytesTotal: file.size,
                    totalBytesLoaded: _self.bytesLoaded,
                    totalBytesTotal: _self.bytesTotal,
                    currentTarget: this,
                    queue: _queue.toArray(),
                    file: file,
                    fileList: _fileList,
                    completed: _completed.toArray(),
                    errors: _errors.toArray()
                });

                this.dispatchEvent(e);
            }
            return;
        }

        if (!_fileList) {
            _fileList = [];
        }

        _fileList.push(file);
        
        this.bytesTotal += file.size;

        // Update the queue
        queue.apply(this);

        return this;
    };

    this.setFiles = function(files) {
        if (!files instanceof FileList || !files instanceof Array || files.length === 0) {
            return;
        }

        this.pause();
        _fileList = [];
        var i;

        if (files instanceof FileList) {
            for (i = 0; i < files.length; i++) {
                this.addFile(files.item(i));
            }
        }
        else {
            for (i = 0; i < files.length; i++) {
                this.addFile(files[i]);
            }
        }

        if (this.settings.autoStart === true) {
            this.start();
        }

        return this;
    };

    var queue = function () {
        var _self = this;
        while(_queue.length < _self.settings.maxQueue && _fileList.length > 0) {
            var file = _fileList.shift();
            if (!!file) {
                // Create the FileUpload to queue
                var fu = new FileUpload(file, {
                    url: _self.settings.url,
                    method: _self.settings.method,
                    autoStart: false,
                    maxChunkSize: _self.settings.maxChunkSize,
                    formFileField: _self.settings.formFileField,
                    chunkParameter: _self.settings.chunkParameter,
                    chunksParameter: _self.settings.chunksParameter
                });

                // Update the total queue size
                _self.bytesTotal += file.size;

                // Add the uploader to the queue
                _queue.add(fu);

                // Dispatch an queue event
                _self.dispatchEvent(new FileManagerEvent('queue', {
                    bytesLoaded: 0,
                    bytesTotal: file.size,
                    totalBytesLoaded: _self.bytesLoaded,
                    totalBytesTotal: _self.bytesTotal,
                    currentTarget: fu,
                    queue: _queue.toArray(),
                    file: file,
                    fileList: _fileList,
                    completed: _completed.toArray(),
                    errors: _errors.toArray()
                }));

                // If the manager isn't paused, start the upload
                if (!_self.paused) {
                    fu.start();
                }
            }
        }
    };

    this.start = function() {
        this.paused = false;

        queue.apply(this);
        
        for (var n in _queue.list) {
            _queue.get(n).start();
        }

        this.dispatchEvent(FileManagerEvent('start', {
            bytesLoaded: this.bytesLoaded,
            bytesTotal: this.bytesTotal,
            queue: _queue.toArray(),
            fileList: _fileList,
            completed: _completed.toArray(),
            errors: _errors.toArray()
        }));
    };

    this.pause = function() {
        this.paused = true;
        for (var i = 0; i < _queue.length; i++) {
            _queue[i].pause();
        }

        this.dispatchEvent(new FileManagerEvent('pause', {
            bytesLoaded: this.bytesLoaded,
            bytesTotal: this.bytesTotal,
            queue: _queue.toArray(),
            fileList: _fileList,
            completed: _completed.toArray(),
            errors: _errors.toArray()
        }));
    };
    
    this.clearQueue = function() {
      _queue.clear();
      return this;
    };
    
    this.clearErrors = function() {
      _errors.clear();
      return this;
    };
    
    this.clearCompleted = function() {
      _completed.clear();
      return this;
    }
}