(tabPlacement == SwingConstants.RIGHT) ? true : false);
(tabPlacement == SwingConstants.TOP) ? direction == SwingConstants.NORTH : direction == SwingConstants.SOUTH);
  protected void navigateSelectedTab(int direction)  {    int tabPlacement = tabPane.getTabPlacement();    if (tabPlacement == SwingConstants.TOP        || tabPlacement == SwingConstants.BOTTOM)      {        if (direction == SwingConstants.WEST)          selectPreviousTabInRun(tabPane.getSelectedIndex());        else if (direction == SwingConstants.EAST)          selectNextTabInRun(tabPane.getSelectedIndex());        else          {            int offset = getTabRunOffset(tabPlacement, tabPane.getTabCount(),                                         tabPane.getSelectedIndex(),                                         (tabPlacement == SwingConstants.RIGHT)                                         ? true : false);            selectAdjacentRunTab(tabPlacement, tabPane.getSelectedIndex(),                                 offset);          }      }    if (tabPlacement == SwingConstants.LEFT        || tabPlacement == SwingConstants.RIGHT)      {        if (direction == SwingConstants.NORTH)          selectPreviousTabInRun(tabPane.getSelectedIndex());        else if (direction == SwingConstants.SOUTH)          selectNextTabInRun(tabPane.getSelectedIndex());        else          {            int offset = getTabRunOffset(tabPlacement, tabPane.getTabCount(),                                         tabPane.getSelectedIndex(),                                         (tabPlacement == SwingConstants.RIGHT)                                         ? true : false);            selectAdjacentRunTab(tabPlacement, tabPane.getSelectedIndex(),                                 offset);          }      }  }