Exemplo n.º 1
0
  @Override
  protected void onImbSortClick() throws PresentationLogicException {

    ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

    if (discriminatorCollection != null) {
      discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
      form.grdDiscriminators().getRows().clear();
      populateDiscriminatorsGrid(discriminatorCollection);
      updateControlsState();
    }
  }
Exemplo n.º 2
0
  @Override
  protected void onContextMenuItemClick(int menuItemID, Control sender)
      throws PresentationLogicException {
    switch (menuItemID) {
      case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Add:
        engine.open(form.getForms().Emergency.DiscriminatorSelectDialog);
        break;

      case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Remove:
        form.grdDiscriminators().removeSelectedRow();
        updateControlsState();
        break;

      case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveUp:
        form.grdDiscriminators().moveUp();
        updateControlsState();
        break;

      case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveDowm:
        form.grdDiscriminators().moveDown();
        updateControlsState();
        break;

      case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Sort:
        ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

        if (discriminatorCollection != null) {
          discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
          form.grdDiscriminators().getRows().clear();
          populateDiscriminatorsGrid(discriminatorCollection);
          updateControlsState();
        }

        break;
    }
  }