Package com.intellij.openapi.graph.view

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


    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

    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

    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

    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

    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

TOP

Related Classes of com.intellij.openapi.graph.view.Graph2D

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.