Пример #1
0
  @Override
  public void onTab(Component component, PreviewEvent pe) {
    if (!isManaged()) return;

    if (!pe.isShiftKey() && forwardIfOverride(component)) {
      pe.stopEvent();
      return;
    } else if (pe.isShiftKey() && previousIfOverride(component)) {
      pe.stopEvent();
      return;
    }
  }
Пример #2
0
  @Override
  public void onTab(Component component, PreviewEvent pe) {
    if (!isManaged()) return;
    if (component instanceof TabItem) {
      pe.preventDefault();

      if (pe.isShiftKey()) {
        focusPreviousWidget(component.getParent());
      } else {
        focusNextWidget(component.getParent());
      }
    } else if (component instanceof HeaderItem) {
      pe.preventDefault();
      if (pe.isShiftKey()) {
        focusPreviousWidget(component);
      } else {
        focusNextWidget(component);
      }
    }
  }