jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
changeset 43076 a2d90fcf0a70
parent 39531 c13b7a0588cd
child 43077 785bbcd9812a
equal deleted inserted replaced
43075:668b6d00cc79 43076:a2d90fcf0a70
  2016         if (table.getShowHorizontalLines()) {
  2016         if (table.getShowHorizontalLines()) {
  2017             int tableWidth = damagedArea.x + damagedArea.width;
  2017             int tableWidth = damagedArea.x + damagedArea.width;
  2018             int y = damagedArea.y;
  2018             int y = damagedArea.y;
  2019             for (int row = rMin; row <= rMax; row++) {
  2019             for (int row = rMin; row <= rMax; row++) {
  2020                 y += table.getRowHeight(row);
  2020                 y += table.getRowHeight(row);
  2021                 g.drawLine(damagedArea.x, y - 1, tableWidth - 1, y - 1);
  2021                 SwingUtilities2.drawHLine(g, damagedArea.x, tableWidth - 1, y - 1);
  2022             }
  2022             }
  2023         }
  2023         }
  2024         if (table.getShowVerticalLines()) {
  2024         if (table.getShowVerticalLines()) {
  2025             TableColumnModel cm = table.getColumnModel();
  2025             TableColumnModel cm = table.getColumnModel();
  2026             int tableHeight = damagedArea.y + damagedArea.height;
  2026             int tableHeight = damagedArea.y + damagedArea.height;
  2028             if (table.getComponentOrientation().isLeftToRight()) {
  2028             if (table.getComponentOrientation().isLeftToRight()) {
  2029                 x = damagedArea.x;
  2029                 x = damagedArea.x;
  2030                 for (int column = cMin; column <= cMax; column++) {
  2030                 for (int column = cMin; column <= cMax; column++) {
  2031                     int w = cm.getColumn(column).getWidth();
  2031                     int w = cm.getColumn(column).getWidth();
  2032                     x += w;
  2032                     x += w;
  2033                     g.drawLine(x - 1, 0, x - 1, tableHeight - 1);
  2033                     SwingUtilities2.drawVLine(g, x - 1, 0, tableHeight - 1);
  2034                 }
  2034                 }
  2035             } else {
  2035             } else {
  2036                 x = damagedArea.x;
  2036                 x = damagedArea.x;
  2037                 for (int column = cMax; column >= cMin; column--) {
  2037                 for (int column = cMax; column >= cMin; column--) {
  2038                     int w = cm.getColumn(column).getWidth();
  2038                     int w = cm.getColumn(column).getWidth();
  2039                     x += w;
  2039                     x += w;
  2040                     g.drawLine(x - 1, 0, x - 1, tableHeight - 1);
  2040                     SwingUtilities2.drawVLine(g, x - 1, 0, tableHeight - 1);
  2041                 }
  2041                 }
  2042             }
  2042             }
  2043         }
  2043         }
  2044     }
  2044     }
  2045 
  2045