Examples of AreaData


Examples of it.uniroma1.dptu.stan.model.area.AreaData

      super.setupUI(parent, row, column);
  }

      public void perform(ActionEvent actionEvent, Object row, SceneryBaseColumn column) {
      Data data = (Data)sourceView.getData();
      final AreaData area = new AreaData(data);

      area.setTitle("New decision area");
      data.putArea(area);

      setSelectedRow(area);
      }
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

      super.setupUI(parent, row, column);
  }

      public void perform(ActionEvent actionEvent, Object row, SceneryBaseColumn column) {
      assert(row instanceof AreaData);
      AreaData area = (AreaData)row;
      final OptionData option = new OptionData(area);

      option.setTitle("New decision option");
      area.putOption(option);

      setSelectedRow(option);
      }
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

      super.setupUI(parent, row, column);
  }

      public void perform(ActionEvent actionEvent, Object row, SceneryBaseColumn column) {
      assert(row instanceof AreaData);
      AreaData area = (AreaData)row;
      if(
    JOptionPane.showConfirmDialog(
        (Container)sourceView,
        new StringBuffer()
      .append("You are about to remove the area\n")
      .append('"').append(area.getTitle()).append("\".\n")
      .append("Removing the area will remove also the\n")
      .append("options currently belonging to the area\n")
      .append("itself.\n")
      .append("Are you shure?")
        .toString(),
        "Confirm area deletion",
        JOptionPane.YES_NO_OPTION
    ) == JOptionPane.YES_OPTION
      )
    area.getDocumentData().removeArea(area);
      }
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

      super.setupUI(parent, row, column);
  }

      public void perform(ActionEvent actionEvent, Object row, SceneryBaseColumn column) {
      assert(row instanceof AreaData);
      AreaData area = (AreaData)row;

      PropertiesDialog dlg = new PropertiesDialog(
    sourceView,
    "Decision Area Properties"
      );

      dlg.setTitle(area.getTitle());
      dlg.setDescription(area.getDescription());
      if(dlg.run()) {
    area.setTitle(dlg.getTitle());
    area.setDescription(dlg.getDescription());
      }
      }
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

  Collection<AreaData> areas = data.getAreas();
  Iterator<AreaData> i = areas.iterator();
  int j = 1;
  while (i.hasNext()){
      // working with a single area
      AreaData area = i.next();

      String nameArea = area.getTitle();
      String areaPrefix = "Area: ";
      Paragraph areaPar = new Paragraph(areaPrefix + nameArea,fntRomanArea);
      areaPar.setSpacingAfter(12);
      doc.add(areaPar);

      String areaDescription = area.getDescription();
      if ((areaDescription!=null)&&(areaDescription.length()!=0)) {
    Paragraph areaDescriptionPar = new Paragraph(areaDescription,fntRomanAreaDescription);
    areaDescriptionPar.setSpacingAfter(12);
    doc.add(areaDescriptionPar);
      }



      // dealing with area's'option
      Collection<OptionData> options = area.getOptions();
      Iterator<OptionData> iOptions = options.iterator();

      // create an itemize
      List itemize = new List(false,20);
      Paragraph optionsPar = new Paragraph("OPTIONS",fntRomanOption);
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

  cacheObjectToChildren = new HashMap<Object, Vector<Object>>();
  for(
      Iterator<AreaData> i = root.getAreas().iterator();
      i.hasNext();
  ) {
      AreaData area = i.next();

      Vector<Object> vOptions = new Vector<Object>();
      for(
    Iterator<OptionData> j = area.getOptions().iterator();
    j.hasNext();
      )
    vOptions.add(j.next());

      cacheObjectToChildren.put(area, vOptions);
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

    /*
     * Tiene traccia delle modifiche apportate al modello
     */
    public void actionPerformed(ActionObservable observable, Action action) {
  if(action instanceof ActionPutArea) {
      AreaData areaNew = ((ActionPutArea)action).getArea();

      cacheObjectToChildren.get(root).add(areaNew);
      cacheObjectToChildren.put(areaNew, new Vector<Object>());
      fireTreeNodesInserted(
    this,
    new Object[] { root },
    new int[] { getIndexOfChild(root, areaNew) },
    new Object[] { areaNew }
      );
  } else if(action instanceof ActionRemoveArea) {
      AreaData areaOld = ((ActionRemoveArea)action).getArea();

      final int idxRemoved = getIndexOfChild(root, areaOld);
      fireTreeNodesRemoved(
    this,
    new Object[] { root },
    new int[] { idxRemoved },
    new Object[] { areaOld }
      );

      cacheObjectToChildren.get(root).remove(areaOld);
      cacheObjectToChildren.remove(areaOld);
  } else if(action instanceof ActionPutOption) {
      OptionData optionNew = ((ActionPutOption)action).getOption();
      AreaData area = optionNew.getAreaData();

      cacheObjectToChildren.get(area).add(optionNew);
      fireTreeNodesInserted(
    this,
    new Object[] { root, area },
    new int[] { getIndexOfChild(area, optionNew) },
    new Object[] { optionNew }
      );
  } else if(action instanceof ActionRemoveOption) {
      OptionData optionOld = ((ActionRemoveOption)action).getOption();
      AreaData area = optionOld.getAreaData();

      fireTreeNodesRemoved(
    this,
    new Object[] { root, area },
    new int[] { getIndexOfChild(area, optionOld) },
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

  if(data != null) {
      for(
    Iterator<AreaData> i = data.getAreas().iterator();
    i.hasNext();
      ) {
    AreaData area = i.next();
    newCache.add(area);

    for(
        Iterator<OptionData> j = area.getOptions().iterator();
        j.hasNext();
    )
        newCache.add(j.next());
      }
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

  int id = 0;
  for(
      Iterator<AreaData> i = setAreaDatas.iterator();
      i.hasNext();
  ) {
      AreaData area = i.next();

      for(
    Iterator<OptionData> j = area.getOptions().iterator();
    j.hasNext();
      )
    j.next().setId(new StringBuffer("o").append(id++).toString());

      // Salva l'area ed il suo contenuto
      deRoot.appendChild(area.save(doc));
  }

  // Salva le choose-from
  for(
      Iterator<ChooseFromData> i = setChooseFromDatas.iterator();
View Full Code Here

Examples of it.uniroma1.dptu.stan.model.area.AreaData

      if(TAG_TITLE.equals(nmTag))
    setTitle(Utils.TrimLR(e.getTextContent()));
      else if(TAG_DESCR.equals(nmTag))
    setDescription(Utils.TrimLR(e.getTextContent()));
      else if(AreaData.TAG_AREA.equals(nmTag))
    putArea(new AreaData(this, e));
      else
    break;
  }

  Map<String, OptionData> mapOptions = new HashMap<String, OptionData>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.