Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.SimpleData


        }
    }

    private void assertTime(String path, int i) {
        String dataName = path + "/Time";
        SimpleData d = data.getSimpleValue(dataName);
        if (d == null && i == 0)
            return;

        assertNotNull("Missing time data for " + path, d);
        assertTrue("Time data for " + path + " is not NumberData",
View Full Code Here


        assertEquals("Wrong time for path " + path, i, n.getDouble(), 0);
    }

    private void assertStartTime(String path, Date s) {
        String dataName = path + "/Started";
        SimpleData d = data.getSimpleValue(dataName);
        if (d == null && s == null)
            return;

        assertTrue(d instanceof DateData);
        DateData w = (DateData) d;
View Full Code Here

    return !foundErr;
  }

  private boolean checkTimeData(String path, long expectedValue) {
    String dataName = path + "/Time";
    SimpleData value = harness.getDashboard().getData().getSimpleValue(
        dataName);

    if (value == null) {
      if (expectedValue == 0)
        return true;
    } else {
      double actualValue = ((DoubleData) value).getDouble();
      if (Math.abs(actualValue - expectedValue) < 0.001) {
        return true;
      }
    }

    printErr("Time mismatch for " + path + ": expected " + expectedValue
        + ", got " + (value == null ? null : value.format()));
    return false;
  }
View Full Code Here

            }
        }
    }

    private boolean testValue(String dataname) {
        SimpleData sd = getValue(dataname);
        return sd != null && sd.test();
    }
View Full Code Here

    }

    public void dataValueChanged(DataEvent e) throws RemoteException {
        forecastDateHTML = null;
        String name = e.getName();
        SimpleData value = e.getValue();
        if (name.equals(estTimeDataName)) {
            estTime = getDouble(value, Double.NaN);
            estTimeEditable = (value == null || value.isEditable())
                    && Settings.isReadWrite();
            recalc();
        } else if (name.equals(actTimeDataName)) {
            actTime = getDouble(value, 0.0);
            recalc();
View Full Code Here

        SaveableData enabledVal = dashCtx.getData().getInheritableValue(path,
                ENABLED_DATA_NAME);
        if (enabledVal == null)
            return Settings.getBool(ENABLED_SETTING_NAME, true);

        SimpleData enabled = enabledVal.getSimpleValue();
        return (enabled != null && enabled.test());
    }
View Full Code Here

        while (true) {
            if (JOptionPane.showConfirmDialog(this, message, title,
                    JOptionPane.OK_CANCEL_OPTION) != JOptionPane.OK_OPTION)
                return;
            SimpleData newEstimate;
            String userInput = estimate.getText();
            if (userInput == null || userInput.trim().length() == 0) {
                newEstimate = null;
            } else {
                long l = FormatUtil.parseTime(userInput.trim());
View Full Code Here

    }
    public static String getOwnerName(DataRepository data) {
        return getOwnerName((DataContext) data);
    }
    public static String getOwnerName(DataContext data) {
        SimpleData val = data.getSimpleValue("/Owner");
        if (val == null) return null;
        String result = val.format();

        String defaultVal = Resources.getDashBundle("ProcessDashboard")
            .getString("Enter_your_name");
        if (result.equals(defaultVal))
            return null;
View Full Code Here

        }
        return result;
    }
   
    private static String getStrVal(DataContext data, String name) {
        SimpleData sd = data.getSimpleValue(name);
        return (sd == null ? null : sd.format());
    }
View Full Code Here

        }
    }


    private void loadStructuralData() {
        SimpleData d = getValue(TASK_ORDINAL_PREFIX + taskListName);
        if (d instanceof NumberData)
            taskOrdinal = savedTaskOrdinal = ((NumberData) d).getInteger();

        d = getValue(TASK_PRUNING_PREFIX + taskListName);
        if (d instanceof NumberData)
View Full Code Here

TOP

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

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.