net.sf.doolin.gui.field.table.style
Class AlternateColorTableStyle

java.lang.Object
  extended by net.sf.doolin.gui.field.table.style.AlternateColorTableStyle
All Implemented Interfaces:
TableStyle

public class AlternateColorTableStyle
extends Object
implements TableStyle

Style that alternates colors between rows.

Author:
Damien Coraboeuf

Constructor Summary
AlternateColorTableStyle()
           
 
Method Summary
 Color getEvenRowColor()
          Gets the even row color.
 Color getOddRowColor()
          Gets the odd row color.
 Style getStyle(Object item, JTable table, int row, int column)
          Gets the style to apply on the table.
 void setEvenRowColor(Color evenRowColor)
          Sets the even row color.
 void setOddRowColor(Color oddRowColor)
          Sets the odd row color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlternateColorTableStyle

public AlternateColorTableStyle()
Method Detail

getStyle

public Style getStyle(Object item,
                      JTable table,
                      int row,
                      int column)
Gets the style to apply on the table.

Specified by:
getStyle in interface TableStyle
Parameters:
item - Item associated to the row
table - Table
row - Row index
column - Column index
Returns:
Style to apply

getEvenRowColor

public Color getEvenRowColor()
Gets the even row color.

Returns:
the even row color

setEvenRowColor

public void setEvenRowColor(Color evenRowColor)
Sets the even row color.

Parameters:
evenRowColor - the new even row color

getOddRowColor

public Color getOddRowColor()
Gets the odd row color.

Returns:
the odd row color

setOddRowColor

public void setOddRowColor(Color oddRowColor)
Sets the odd row color.

Parameters:
oddRowColor - the new odd row color


Copyright © 2011. All Rights Reserved.