Package pspdash.data

Examples of pspdash.data.DoubleData


    static void setPassword(DataRepository data, String prefix,
                                   String user, String password) {
        String dataName = data.createDataName(prefix,  "_Password_");

        if (user == null) {
            DoubleData val;
            if (password == null)
                val = ImmutableDoubleData.TRUE;
            else
                val = ImmutableDoubleData.FALSE;
            data.putValue(dataName, val);
View Full Code Here


      } catch (Exception e) { validateCell = null; return false; }
      switch (col) {
      case 2:                   // Planned Time
        try {
          String thePath = te.taskName.path();
          DoubleData pt = (DoubleData)data.getSimpleValue (thePath + PLANNED_TIME);
          if ((pt == null) || (pt.isEditable())) {
            long lv = parseTime (newValue);
            if (lv >= 0) {
              te.plannedTime = lv;
            } else {
              te.plannedTime = 0;
              rv = false;
            }
            data.putValue (thePath + PLANNED_TIME,
                           new DoubleData (te.plannedTime));
          }
          taskTable.table.setValueAt (formatTime (te.plannedTime), col, row);
        } catch (Exception e) { rv = false; }
        break;
      case 7:                   // Actual Date
View Full Code Here

            globalPrefix = MAIN_DATA_PREFIX + newName;
            ordinalPrefix = TASK_ORDINAL_PREFIX + newName;
            for (int j = r.getNumChildren();  j-- > 0) {
                dataName = data.createDataName(r.getChild(j).getFullName(),
                                               ordinalPrefix);
                data.putValue(dataName, new DoubleData(j, false));
                oldNames.remove(dataName);
            }
            // save the schedule
            dataName = data.createDataName(globalPrefix, EST_HOURS_DATA_NAME);
            data.putValue(dataName, schedule.getSaveList());
View Full Code Here

          if (pt != null)
            l += (long)((DoubleData) pt).getInteger ();

          // Save the new value into the data repository.
          data.putValue(thePath, new DoubleData(l, false));
        }
      }
    }
    postedChanges.clear ();
  }
View Full Code Here

    return results;
  }

  private void incrementDataValue(String dataName, int increment) {
    dataName = data.createDataName(dataPrefix, dataName);
    DoubleData val;
    try {
      val = (DoubleData)data.getValue(dataName);
    } catch (ClassCastException cce) {
      return;          // Do nothing - don't overwrite values of other types
    }
    if (val == null)
      val = new DoubleData(increment);
    else if (val instanceof NumberFunction)
      return;          // Do nothing - don't overwrite old-style calculations
    else
      val = new DoubleData(val.getInteger() + increment);
    val.setEditable(false);
    data.putValue(dataName, val);
  }
View Full Code Here

    }

    Iterator dataNames = data.getKeys();
    String name, subname;
    int prefixLength = dataPrefix.length();
    DoubleData val;

    while (dataNames.hasNext()) {
      name = (String) dataNames.next();
      if (name.startsWith(dataPrefix)) {
        subname = name.substring(prefixLength);
        if (subname.endsWith(DEF_INJ_SUFFIX) ||
            subname.endsWith(DEF_REM_SUFFIX)) {

          Object o = data.getValue(name);
          if (!(o instanceof DoubleData) || o instanceof NumberFunction)
                      // Don't overwrite calculations, which are
            continue; // typically summing up values from other places

          val = new DoubleData(phaseData.extractValue(subname));
          val.setEditable(false);
          data.putValue(name, val);
        }
      }
    }

    dataNames = phaseData.keySet().iterator();
    while (dataNames.hasNext()) {
      subname = (String) dataNames.next();
      name = data.createDataName(dataPrefix, subname);
      val = new DoubleData(phaseData.extractValue(subname));
      val.setEditable(false);
      data.putValue(name, val);
    }
  }
View Full Code Here

        } else if (p > 0 && p < 1) {
            planLevelOfEffort = p;
            // save this level of effort to the data repository
            data.userPutValue
                (data.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 = data.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(data.createDataName(fullName,
                                                      PLAN_TIME_DATA_NAME),
                                  new DoubleData(planTime, true));
                userSetLevelOfEffort(null);
            } else {
                this.planTime = topDownPlanTime = bottomUpPlanTime;
                data.userPutValue(data.createDataName(fullName,
                                                      PLAN_TIME_DATA_NAME),
View Full Code Here

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

TOP

Related Classes of pspdash.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.