コード例 #1
0
 protected Color computeForeground(Component renderer, ComponentAdapter adapter) {
   Color seed = getColumnForeground(adapter.getColumnName(adapter.column));
   if (seed == null) {
     seed = foreground == null ? adapter.getComponent().getForeground() : foreground;
   }
   return adapter.isSelected() ? computeSelectedForeground(seed) : seed;
 }
コード例 #2
0
 protected Color computeBackground(Component renderer, ComponentAdapter adapter) {
   Color seed = getColumnBackground(adapter.getColumnName(adapter.column));
   if (seed == null) {
     seed = (adapter.row % 2) == 0 ? oddRowBackground : evenRowBackground;
   }
   if (seed == null) {
     seed = background == null ? adapter.getComponent().getBackground() : background;
   }
   return adapter.isSelected() ? computeSelectedBackground(seed) : seed;
 }
コード例 #3
0
 protected void applyFont(Component renderer, ComponentAdapter adapter) {
   Font font = getColumnFont(adapter.getColumnName(adapter.column));
   if (font != null) {
     renderer.setFont(font);
   }
 }