|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.salespointframework.desktop.teds.AbstractTableEntryDescriptor
org.salespointframework.desktop.teds.DefaultCatalogItemTED
org.salespointframework.desktop.teds.DefaultCurrencyItemTED
public class DefaultCurrencyItemTED
A TableEntryDescriptor that can be used to model Currencies with a
CatalogTableModel.
Essentially this is a DefaultCatalogItemTED that renders its value column using the Currency to
format the values.
| Field Summary | |
|---|---|
private Currency |
m_cCurrency
The Currency used for formatting. |
private javax.swing.table.TableCellRenderer |
m_tcrValueRenderer
The cell renderer that renders the value column. |
| Constructor Summary | |
|---|---|
DefaultCurrencyItemTED(Currency c)
Create a new DefaultCurrencyItemTED. |
|
| Method Summary | |
|---|---|
javax.swing.table.TableCellRenderer |
getCellRenderer(int nIdx)
Returns null to indicate that the default cell renderer is to be used based on the cell
value's class. |
java.lang.Class<?> |
getColumnClass(int nIdx)
Return the class of objects that make up the values of cells of the given column. |
protected javax.swing.table.TableCellRenderer |
getValueRenderer()
Internal helper function that gets (and if necessary creates) the cell renderer for the value column. |
| Methods inherited from class org.salespointframework.desktop.teds.DefaultCatalogItemTED |
|---|
getColumnCount, getColumnName, getValueAt |
| Methods inherited from class org.salespointframework.desktop.teds.AbstractTableEntryDescriptor |
|---|
canSortByColumn, getCellEditor, getColumnOrder, isElementEditable, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Currency m_cCurrency
private transient javax.swing.table.TableCellRenderer m_tcrValueRenderer
| Constructor Detail |
|---|
public DefaultCurrencyItemTED(Currency c)
c - the Currency used for formatting. Must be the same as the Currency modelled by the associated
CatalogTableModel.| Method Detail |
|---|
protected javax.swing.table.TableCellRenderer getValueRenderer()
public java.lang.Class<?> getColumnClass(int nIdx)
TableEntryDescriptorTableEntryDescriptor.getCellEditor(int) and
TableEntryDescriptor.getCellRenderer(int).
getColumnClass in interface TableEntryDescriptorgetColumnClass in class DefaultCatalogItemTEDnIdx - the index of the column for which to return the value class. Indices run from 0 to
getColumnCount() - 1.
String.class for the first, NumberValue.class for the second
column.public javax.swing.table.TableCellRenderer getCellRenderer(int nIdx)
AbstractTableEntryDescriptornull to indicate that the default cell renderer is to be used based on the cell
value's class.
getCellRenderer in interface TableEntryDescriptorgetCellRenderer in class AbstractTableEntryDescriptornIdx - the index of the column for which to return the renderer. Indices run from 0 to
getColumnCount() - 1.
null for the first, getValueRenderer() for the second column.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||