Ejemplo n.º 1
0
  protected void createOWLVizTabUI() {
    setLayout(new BorderLayout());
    // Create the tabbed pane
    tabbedPane = new JTabbedPane();
    add(tabbedPane);

    // /////////////////////////////////////////////////////////////////////
    //
    // Build the asserted subclass hierarchy tabs
    //
    // ////////////////////////////////////////////////////////////////////
    assertedGraphModel = new OWLClassGraphAssertedModel(getOWLModelManager());
    OWLVizGraphPanel assertedPanel =
        new OWLVizGraphPanel("Asserted hierarchy", this, getOWLEditorKit(), assertedGraphModel);
    assertedGraphComponent = assertedPanel.getGraphComponent();
    setupListeners(assertedGraphComponent);
    tabbedPane.add(assertedPanel.getName(), assertedPanel);
    graphComponents.add(assertedGraphComponent);

    // /////////////////////////////////////////////////////////////////////
    //
    // Build the inferred subclass hierarchy tabs
    //
    // ////////////////////////////////////////////////////////////////////
    inferredGraphModel = new OWLClassGraphInferredModel(getOWLModelManager());
    OWLVizGraphPanel inferredPanel =
        new OWLVizGraphPanel("Inferred hierarchy", this, getOWLEditorKit(), inferredGraphModel);
    inferredGraphComponent = inferredPanel.getGraphComponent();
    tabbedPane.add(inferredPanel.getName(), inferredPanel);
    graphComponents.add(inferredGraphComponent);

    // Group the asserted and inferred hierarchy tabs, so that operations
    // such as showing subclasses etc. are applied to both tabs.
    ArrayList<GraphComponent> list = new ArrayList<GraphComponent>();
    list.add(assertedGraphComponent);
    list.add(inferredGraphComponent);
    componentGroupMap.put(assertedPanel, list);
    componentGroupMap.put(inferredPanel, list);

    // Create the toolbar
    createToolBar(assertedGraphComponent.getController(), assertedGraphComponent.getController());
  }