Package de.hpi.eworld.simulationstatistic.model

Examples of de.hpi.eworld.simulationstatistic.model.StatDataset


  /**
   * SLOT that is called when the user activates the deleteDataset action
   */
  private void onDeleteDataset() {
    StatDataset dataset = getDataset((ListValue) datasetsList.getSelectedValue());
    if (dataset != null)
      StatisticsDataManager.getInstance().removeDataset(dataset.getId());
    else
      onDatasetsCleared();
  }
View Full Code Here


  /**
   * SLOT Opens an {@link QInputDialog} and changes the display text of the
   * current dataset
   */
  private void onRenameDataset() {
    StatDataset dataset = getDataset((ListValue) datasetsList.getSelectedValue());
    if (dataset != null){
      String newName = JOptionPane.showInputDialog(
          parentWindow,
          "Please enter new name for this data set",
          "Rename data set", JOptionPane.PLAIN_MESSAGE);
    if (!((newName == null) || (newName.equals(""))))
      dataset.setDisplayText(newName);
    onDatasetsChanged();
    }else
      onDatasetsCleared();     
  }
View Full Code Here

 
  /**
   * Open the {@link ChartsDialog}
   */
  protected void showCharts() {
    StatDataset dataset = getDataset((ListValue) datasetsList.getSelectedValue());
    GraphGeneratorGUI gg = new GraphGeneratorGUI(parentWindow, dataset);
    gg.setVisible(true);
  }
View Full Code Here

  /**
   * Opens a system editor to display the file with the original data of the
   * current dataset
   */
  protected void showRawData() {
    StatDataset dataset = getDataset((ListValue) datasetsList.getSelectedValue());
    if (Desktop.isDesktopSupported() && dataset != null) {
      try {
       
        Desktop.getDesktop().open(dataset.getDataFile());
      } catch (IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(parentWindow,
            e.getMessage(), "File could not be opened",
                JOptionPane.WARNING_MESSAGE);
View Full Code Here

   * Called whenever the currently selected data set changes.
   * Checks whether the new data set belongs to the current map
   * and de-/activates the "show on map" action accordingly
   */
  private void checkBelongingToMap(){
    StatDataset dataset = getDataset((ListValue) datasetsList.getSelectedValue());
    if ((dataset != null) && (dataset.belongsToCurrentMap()))
      showOnMapAction.setEnabled(true);
    else
      showOnMapAction.setEnabled(false);
  }
View Full Code Here

  public void loadFromFile(final Collection<?> items) {
    final Map<String, StatDataset> datasets = new HashMap<String, StatDataset>();
    for (final Object obj : items) {
      if (obj instanceof StatDataset) {
        final StatDataset dataset = (StatDataset) obj;
        datasets.put(dataset.getId(), dataset);
      }
    }
    StatisticsDataManager.getInstance().setDatasets(datasets);
  }
View Full Code Here

     * @param dataFileURL the URL of the file to be imported
     * @param forCurrentMap does the file belong to the currently active map?
     * @param automaticImport was this import triggered automatically?
     */
    public AggregatedHandler(URL dataFileURL, boolean forCurrentMap, boolean automaticImport) {
      dataset = new StatDataset();
      dataset.setBelongsToCurrentMap(forCurrentMap);
      dataset.setAutomaticImport(automaticImport);
      dataset.setDataURL(dataFileURL);
      currentInterval = null;
      currentStatEdge = null;
View Full Code Here

TOP

Related Classes of de.hpi.eworld.simulationstatistic.model.StatDataset

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.