
com.adobe.aemds.guide.common.GuideNumericStepper Maven / Gradle / Ivy
package com.adobe.aemds.guide.common;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.commons.json.JSONException;
import org.apache.sling.commons.json.JSONObject;
/**
* Sightly use class for numeric stepper
*/
public class GuideNumericStepper extends GuideNumericBox {
public String getStepperOptions() throws JSONException{
JSONObject jsonObject = new JSONObject();
JSONObject iconsObject = new JSONObject();
jsonObject.put("step", Float.parseFloat(resourceProps.get("stepSize", "1")));
iconsObject.put("up", (String)resourceProps.get("incIcon", "ui-icon-plusthick"));
iconsObject.put("down", (String)resourceProps.get("decIcon", "ui-icon-minusthick"));
jsonObject.put("icons", iconsObject);
return jsonObject.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy