Package com.serotonin.m2m2.view

Examples of com.serotonin.m2m2.view.ImageSet


        double newValue = currentValue.getDoubleValue() + change;
        if (newValue > vo.getMax())
            newValue = vo.getMax();
        if (newValue < vo.getMin())
            newValue = vo.getMin();
        return new NumericValue(newValue);
    }
View Full Code Here


        return "publisherEdit.squwk";
    }

    @Override
    protected PublisherVO<? extends PublishedPointVO> createPublisherVO() {
        return new SquwkSenderVO();
    }
View Full Code Here

        model.put("NUMERIC", DataTypes.NUMERIC);
        model.put("IMAGE", DataTypes.IMAGE);

        // Create the individual point charts
        for (PointStatistics pointStat : pointStatistics) {
            PointTimeSeriesCollection ptsc = new PointTimeSeriesCollection(timeZone);

            if (pointStat.getNumericTimeSeries() != null)
                ptsc.addNumericTimeSeries(pointStat.getNumericTimeSeries().plainCopy());
            else if (pointStat.getDiscreteTimeSeries() != null)
                ptsc.addDiscreteTimeSeries(pointStat.getDiscreteTimeSeries().plainCopy());

            if (ptsc.hasData()) {
                if (inlinePrefix != null)
                    model.put("chartName", inlinePrefix + pointStat.getChartName());
                pointStat.setImageData(ImageChartUtils.getChartData(ptsc, POINT_IMAGE_WIDTH, POINT_IMAGE_HEIGHT,
                        reportInstance.getReportStartTime(), reportInstance.getReportEndTime()));
            }
        }

        PointTimeSeriesCollection ptsc = handler.getPointTimeSeriesCollection();
        if (ptsc.hasData()) {
            if (inlinePrefix != null)
                model.put("chartName", inlinePrefix + IMAGE_CONTENT_ID);
            else {
                chartName = "r" + reportInstance.getId() + ".png";
                // The path comes from the servlet path definition in web.xml.
View Full Code Here

        // Validate
        if (min >= max)
            response.addContextualMessage("graphicRendererAnalogMin", "viewEdit.graphic.invalidMinMax");

        ImageSet imageSet = getImageSet(imageSetId);
        if (imageSet == null)
            response.addContextualMessage("graphicRendererAnalogImageSet", "viewEdit.graphic.missingImageSet");

        if (!response.getHasMessages()) {
            AnalogGraphicComponent c = (AnalogGraphicComponent) getViewComponent(viewComponentId);
View Full Code Here

    public ProcessResult saveBinaryGraphicComponent(String viewComponentId, int zeroImage, int oneImage,
            boolean displayText, String imageSetId) {
        ProcessResult response = new ProcessResult();

        // Validate
        ImageSet imageSet = getImageSet(imageSetId);
        if (imageSet == null)
            response.addContextualMessage("graphicRendererBinaryImageSet", "viewEdit.graphic.missingImageSet");
        else {
            if (zeroImage == -1)
                response.addContextualMessage("graphicRendererBinaryImageSetZeroMsg",
View Full Code Here

    public ProcessResult saveMultistateGraphicComponent(String viewComponentId, List<IntStringPair> imageStates,
            int defaultImage, boolean displayText, String imageSetId) {
        ProcessResult response = new ProcessResult();

        // Validate
        ImageSet imageSet = getImageSet(imageSetId);
        if (imageSet == null)
            response.addContextualMessage("graphicRendererMultistateImageSet", "viewEdit.graphic.missingImageSet");

        if (!response.getHasMessages()) {
            MultistateGraphicComponent c = (MultistateGraphicComponent) getViewComponent(viewComponentId);
View Full Code Here

        return KEY;
    }

    @Override
    public ChangeTypeRT createRuntime() {
        return new AlternateBooleanChangeRT();
    }
View Full Code Here

    return alternateBooleanChange;
  }

  @Override
  public PointLocatorRT createRuntime() {
    ChangeTypeRT changeType = getChangeType().createRuntime();
    String startValue = getChangeType().getStartValue();
    DataValue startObject;
    if (dataTypeId == DataTypes.BINARY)
      startObject = BinaryValue.parseBinary(startValue);
    else if (dataTypeId == DataTypes.MULTISTATE) {
View Full Code Here

        return KEY;
    }

    @Override
    public ChangeTypeRT createRuntime() {
        return new IncrementAnalogChangeRT(this);
    }
View Full Code Here

        return KEY;
    }

    @Override
    public ChangeTypeRT createRuntime() {
        return new RandomBooleanChangeRT();
    }
View Full Code Here

TOP

Related Classes of com.serotonin.m2m2.view.ImageSet

Copyright © 2018 www.massapicom. 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.