net.sf.freecol.client.gui.panel
Class AdvantageCellRenderer
java.lang.Object
net.sf.freecol.client.gui.panel.AdvantageCellRenderer
- All Implemented Interfaces:
- javax.swing.table.TableCellRenderer
public final class AdvantageCellRenderer
- extends java.lang.Object
- implements javax.swing.table.TableCellRenderer
A table cell renderer that should be used to display the chosen nation in a table.
It is being used in the players table (StartGamePanel).
Method Summary |
java.awt.Component |
getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the component used to render the cell's value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdvantageCellRenderer
public AdvantageCellRenderer(NationOptions.Advantages advantages)
- The default constructor.
getTableCellRendererComponent
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
- Returns the component used to render the cell's value.
- Specified by:
getTableCellRendererComponent
in interface javax.swing.table.TableCellRenderer
- Parameters:
table
- The table whose cell needs to be rendered.value
- The value of the cell being rendered.hasFocus
- Indicates whether or not the cell in question has focus.row
- The row index of the cell that is being rendered.column
- The column index of the cell that is being rendered.
- Returns:
- The component used to render the cell's value.