コード例 #1
0
ファイル: TabPanelHandler.java プロジェクト: sbentin/GXT_RTL
 @Override
 public void onEnter(Component component, PreviewEvent pe) {
   if (!isManaged()) return;
   if (component instanceof HeaderItem) {
     pe.preventDefault();
     TabItem item = (TabItem) component.getParent();
     stepInto(item, pe, true);
   } else if (component instanceof TabPanel) {
     pe.preventDefault();
     TabPanel panel = (TabPanel) component;
     TabItem item = panel.getSelectedItem();
     if (item != null && item.getItemCount() > 0) {
       item.getItem(0).focus();
     }
   }
 }
コード例 #2
0
ファイル: TabPanelHandler.java プロジェクト: sbentin/GXT_RTL
  @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);
      }
    }
  }