Package org.jgraph.graph

Examples of org.jgraph.graph.ParentMap$Entry


            triggerModel.setPosition(map.getPosition().x + 10,
                map.getPosition().y - 20);
          }

        }
        ParentMap pm = new ParentMap();
        pm.addEntry(triggerModel, group);
        HashMap<GroupModel, AttributeMap> hm = new HashMap<GroupModel, AttributeMap>();
        hm.put(group, group.getAttributes());

        getGraph().getModel().insert(new Object[] { triggerModel },
            hm, null, pm, null);
View Full Code Here


            triggerModel.setPosition(map.getPosition().x + 10,
                map.getPosition().y - 20);
          }

        }
        ParentMap pm = new ParentMap();
        pm.addEntry(triggerModel, group);
        HashMap<GroupModel, AttributeMap> hm = new HashMap<GroupModel, AttributeMap>();
        hm.put(group, group.getAttributes());

        getGraph().getModel().insert(new Object[] { triggerModel }, hm,
            null, pm, null);
View Full Code Here

        TransitionResourceModel transResourceModell = ((PetriNetModelProcessor) getModelProcessor())
            .newTransResource(map);

        transResourceModell.setPosition(map.getResourcePosition().x,
            map.getResourcePosition().y);
        ParentMap pm = new ParentMap();
        pm.addEntry(transResourceModell, group);
        HashMap<GroupModel, AttributeMap> hm = new HashMap<GroupModel, AttributeMap>();
        hm.put(group, group.getAttributes());

        getGraph().getModel().insert(
            new Object[] { transResourceModell }, hm, null, pm,
View Full Code Here

        return m_mainElement;
    }

    public ParentMap getParentMap()
    {
        ParentMap parentMap = new ParentMap();
        if (getChildCount() > 0)
        {
            for (int i = 0; i < getChildCount(); i++)
            {
                parentMap.addEntry(getChildAt(i), this);
            }
        }
        return parentMap;
    }
View Full Code Here

                  }
                }
              }
              ConnectionSet cs = ConnectionSet.create(graphModel,
                  cells, false);
              ParentMap pm = ParentMap.create(graphModel, cells,
                  false, true);
              cells = graphLayoutCache.insertClones(cells, graph
                  .cloneCells(cells), attributes, cs, pm, 0,
                  0);
            } else if (graph.isMoveable()) { // Move Cells
              ParentMap pm = null;

              // Moves into group
              if (targetGroup != null) {
                pm = new ParentMap(context.getCells(),
                    targetGroup.getCell());
              } else if (graph.isMoveOutOfGroups()
                  && (ignoreTargetGroup != null && !ignoreTargetGroup
                      .getBounds().intersects(
                          AbstractCellView
                              .getBounds(views)))) {
                pm = new ParentMap(context.getCells(), null);
              }
              graph.getGraphLayoutCache().edit(attributes,
                  disconnect, pm, null);
            }
            event.consume();
View Full Code Here

            element.getType() == AbstractPetriNetElementModel.SUBP_TYPE)
        {
          // Restore display of trigger element if present
          if (((TransitionModel) element).hasTrigger())
          {
            ParentMap pm = new ParentMap();
            pm.addEntry(((TransitionModel) element).getToolSpecific().getTrigger(), group);
            HashMap<GroupModel, AttributeMap> hm = new HashMap<GroupModel, AttributeMap>();
            hm.put(group, group.getAttributes());
            getModel().insert(new Object[] { ((TransitionModel) element).getToolSpecific().getTrigger() }, hm, null, pm, null);
          }

          // Restore display of associated resource if present
          if (((TransitionModel) element).hasResource())
          {
            ParentMap pm = new ParentMap();
            pm.addEntry(((TransitionModel) element).getToolSpecific().getTransResource(), group);
            HashMap<GroupModel, AttributeMap> hm = new HashMap<GroupModel, AttributeMap>();
            hm.put(group, group.getAttributes());
            getModel().insert(new Object[] { ((TransitionModel) element).getToolSpecific().getTransResource() }, hm, null, pm, null);
          }
        }
View Full Code Here

                  }
                }
              }
              ConnectionSet cs = ConnectionSet.create(graphModel,
                  cells, false);
              ParentMap pm = ParentMap.create(graphModel, cells,
                  false, true);
              cells = graphLayoutCache.insertClones(cells, graph
                  .cloneCells(cells), attributes, cs, pm, 0,
                  0);
            } else if (graph.isMoveable()) { // Move Cells
              ParentMap pm = null;

              // Moves into group
              if (targetGroup != null) {
                pm = new ParentMap(context.getCells(),
                    targetGroup.getCell());
              } else if (graph.isMoveOutOfGroups()
                  && (ignoreTargetGroup != null && !ignoreTargetGroup
                      .getBounds().intersects(
                          AbstractCellView
                              .getBounds(views)))) {
                pm = new ParentMap(context.getCells(), null);
              }
              graph.getGraphLayoutCache().edit(attributes,
                  disconnect, pm, null);
            }
            event.consume();
View Full Code Here

TOP

Related Classes of org.jgraph.graph.ParentMap$Entry

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.