Package org.sbml.jsbml.ext.layout

Examples of org.sbml.jsbml.ext.layout.BoundingBox


          double width = nodeView.getWidth();
          double depth = 0.0;
          Dimensions dim = new Dimensions(width, height, depth, level, version);
          Point point = new Point(xpos, ypos, zpos, level, version);
         
          BoundingBox box = new BoundingBox();
          box.setLevel(level);
          box.setVersion(version);
          box.setPosition(point);
          box.setDimensions(dim);
         
          if (nodeType.equals(CySBMLConstants.NODETYPE_SPECIES)){
            SpeciesGlyph sGlyph = new SpeciesGlyph();
            sGlyph.setId(nodeId);
            sGlyph.setVersion(version);
View Full Code Here


    Map<String, BoundingBox> boxesMap = new HashMap<String, BoundingBox>();
    if (layout.isSetListOfSpeciesGlyphs()) {
      for (SpeciesGlyph glyph : layout.getListOfSpeciesGlyphs()) {
        if (glyph.isSetSpecies() && glyph.isSetBoundingBox()) {
          String id = glyph.getSpecies();
          BoundingBox box = getBoundingBoxFromGlyph(glyph);
          boxesMap.put(id, box);
        }
      }
    }
    return boxesMap;
View Full Code Here

    Map<String, BoundingBox> boxesMap = new HashMap<String, BoundingBox>();   
    if (layout.isSetListOfReactionGlyphs()){
      for (ReactionGlyph glyph : layout.getListOfReactionGlyphs()){
        if (glyph.isSetReaction() && glyph.isSetBoundingBox()){
          String id = glyph.getReaction();
          BoundingBox box = getBoundingBoxFromGlyph(glyph);
          boxesMap.put(id, box);
        }
      }
    }
    return boxesMap;
View Full Code Here

  private static Map<String, BoundingBox> getSpeciesGlyphBoundingBoxesFromLayout(Layout layout) {
    Map<String, BoundingBox> boxesMap = new HashMap<String, BoundingBox>();
    if (layout.isSetListOfSpeciesGlyphs()) {
      for (SpeciesGlyph glyph : layout.getListOfSpeciesGlyphs()) {
        String id = glyph.getId();
        BoundingBox box = getBoundingBoxFromGlyph(glyph);
        boxesMap.put(id, box);
      }
    }
    return boxesMap;
  }
View Full Code Here

  private static Map<String, BoundingBox> getReactionGlyphBoundingBoxesFromLayout(Layout layout) {
    Map<String, BoundingBox> boxesMap = new HashMap<String, BoundingBox>();
    if (layout.isSetListOfReactionGlyphs()) {
      for (ReactionGlyph glyph : layout.getListOfReactionGlyphs()) {
        String id = glyph.getId();
        BoundingBox box = getBoundingBoxFromGlyph(glyph);
        boxesMap.put(id, box);
      }
    }
    return boxesMap;
  }
View Full Code Here

    }
    return boxesMap;
  }
 
  private static BoundingBox getBoundingBoxFromGlyph(GraphicalObject glyph){
    BoundingBox box;
    if (glyph.isSetBoundingBox()) {
      box = glyph.getBoundingBox();
      setMissingBoundaryBoxInformation(box);
    } else {
      box = createGenericBoundingBox();
View Full Code Here

    dim.setWidth(GENERIC_WIDTH);
    dim.setHeight(GENERIC_HEIGHT);
    Point point = new Point();
    point.setX(GENERIC_X);
    point.setY(GENERIC_Y);
    BoundingBox box = new BoundingBox();
    box.setDimensions(dim);
    box.setPosition(point);
    return box;
  }
View Full Code Here

  /** For all species in the network which have no bounding box, a
   * generic bounding box is generated.
   */
  private void setMissingSpeciesBoundingBoxes(){
    Map<String, BoundingBox> boxes = speciesBoundingBoxes;
    BoundingBox genericBox = createGenericBoundingBox();
    String key;
    for (Species species : document.getModel().getListOfSpecies()){
      key = species.getId();
      if (!boxes.containsKey(key)){
        boxes.put(key, genericBox);
View Full Code Here

      }
    }
  }
  private void setMissingReactionBoundingBoxes(){
    Map<String, BoundingBox> boxes = reactionBoundingBoxes;
    BoundingBox genericBox = createGenericBoundingBox();
    String key;
    for (Reaction reaction : document.getModel().getListOfReactions()){
      key = reaction.getId();
      if (!boxes.containsKey(key)){
        boxes.put(key, genericBox);
View Full Code Here

      }
    }
  }
  private void setMissingQSpeciesBoundingBoxes(){
    Map<String, BoundingBox> boxes = speciesBoundingBoxes;
    BoundingBox genericBox = createGenericBoundingBox();
    String key;
    Model model = document.getModel();
    QualitativeModel qModel = (QualitativeModel) model.getExtension(QualConstant.namespaceURI);
    if (qModel != null){
      for (QualitativeSpecies qspecies : qModel.getListOfQualitativeSpecies()){
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.ext.layout.BoundingBox

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.