Package it.uniroma1.dptu.stan.application

Examples of it.uniroma1.dptu.stan.application.MainWindow


      String nmTag = e.getTagName();

      if(ChooseFromData.TAG_CHOOSE_FROM.equals(nmTag))
    putChooseFrom(new ChooseFromData(this, e, mapOptions));
      else if(ColumnData.TAG_COLUMN.equals(nmTag))
    putColumn(new ColumnData(this, e, mapOptions));
  }
    }
View Full Code Here


  // Recupera constraints di colonna
  for(
      Iterator<ColumnData> c = model.getColumns().iterator();
      c.hasNext();
  ) {
      ColumnData column = c.next();
      for(
    Iterator<Constraint> con = column.getConstraints().iterator();
    con.hasNext();
      )
    addConstraint(con.next());
  }

  // Recupera funzione obiettivo
  objective = null;
  for(
      Iterator<ColumnData> c = model.getColumns().iterator();
      c.hasNext();
  ) {
      ColumnData column = c.next();
      switch(column.getMode()) {
      case ColumnData.MODE_MIN_TARGET:
      case ColumnData.MODE_MAX_TARGET:
    objective = column;
      }
  }
View Full Code Here

    public void actionPerformed(ActionObservable observable, Action action) {
  if(action instanceof ColumnAction)
      ((ColumnAction)action).apply(this);
  else if(action instanceof ActionModifyWedge) {
      ActionModifyWedge amw = (ActionModifyWedge)action;
      WedgeData wedge = amw.getWedge();
      if(getWedges().contains(wedge))
    wedge.actionPerformed(observable, action);
  }
    }
View Full Code Here

    protected static WedgeData getWedge(OptionData option, ColumnData column) {
  for(
      Iterator<WedgeData> i = column.getWedges().iterator();
      i.hasNext();
  ) {
      WedgeData wedge = i.next();
      if(wedge.getOption() == option)
    return(wedge);
  }

  return(null);
    }
View Full Code Here

  SceneryTreeTable table,
  boolean hasFocus,
  Object row,
  Object column
    ) {
  WedgeData wedge = ((ColumnData)column).getWedge((OptionData)row);
  renderer.setText(
      wedge == null || wedge.getCoefficient() == 0.0
  ?
      null
  :
      format.format(wedge.getMean())
  );
  return(renderer);
    }
View Full Code Here

  Object column
    ) {
  currentOption = (OptionData)row;
  currentColumn = (ColumnData)column;

  WedgeData wedge = currentColumn.getWedge(currentOption);
  editor.setText(wedge == null ? "0" : String.valueOf(wedge.getMean()));
  editor.selectAll();
  return(editor);
    }
View Full Code Here

    table.addCell(optionNameHeader,row++,column);
    table.endHeaders();
    //table.addCell(new Cell(o.getTitle()),row++,column);
    while ((iActors.hasNext())) {
        ColumnData cd = iActors.next();
        WedgeData wd = cd.getWedge(o);
        Cell c;
        if(wd == null) {
      //c = new Cell("-");
      c = new Cell();
        } else {
      double coeff = wd.getCoefficient();
      c = new Cell(new Phrase(Double.toString(coeff),fntRomanTableAllFields));
        }
        c.setHorizontalAlignment(Element.ALIGN_CENTER);
        c.setVerticalAlignment(Element.ALIGN_CENTER);
        /*
 
View Full Code Here

      double sum = 0;
      for(
    Iterator<WedgeData> i = ((ColumnData)constraint).getWedges().iterator();
    i.hasNext();
      ) {
    WedgeData wedge = i.next();
    if(wedge.getOption().getValue())
        sum += wedge.getMean();
      }

      return(new Double(sum));
  } else
      return(null);
View Full Code Here

  double value = 0;
  for(
      Iterator<WedgeData> i = column.getWedges().iterator();
      i.hasNext();
  ) {
      WedgeData wedge = i.next();
      value += wedge.getMean() * wedge.getOption().getStatisticalValue();
  }

  renderer.setText(String.valueOf(value));
  return(renderer);
    }
View Full Code Here

  }
    }


    public void removeWedge(OptionData option) {
  WedgeData wedge = getWedge(option);
  if(wedge != null)
      removeWedge(wedge);
    }
View Full Code Here

TOP

Related Classes of it.uniroma1.dptu.stan.application.MainWindow

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.