This method is called, whenever the underlying
NodeModel
has changed. Hence, in this method the data to be visualized is retrieved from the NodeModel
. Then the data is interpreted by the view, i.e. converted in a component or drawn. The NodeModel
is accessible via the getNodeModel
method. If you have to call this method frequently you can override this method and have your derived NodeModel
as the return type of the overridden method.
Example #1:
protected void
modelChanged() {
ExampleNodeModel nodeModel = (ExampleNodeModel)getNodeModel();
// retrieve the data to visualize...
Object viewModel = nodeModel.getViewModel();
// set it to spacialized panel implementation
// to interprete the model and visualize it
m_panel.visualizeModel(viewModel);
}