public boolean enable() {
    // Register into the menu.
    JToolBar toolbar =
        ((GenericArgoMenuBar) ProjectBrowser.getInstance().getJMenuBar()).getCreateDiagramToolbar();
    // there is no setIndex or similar, so we have to add
    // twice, and it moves the item instead of adding again.
    toolbarBtn = toolbar.add(newSequence);
    toolbar.add(toolbarBtn, 3);
    toolbar.updateUI();

    propPanelFactory = new SequenceDiagramPropPanelFactory();
    PropPanelFactoryManager.addPropPanelFactory(propPanelFactory);

    LOG.info("SequenceDiagram Module enabled.");
    return true;
  }
Esempio n. 2
0
 public void init() {
   /* Set up the property panels for use case diagrams: */
   PropPanelFactory diagramFactory = new UseCaseDiagramPropPanelFactory();
   PropPanelFactoryManager.addPropPanelFactory(diagramFactory);
 }