|
org.netbeans.spi.viewmodel/2 1.12.1 | |||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
See:
Description
| TreeTableView Model | |
|---|---|
| org.netbeans.spi.viewmodel | Defines API for sharing of Tree Table View. |
Support for tree table view. The view is described via models - TreeModel, TableModel and NodeModel. Filters can be applied to each model - TreeModelFilter, TableModelFilter and NodeModelFilter. The view listens on changes in the models and filters and updates itself accordingly.
Add ability to in-place rename and copy/paste functionality to nodes
in debugger views. Also, the models needs to have a way to provide
an icon with arbitrary extension. Therefore following methods are
provided with new ExtendedNodeModel and ExtendedNodeModelFilter interfaces
and are also added into CompoundModel:
canRename(), canCopy(), canCut(),
clipboardCopy(), clipboardCut(), getPasteTypes(),
setName(), getIconBaseWithExtension().
In order to be able to provide mnemonics for columns in tree table views,
Character ColumnModel.getDisplayedMnemonic() method was
added to ColumnModel class.
In order to have a help ID defined for the GUI component that is
created from the compound model, it's necessary to be able to set
that help ID on the compound model instance.
Two methods are added for that purpose:
CompoundModel Models.createCompoundModel (List, String)
and String CompoundModel.getHelpId().
NodeChanged events need to distinguish what node property has changed. Mask constant were added for display name, icon, short description and children properties. By default, mask that aggregates all these properties is used - to assure compatibility.
NB4.0 version of ViewModelAPI had several event firing related issues: 1) It supported two types of changes only: i) whole tree has been changed notification ii) node and all subnodes change notification There where no support for small grained changes (one table cell change). 2) The same listener type (TreeModelListener) has been used for all model types (TreeModel, NodeModel, ...) 3) There was no TreeModelEvent, so evolving of this api was problematic. I have done folowing incompatible api change, to fix this problem: 1) TreeModelListener has been renamed to ModelListener (Because its used for other models too). 2) ModelEvent class has been added. 3) Two methods removed from TreeModelListener: public void treeNodeChanged (Object node); public void treeNodeChanged (TreeModelEvent event); and replaced by folowing method: public void modelChanged (ModelEvent event); 4) three innerclasses added to ModelEvent TreeChanged TableValueChanged NodeChanged These three innerclasses are designed to support firing of all kinds of model changes. TreeChanged - Designed to notify about chages of whole tree content / structure. This event has no parameters. TableValueChanged - Designed to notify about chages of one cell in table. Two parameters: Object row, String columnID NodeChanged - Designed to notify about chages of one node - icon and display name. One parameter: Object node.
|
The sources for the module are in NetBeans CVS in debuggercore/viewmodel directory.
Read more about the implementation in the answers to architecture questions.
|
org.netbeans.spi.viewmodel/2 1.12.1 | |||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||