Examples of Graph2D


Examples of com.intellij.openapi.graph.view.Graph2D

  public Struts2GraphComponent(final XmlFile xmlFile) {
    final ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator();

    progress.setText("Initializing...");
    final Project project = xmlFile.getProject();
    final Graph2D graph = GraphManager.getGraphManager().createGraph2D();
    final Graph2DView view = GraphManager.getGraphManager().createGraph2DView();

    progress.setText("Building model...");
    final StrutsDataModel myDataModel = new StrutsDataModel(xmlFile);
    final StrutsPresentationModel presentationModel = new StrutsPresentationModel(graph);
View Full Code Here

Examples of com.intellij.openapi.graph.view.Graph2D

    return actionToolbar.getComponent();
  }

  public List<DomElement> getSelectedDomElements() {
    final List<DomElement> selected = new ArrayList<DomElement>();
    final Graph2D graph = myBuilder.getGraph();
    for (final Node node : graph.getNodeArray()) {
      if (graph.isSelected(node)) {
        final BasicStrutsNode nodeObject = myBuilder.getNodeObject(node);
        if (nodeObject != null) {
          ContainerUtil.addIfNotNull(nodeObject.getIdentifyingElement(), selected);
        }
      }
View Full Code Here

Examples of com.intellij.openapi.graph.view.Graph2D

    view.getGraph2D().updateViews();
  }

  public void update(AnActionEvent e) {
    final Presentation presentation = e.getPresentation();
    final Graph2D graph = getGraph(e);
    final Project project = getProject(e);

    presentation.setEnabled(project!= null && graph != null && graph.getNodeArray().length > 0 && getLayouter(graph, project).canLayout(graph));
  }
View Full Code Here

Examples of com.intellij.openapi.graph.view.Graph2D

    return DataKeys.PROJECT.getData(e.getDataContext());
  }

  public void update(final AnActionEvent e) {
    final Presentation presentation = e.getPresentation();
    final Graph2D graph = getGraph(e);
    final Project project = getProject(e);

    if (graph != null && project != null) {
      super.update(e);
      presentation.setText(getText(graph));
View Full Code Here

Examples of com.intellij.openapi.graph.view.Graph2D

    presentation.setEnabled(graph != null && getProject(e) != null);
  }

  public final boolean isSelected(AnActionEvent e) {
    final Project project = getProject(e);
    final Graph2D graph = getGraph(e);

    return graph != null && project != null && isSelected(graph, project, e);
  }
View Full Code Here

Examples of com.intellij.openapi.graph.view.Graph2D

    return graph != null && project != null && isSelected(graph, project, e);
  }

  public final void setSelected(AnActionEvent e, boolean state) {
    final Graph2D graph = getGraph(e);
    final Project project = getProject(e);

    if (graph != null && project != null) {
      setSelected(graph, state, project, e);
    }
View Full Code Here

Examples of org.jitterbit.ui.graph2d.Graph2D

    private EntityPageDisplayer pageDisplayer;

    public DependencyGraph(IntegrationEntity entity, ProjectDependencies deps, NodeUiFactory2D nodeUiFactory) {
        model = new DependencyGraphModel(entity, deps);
        graph = new Graph2D(model, nodeUiFactory, new DefaultEdgeUiFactory2D()) {

            @Override
            protected GraphLayout2D createLayout() {
                return new DependencyGraphLayout(this, (DependencyGraphModel) getModel());
            }
View Full Code Here

Examples of y.view.Graph2D

        // } else {
        Node node = getHitInfo(e).getHitNode();
        if (node != null && !getHierarchyManager().isNormalNode(node)) {
            double x = translateX(e.getX());
            double y = translateY(e.getY());
            Graph2D graph = getView().getGraph2D();
            NodeRealizer r = graph.getRealizer(node);
            GroupNodeRealizer gnr = null;
            if (r instanceof GroupNodeRealizer) {
                gnr = (GroupNodeRealizer) r;
            } else if (r instanceof ProxyShapeNodeRealizer
                    && ((ProxyShapeNodeRealizer) r).getRealizerDelegate() instanceof GroupNodeRealizer) {
View Full Code Here

Examples of y.view.Graph2D

     */
    public Node createNode(AbstractFamixEntity entity) {
        Node node = null;

        if (!this.contains(entity)) {
            Graph2D graph = getGraph(entity);
            if (isContainerEntityNode(entity)) {
                node = getHierarchyManager().createFolderNode(graph);
            } else if (FamixEntityMap.getInstance().containsType(entity.getClass())) {
                node = graph.createNode();
            }

            if (node != null) {
                this.getNodeToFamixMap().set(node, entity);
                this.getFamixToNodeMap().put(entity, node);
View Full Code Here

Examples of y.view.Graph2D

     * @param entity The entity to check.
     *
     * @return The graph in which the entity is.
     */
    private Graph2D getGraph(AbstractFamixEntity entity) {
        Graph2D graph = null;
        AbstractFamixEntity parent = entity.getParent();
        if (parent == null) {
            // no parent -> return root graph
            graph = this;
        } else {
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.