|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.swing.MapListModelHelper
Common helper class for Table and TreeTable models of List of Maps. The helper knows about title conversion, being given columns from outside, and how to collect columns from given Maps. There is, however no real storage for the data and none of the usual access methods for each of the models. This class is therefore not derived from the models themselves.
MapListTableModel
Field Summary | |
private static java.lang.Object |
CCDUMMY
|
private java.util.List |
colclasses
|
private boolean |
colclassincomplete
|
private int |
colcount
|
private java.util.List |
coledit
|
private java.util.List |
coleditorname
|
private java.util.List |
colentries
|
private java.util.List |
colname
|
private java.util.List |
colrenderername
|
private java.util.List |
colsortreplaces
|
private boolean |
evaluatecolonset
|
private java.util.ResourceBundle |
rb
|
private java.lang.String |
rbprefix
|
private boolean |
structurechanged
|
Constructor Summary | |
MapListModelHelper()
Standard empty constructor. |
|
MapListModelHelper(java.util.ResourceBundle rbx)
Constructor passing a ResourceBundle. |
|
MapListModelHelper(java.util.ResourceBundle rbx,
java.lang.String[] hdr)
Constructor with a ResourceBundle and the column titles. |
|
MapListModelHelper(java.util.ResourceBundle rbx,
java.lang.String prefix,
java.lang.String[] hdr)
Constructor with a ResourceBundle, a prefix and the column titles. |
|
MapListModelHelper(java.lang.String[] hdr)
Constructor with column titles setting. |
Method Summary | |
private void |
appendNewKey(java.lang.Object thiskey,
java.lang.Object defaultclass)
Appends new column data. |
private void |
checkCCIncompl()
Checks whether all column object classes are known or not. |
void |
clearHeader()
Clears the header completely. |
void |
defaultLocaleChanged()
Called if any locale changes. |
private void |
evalRB(boolean full)
|
private java.lang.Object |
getColclassWithRB(java.lang.Object okey,
java.lang.Object defaultobj)
Get column class. |
private java.lang.Boolean |
getColeditWithRB(java.lang.Object okey)
Get the editability. |
private java.lang.String |
getColnameWithRB(java.lang.Object okey)
Get column name (= header). |
private java.lang.String |
getColRendererOrEditorWithRB(java.lang.Object okey,
boolean editor)
Returns class name for cell renderer or cell editor for a certain column key from the resources. |
private java.lang.String |
getColsortreplaceWithRB(java.lang.Object okey)
Get sorting key for column. |
java.lang.Class |
getColumnClass(int column)
Return column class. |
int |
getColumnCount()
Return number of columns known to the model helper |
java.lang.String |
getColumnEditorClassName(int column)
Returns the column editor class for a certain column. |
int |
getColumnIndex(java.lang.String name)
Return index of column with given name. |
int |
getColumnIndexBySortReplace(java.lang.String sortkey)
Get a column index by the sortreplace key value. |
java.lang.String |
getColumnKey(int index)
Return key of colunm with given index. |
java.lang.String |
getColumnName(int column)
Return symbolic name of a column |
java.lang.String |
getColumnRendererClassName(int column)
Returns the column renderer class for a certain column. |
java.lang.String |
getColumnSortReplace(int column)
Return column's sort replace value. |
java.lang.Object |
getColumnValue(java.util.Map m,
int column)
Return content of specific column for a Map |
java.util.ResourceBundle |
getResourceBundle()
Returns the ResourceBundle used by the ModelHelper |
java.lang.String |
getResourcePrefix()
Returns the keys' prefix used for all resources read from the ResourceBundle |
void |
handleNewMap(java.util.Map m)
Works on new Maps as they arrive in the model. |
boolean |
isColumnEditable(int column)
Return whether column is editable |
boolean |
isHeaderSet()
Returns whether the header has been set. |
void |
resetStructureChange()
Forget all structure changes |
boolean |
setColumnValue(java.lang.Object value,
java.util.Map m,
int column)
Set content of specific column for a Map and return whether something has changed |
void |
setHeader(java.lang.Object[] hdr)
Set header. |
void |
setResourceBundle(java.util.ResourceBundle rbx)
Sets ResourceBundle from which column titles are acquired without changing the prefix. |
void |
setResourceBundle(java.util.ResourceBundle rbx,
java.lang.String prefix)
Sets ResourceBundle from which column titles are acquired. |
boolean |
structureChanged()
Return if any structure changes occured. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.lang.Object CCDUMMY
private int colcount
private boolean colclassincomplete
private java.util.List colentries
private java.util.List colname
private java.util.List coledit
private java.util.List colclasses
private java.util.List colsortreplaces
private java.util.List colrenderername
private java.util.List coleditorname
private boolean evaluatecolonset
private java.util.ResourceBundle rb
private java.lang.String rbprefix
private boolean structurechanged
Constructor Detail |
public MapListModelHelper()
public MapListModelHelper(java.util.ResourceBundle rbx)
public MapListModelHelper(java.lang.String[] hdr)
public MapListModelHelper(java.util.ResourceBundle rbx, java.lang.String[] hdr)
public MapListModelHelper(java.util.ResourceBundle rbx, java.lang.String prefix, java.lang.String[] hdr)
Method Detail |
public void setResourceBundle(java.util.ResourceBundle rbx, java.lang.String prefix)
rbx
- The ResourceBundle to read column titles fromprefix
- Prefix prepended to each Map key nameprivate void evalRB(boolean full)
public void setResourceBundle(java.util.ResourceBundle rbx)
public java.util.ResourceBundle getResourceBundle()
public java.lang.String getResourcePrefix()
public void setHeader(java.lang.Object[] hdr)
public void clearHeader()
public boolean isHeaderSet()
public void resetStructureChange()
public boolean structureChanged()
public void handleNewMap(java.util.Map m)
private java.lang.String getColnameWithRB(java.lang.Object okey)
private java.lang.Object getColclassWithRB(java.lang.Object okey, java.lang.Object defaultobj)
private java.lang.Boolean getColeditWithRB(java.lang.Object okey)
<prefix><columnname>.edit=true
private java.lang.String getColsortreplaceWithRB(java.lang.Object okey)
private java.lang.String getColRendererOrEditorWithRB(java.lang.Object okey, boolean editor)
okey
- Key, i.e. map key nameeditor
- Flag whether the editor widget name or the renderer widget name should be returned
private void appendNewKey(java.lang.Object thiskey, java.lang.Object defaultclass)
private void checkCCIncompl()
public int getColumnIndex(java.lang.String name)
public java.lang.String getColumnKey(int index)
public int getColumnCount()
public java.lang.Object getColumnValue(java.util.Map m, int column)
public boolean setColumnValue(java.lang.Object value, java.util.Map m, int column)
value
- New value to setm
- Map to operate oncolumn
- numeric index of the column to change
public java.lang.String getColumnName(int column)
public java.lang.Class getColumnClass(int column)
public boolean isColumnEditable(int column)
public java.lang.String getColumnSortReplace(int column)
public java.lang.String getColumnRendererClassName(int column)
column
- Index of the column in question
public java.lang.String getColumnEditorClassName(int column)
column
- Index of the column in question
public int getColumnIndexBySortReplace(java.lang.String sortkey)
public void defaultLocaleChanged()
DefaultLocaleChangeReceiver
defaultLocaleChanged
in interface DefaultLocaleChangeReceiver
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |