Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.DoubleData


        // all times to their correct values
        assertTimes(expectedTimes);

        // add a bogus value to the data repository
        StringData stringData = new StringData("\"foo");
        data.putValue("/Project/Time", new DoubleData(666, false));
        data.putValue("/Non Project/Time", stringData);
        // but we don't want it to show up.
        expectedTimes.put("/Project", new Integer(0));
        boolean timesMatch = false;
        try {
View Full Code Here


                    ((String) params.get(INPUT_VAL));

                ProcessUtil processUtil = new ProcessUtil(data, prefix);
                String probeInputElem =
                    processUtil.getProcessString(ProbeData.PROBE_INPUT_METRIC);
                putValue(probeInputElem, new DoubleData(inputVal));

                return (inputVal > 0);
            } catch (Exception e) {
                return false;
            }
View Full Code Here

                    estimate.setBackground(new Color(255, 200, 200));
                    estimate.setToolTipText(resources
                            .getString("Edit_Dialog.Invalid_Time"));
                    continue;
                }
                newEstimate = new DoubleData(l, true);
            }
            dashCtx.getData().userPutValue(estTimeDataName, newEstimate);
            EST_TIME_JANITOR.cleanup(dashCtx);
            return;
        }
View Full Code Here

        if (parameters.containsKey(SAVE) && Settings.isReadWrite()) {
            try {
                save(getParameter(NAME), getParameter(UNITS),
                    getParameter(CONTENTS));
                getDataRepository().putValue(CHANGE_DATA_NAME,
                    new DoubleData(uniqueNumber));
            } catch (ParseException e) {
                writeHeader();
                redrawForm(e);
                return;
            }
View Full Code Here

  }


  public void setString(String s) throws MalformedValueException {
    try {
      value = new DoubleData(FormatUtil.parseNumber(s), true);
    } catch (Exception e) {
      throw new MalformedValueException();
    }
  }
View Full Code Here

    protected static SimpleData asSimpleData(Object o) {
        if (o == null) return null;
        if (o instanceof SimpleData) return (SimpleData) o;
        if (o instanceof String) return StringData.create((String) o);
        if (o instanceof Number)
            return new DoubleData(((Number) o).doubleValue());
        return null;
    }
View Full Code Here

        } else if (p > 0 && p < 1) {
            planLevelOfEffort = p;
            // save this level of effort to the data repository
            data.userPutValue
                (DataRepository.createDataName(fullName, getLevelOfEffortDataname()),
                 new DoubleData(planLevelOfEffort, true));
        }
    }
View Full Code Here

        if (newTaskListName != null && newValue != defaultValue) {
            String newDataName = dataNamePrefix + newTaskListName;
            if (newDataName.equals(oldDataName)) oldDataName = null;
            if (newValue != savedValue || oldDataName != null) {
                SimpleData d = new DoubleData(newValue, false);
                String dataName =
                    DataRepository.createDataName(fullName, newDataName);
                data.putValue(dataName, d);
            }
        }
View Full Code Here

                this.planTime = topDownPlanTime = bottomUpPlanTime = planTime;
                planTimeNull = planTimeUndefined = false;
                // save those minutes to the data repository
                data.userPutValue(DataRepository.createDataName
                                  (fullName, PLAN_TIME_DATA_NAME),
                                  new DoubleData(planTime, true));
                userSetLevelOfEffort(null);
            } else {
                this.planTime = topDownPlanTime = bottomUpPlanTime;
                data.userPutValue(DataRepository.createDataName
                                  (fullName, PLAN_TIME_DATA_NAME),
View Full Code Here

        if (alias != null && alias != NO_ALIAS_YET && sVal != null)
            return new DescribedValue(sVal, context.resolveName(alias));
        else if (result == 0)
            return ImmutableDoubleData.READ_ONLY_ZERO;
        else
            return new DoubleData(result);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.DoubleData

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.