Examples of Setpoint


Examples of org.openhab.model.sitemap.Setpoint

 
  /**
   * {@inheritDoc}
   */
  public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException {
    Setpoint sp = (Setpoint) w;

    State state = itemUIRegistry.getState(w);
    String newLowerState = state.toString();
    String newHigherState = state.toString();

    // set defaults for min, max and step
    BigDecimal step = sp.getStep();
    if(step==null) {
      step = BigDecimal.ONE;
    }
    BigDecimal minValue = sp.getMinValue();
    if(minValue==null) {
      minValue = BigDecimal.ZERO;
    }
    BigDecimal maxValue = sp.getMaxValue();
    if(maxValue==null) {
      maxValue = BigDecimal.valueOf(100);
    }

    // if the current state is a valid value, we calculate the up and down step values
View Full Code Here

Examples of org.openhab.model.sitemap.Setpoint

        if(chartWidget.getRefresh()>0) {
          bean.refresh = chartWidget.getRefresh();
        }
      }
      if(widget instanceof Setpoint) {
        Setpoint setpointWidget = (Setpoint) widget;
        bean.minValue = setpointWidget.getMinValue();
        bean.maxValue = setpointWidget.getMaxValue();
        bean.step = setpointWidget.getStep();
      }
    return bean;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.