|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.barracuda.core.comp.AbstractTableModel
This class provides the abstract implementation for a Table Model.
Note: this interface is designed to be used to ways. You can either implement to return a specific number of rows/cols (in which case hasMoreXXX() methods should return false) OR you can implement using the hasMoreXXX() methods (in which case the getColumnCount(), getRowCount() methods should return -1.
The getXXXCount() method is more like the Swing JTable interface; the hasMoreXXX() method makes it easier to implement tables where you don't know the total number of records when you start.
Classes implementing this interface should generally support both methods: in other words, for every row/column, invoke the getItemAt() method, then while the model has more rows/columns, it should again invoke getItemAt().
Field Summary | |
protected List |
listeners
|
protected ViewContext |
viewContext
|
Constructor Summary | |
AbstractTableModel()
|
Method Summary | |
void |
addModelListener(ModelListener ml)
Add a listener to the template that's notified each time a change to the data model occurs. |
void |
fireModelChanged()
Forwards the given notification event to all TemplateModelListeners that registered
themselves as listeners for this template model. |
ViewContext |
getViewContext()
Get the current ViewContext |
void |
removeModelListener(ModelListener ml)
Remove a listener |
void |
resetModel()
Reset the model to its initial (unprocessed) state. |
void |
setViewContext(ViewContext ivc)
Specify the ViewContext. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.enhydra.barracuda.core.comp.TableModel |
getColumnCount, getItemAt, getRowCount |
Field Detail |
protected ViewContext viewContext
protected List listeners
Constructor Detail |
public AbstractTableModel()
Method Detail |
public void addModelListener(ModelListener ml)
addModelListener
in interface Model
ml
- the TemplateModelListenerpublic void removeModelListener(ModelListener ml)
removeModelListener
in interface Model
ml
- the TemplateModelListenerpublic void fireModelChanged()
TemplateModelListeners
that registered
themselves as listeners for this template model.
public void resetModel()
resetModel
in interface TableModel
public void setViewContext(ViewContext ivc)
setViewContext
in interface Contextual
ivc
- the current ViewContextpublic ViewContext getViewContext()
getViewContext
in interface Contextual
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |