Package org.ontospread.gui.view.dialogs

Examples of org.ontospread.gui.view.dialogs.ShowConcept


    });


    showConceptMenuItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) { 
        ShowConcept showConcept = new ShowConcept(shell);
        ConceptTO[] allConcepts = controller.getAllConcepts();
        String []concepts = new String[allConcepts.length];
        for(int i = 0; i<allConcepts.length;i++){
          concepts[i] = allConcepts[i].getUri();
        }
        Arrays.sort(concepts);
        showConcept.setConcepts(concepts);
        String uri = (String) showConcept.open();
        if(uri != null){
          try {
            viewer.setGraph(controller.createGraphFromConcept(uri));
            updateGraph();
          } catch (ConceptNotFoundException e) {
            createErrorDialog(e);
          }
        }
      }
    });

    conceptPathMenuItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        try {
          ShowConceptPath sp = new ShowConceptPath(shell);
          String[] concepts;
          concepts = controller.getAvailablePaths();
          Arrays.sort(concepts);
          sp.setConcepts(concepts);
          String uri = (String) sp.open();
          if(uri != null){
            viewer.setGraph(controller.createGraphForSpreading(uri));
            updateGraph();
          }
        } catch (ConceptNotFoundException e) {
          createErrorDialog(e);
        } catch (Exception e) {
          createErrorDialog(e);
        }
      }
    });

    showPathMenuItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) { 
        ShowSpreadingPath showConcept = new ShowSpreadingPath(shell);
        String[] concepts;
        try {
          concepts = controller.getAvailableSpreading();
          Arrays.sort(concepts);
          showConcept.setConcepts(concepts);
          String uri = (String) showConcept.open();
          if(uri != null){
            viewer.setGraph(controller.createGraphForSpreading(uri));
            updateGraph();
          }
        } catch (ConceptNotFoundException e) {
View Full Code Here

TOP

Related Classes of org.ontospread.gui.view.dialogs.ShowConcept

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.