protected void paintTopTabBorder(int tabIndex,Graphics g,int x,int y,int w,int h,int btm,int rght,boolean isSelected){
  int currentRun=getRunForTab(tabPane.getTabCount(),tabIndex);
  int lastIndex=lastTabInRun(tabPane.getTabCount(),currentRun);
  int firstIndex=tabRuns[currentRun];
  boolean leftToRight=CompiereUtils.isLeftToRight(tabPane);
  int bottom=h - 1;
  int right=w - 1;
  if (shouldFillGap(currentRun,tabIndex,x,y)) {
    g.translate(x,y);
    if (leftToRight) {
      g.setColor(getColorForGap(currentRun,x,y + 1));
      g.fillRect(1,0,5,3);
      g.fillRect(1,3,2,2);
    }
 else {
      g.setColor(getColorForGap(currentRun,x + w - 1,y + 1));
      g.fillRect(right - 5,0,5,3);
      g.fillRect(right - 2,3,2,2);
    }
    g.translate(-x,-y);
  }
  g.translate(x,y);
  g.setColor(darkShadow);
  if (leftToRight) {
    g.drawLine(1,5,6,0);
    g.drawLine(6,0,right,0);
    if (tabIndex == lastIndex)     g.drawLine(right,1,right,bottom);
    if (tabIndex != tabRuns[runCount - 1])     g.drawLine(0,0,0,bottom);
 else     g.drawLine(0,6,0,bottom);
  }
 else {
    g.drawLine(right - 1,5,right - 6,0);
    g.drawLine(right - 6,0,0,0);
    if (tabIndex != tabRuns[runCount - 1])     g.drawLine(right,0,right,bottom);
 else     g.drawLine(right,6,right,bottom);
    if (tabIndex == lastIndex)     g.drawLine(0,1,0,bottom);
  }
  if (!isSelected)   g.drawLine(0,bottom,right,bottom);
  g.setColor(isSelected ? selectHighlight : highlight);
  if (leftToRight) {
    g.drawLine(1,6,6,1);
    if (tabIndex == lastIndex)     g.drawLine(6,1,right - 1,1);
 else     g.drawLine(6,1,right,1);
    g.drawLine(1,6,1,bottom);
    if (tabIndex == firstIndex && tabIndex != tabRuns[runCount - 1]) {
      if (tabPane.getSelectedIndex() == tabRuns[currentRun + 1]) {
        g.setColor(selectHighlight);
      }
 else {
        g.setColor(highlight);
      }
      g.drawLine(1,0,1,4);
    }
  }
 else {
    g.drawLine(right - 1,6,right - 6,1);
    g.drawLine(right - 6,1,1,1);
    if (tabIndex == lastIndex)     g.drawLine(1,1,1,bottom);
 else     g.drawLine(0,1,0,bottom);
  }
  g.translate(-x,-y);
}

protected void paintTopTabBorder ( int tabIndex , Graphics g , int x , int y , int w , int h , int btm , int rght , boolean isSelected ) { int currentRun = getRunForTab ( tabPane . getTabCount ( ) , tabIndex ) ; int lastIndex = lastTabInRun ( tabPane . getTabCount ( ) , currentRun ) ; int firstIndex = tabRuns [ currentRun ] ; boolean leftToRight = CompiereUtils . isLeftToRight ( tabPane ) ; int bottom = h - 1 ; int right = w - 1 ; if ( shouldFillGap ( currentRun , tabIndex , x , y ) ) { g . translate ( x , y ) ; if ( leftToRight ) { g . setColor ( getColorForGap ( currentRun , x , y + 1 ) ) ; g . fillRect ( 1 , 0 , 5 , 3 ) ; g . fillRect ( 1 , 3 , 2 , 2 ) ; } else { g . setColor ( getColorForGap ( currentRun , x + w - 1 , y + 1 ) ) ; g . fillRect ( right - 5 , 0 , 5 , 3 ) ; g . fillRect ( right - 2 , 3 , 2 , 2 ) ; } g . translate ( - x , - y ) ; } g . translate ( x , y ) ; g . setColor ( darkShadow ) ; if ( leftToRight ) { g . drawLine ( 1 , 5 , 6 , 0 ) ; g . drawLine ( 6 , 0 , right , 0 ) ; if ( tabIndex == lastIndex ) g . drawLine ( right , 1 , right , bottom ) ; if ( tabIndex != tabRuns [ runCount - 1 ] ) g . drawLine ( 0 , 0 , 0 , bottom ) ; else g . drawLine ( 0 , 6 , 0 , bottom ) ; } else { g . drawLine ( right - 1 , 5 , right - 6 , 0 ) ; g . drawLine ( right - 6 , 0 , 0 , 0 ) ; if ( tabIndex != tabRuns [ runCount - 1 ] ) g . drawLine ( right , 0 , right , bottom ) ; else g . drawLine ( right , 6 , right , bottom ) ; if ( tabIndex == lastIndex ) g . drawLine ( 0 , 1 , 0 , bottom ) ; } if ( ! isSelected ) g . drawLine ( 0 , bottom , right , bottom ) ; g . setColor ( isSelected ? selectHighlight : highlight ) ; if ( leftToRight ) { g . drawLine ( 1 , 6 , 6 , 1 ) ; if ( tabIndex == lastIndex ) g . drawLine ( 6 , 1 , right - 1 , 1 ) ; else g . drawLine ( 6 , 1 , right , 1 ) ; g . drawLine ( 1 , 6 , 1 , bottom ) ; if ( tabIndex == firstIndex && tabIndex != tabRuns [ runCount - 1 ] ) { if ( tabPane . getSelectedIndex ( ) == tabRuns [ currentRun + 1 ] ) { g . setColor ( selectHighlight ) ; } else { g . setColor ( highlight ) ; } g . drawLine ( 1 , 0 , 1 , 4 ) ; } } else { g . drawLine ( right - 1 , 6 , right - 6 , 1 ) ; g . drawLine ( right - 6 , 1 , 1 , 1 ) ; if ( tabIndex == lastIndex ) g . drawLine ( 1 , 1 , 1 , bottom ) ; else g . drawLine ( 0 , 1 , 0 , bottom ) ; } g . translate ( - x , - y ) ; }
paint top tab border
