|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.table.styles.DefaultStyle
public class DefaultStyle
DefaultStyle is a Style implementation that paints alternate rows of a table with different colors.
| Field Summary | |
|---|---|
protected Color |
evenColor
the background color for even rows |
protected Color |
oddColor
the background color for odd rows |
| Constructor Summary | |
|---|---|
DefaultStyle()
Constructs a DefaultStyle. |
|
DefaultStyle(Color oddColor,
Color evenColor)
Constructs a DefaultStyle. |
|
| Method Summary | |
|---|---|
void |
apply(Component c,
JTable table,
int row,
int column)
Applies the style to the component c. |
Color |
getEvenColor()
Returns the color used to paint the even rows of the table. |
Color |
getOddColor()
Returns the color used to paint the odd rows of the table. |
void |
setEvenColor(Color evenColor)
Sets the color for painting the even rows of the table. |
void |
setOddColor(Color oddColor)
Sets the color for painting the odd rows of the table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Color oddColor
protected Color evenColor
| Constructor Detail |
|---|
public DefaultStyle()
public DefaultStyle(Color oddColor,
Color evenColor)
| Method Detail |
|---|
public void apply(Component c,
JTable table,
int row,
int column)
apply in interface Stylec - the component that we wish to apply a style to.table - the associated tablerow - the current row of the tablecolumn - the current column of the tablepublic Color getEvenColor()
public Color getOddColor()
public void setEvenColor(Color evenColor)
evenColor - the even row colorpublic void setOddColor(Color oddColor)
oddColor - the odd row color
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||