Exemple #1
0
  /**
   * Handle Mouse Click
   *
   * @param tr
   */
  protected void onRowClicked(Element tr) {
    if (!isRowEnabled(tr) || tr == subPopupAnchor) {
      return;
    }

    int itemIndex = Integer.parseInt(tr.getAttribute("item-index"));
    Action menuItem = list.get(itemIndex);
    if (menuItem instanceof ActionGroup
        && (!((ActionGroup) menuItem).canBePerformed()
            && Utils.hasVisibleChildren(
                (ActionGroup) menuItem,
                presentationFactory,
                actionManager,
                managerProvider.get()))) {
      openSubPopup(tr);
    } else {
      if (actionSelectedHandler != null) {
        actionSelectedHandler.onActionSelected(menuItem);
      }
      ActionEvent e =
          new ActionEvent(
              presentationFactory.getPresentation(menuItem), actionManager, managerProvider.get());
      menuItem.actionPerformed(e);
    }
  }
Exemple #2
0
 @Override
 public void run() {
   openSubPopup(hoveredTR);
 }