|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norvelle.textcite.model.CitationCollection
public class CitationCollection
The CitationCollection implements the master list of Citations. It is based on TableModelAdaptee so that it can serve directly as the Model for the sorted JTable that the user manipulates.
Nested Class Summary | |
---|---|
static class |
CitationCollection.CitationCollectionConverter
CitationCollectionConverter is an inner class used for serializing CitationCollection objects via XStream. |
Constructor Summary | |
---|---|
CitationCollection()
The default constructor simply creates an AllCitationsFilter and assigns it as the current filter (meaning that by default, all Citation objects will be visible) |
Method Summary | |
---|---|
void |
addAdapter(TableModelAdapter adapter)
|
void |
addQuantityChangeListener(CitationQuantityChangeListener l)
Add a CitationQuantityChangeListener to be notified when the number of citations undergoes a change |
void |
checkCitationIntegrity()
Make sure that all Books in the collection are connected to Authors which know about the books. |
void |
clear()
Eliminate all Citation objects from the catalog |
Citation |
getCitationAtRow(int row)
Given a row number, return the Citation represented by that row in the currently filtered list of Citations |
Citation |
getCitationById(java.lang.Integer id)
Returns the Citation at the requested position, which translates into the requested position in the filteredCitations Vector. |
CitationSet |
getCitationSet()
|
int |
getColumnCount()
Queries the Citation object to find out how many columns it supports |
CitationSet |
getFilteredCitationSet()
|
int |
getRowCount()
Returns the number of rows *after* applying the current filter. |
int |
getSize()
Returns the total number of Citations in the list. |
java.lang.Object |
getValueAt(int row,
int column)
Given a numeric row and column value, return the value that corresponds to the location in the table model |
void |
notifyAdaptersOfDataChange()
Notify all TableModelAdapters that there has been a data change, and notify the primary CiteBook that the "needs save" flag should be set. |
void |
postLoad()
Upon loading a new CiteBook, this method needs to be called to regenerate transient data, such as the filtered citations and the various listeners, that don't get saved with the rest of the Citation data. |
void |
recreateAdapterCollection()
After loading a new file, the AdapterCollection (which is marked as transient) will not be recreated during the deserialization process. |
void |
refreshFilters()
Refreshes the currently applied filters |
void |
registerCitation(Citation citation)
Registers a new Citation in the list, and signals the JTable that the data has changed. |
void |
removeAdapter(TableModelAdapter adapter)
|
void |
removeAllFilters()
Removes all currently applied filters |
void |
removeFilter(CitationFilter filter)
Removing the current filter is equivalent to applying an AllCitationsFilter. |
void |
removeQuantityChangeListener(CitationQuantityChangeListener l)
|
void |
setFilter(CitationFilter filter)
Add a CitationFilter to the CitationCollection. |
void |
unregisterCitation(Citation citation)
Unregisters a Citation from the list, and signals the JTable that the data has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CitationCollection()
Method Detail |
---|
public void setFilter(CitationFilter filter)
filter
- The CitationFilter to be assigned.public void removeFilter(CitationFilter filter)
public void refreshFilters()
public void removeAllFilters()
public void registerCitation(Citation citation)
citation
- The new Citation object to be added to the table modelpublic void unregisterCitation(Citation citation)
citation
- The Citation object to be removed from the table modelpublic Citation getCitationById(java.lang.Integer id)
id
- The position of the Citation requested
public void clear()
public int getSize()
public int getColumnCount()
getColumnCount
in interface TableModelAdaptee
public int getRowCount()
getRowCount
in interface TableModelAdaptee
public java.lang.Object getValueAt(int row, int column)
getValueAt
in interface TableModelAdaptee
row
- The row of the requested Citation objectcolumn
- The column number of the data field requested from the Citation object.public Citation getCitationAtRow(int row)
row
- The row number of the Citation to return
public CitationSet getCitationSet()
public CitationSet getFilteredCitationSet()
public void addAdapter(TableModelAdapter adapter)
addAdapter
in interface TableModelAdaptee
public void removeAdapter(TableModelAdapter adapter)
removeAdapter
in interface TableModelAdaptee
public void recreateAdapterCollection()
recreateAdapterCollection
in interface TableModelAdaptee
public void notifyAdaptersOfDataChange()
public void addQuantityChangeListener(CitationQuantityChangeListener l)
public void removeQuantityChangeListener(CitationQuantityChangeListener l)
public void checkCitationIntegrity()
public void postLoad()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |