Ejemplo n.º 1
0
  /**
   * Method loads a PlayBook and displays its members to the screen
   *
   * @param book The PlayBook to be loaded in
   */
  protected void loadPlayBook(PlayBookEditor editor) throws IOException {
    this.editor = editor;
    ComponentLibrary myCompLib = editor.getComponentLibrary();
    // We setup the various display units for the play book components
    treeView = new JTree(editor.getPlayBook());
    stratView = new JList(myCompLib.strategies);
    formView = new JList(myCompLib.formations);
    roleView = new JList(myCompLib.roles);
    subRoleView = new JList(myCompLib.subRoles);

    // Set default display to tree
    treeScroller.getViewport().setView(treeView);
  }
Ejemplo n.º 2
0
  public void mouseClicked(MouseEvent e) {
    // Double Click
    if (e.getClickCount() == 2) {
      System.out.println("Double CLIKC!!\n\n\n");
      if (treeMode == SUBROLE_ID) {
        if (editor.getMode() == PBModePanel.SUB_ROLE_MODE) {
          editor.getSubRolePanel().loadSelected();
        } else if (editor.getMode() == PBModePanel.TEST_MODE) {
          editor.getTestPanel().selectSubRole();
        }
      }

      // Single Click
    } else if (e.getClickCount() == 1) {
      return;
    }
  }