/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(['sap/ui/core/library', 'sap/ui/core/ValueStateSupport', 'sap/ui/Device'], function(coreLibrary, ValueStateSupport, Device) { "use strict"; // shortcut for sap.ui.core.ValueState var ValueState = coreLibrary.ValueState; /** * CheckBox renderer. * @namespace */ var CheckBoxRenderer = { }; /** * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}. * * @param {sap.ui.core.RenderManager} oRm The RenderManager that can be used for writing to the Render-Output-Buffer * @param {sap.ui.core.Control} oCheckBox An object representation of the control that should be rendered */ CheckBoxRenderer.render = function(oRm, oCheckBox){ // get control properties var sId = oCheckBox.getId(), bEnabled = oCheckBox.getEnabled(), bDisplayOnly = oCheckBox.getDisplayOnly(), bEditable = oCheckBox.getEditable(), bInteractive = bEnabled && !bDisplayOnly, bDisplayOnlyApplied = bEnabled && bDisplayOnly, oCbLabel = oCheckBox.getAggregation("_label"), sValueState = oCheckBox.getValueState(), bInErrorState = ValueState.Error === sValueState, bInWarningState = ValueState.Warning === sValueState, bInInformationState = ValueState.Information === sValueState, bUseEntireWidth = oCheckBox.getUseEntireWidth(); // CheckBox wrapper oRm.write("