Interface ModelListener
public interface ModelListener
Listens to changes in a model.
-
Method Summary
Modifier and TypeMethodDescriptionvoidmodelChanged(MTCompleteModel model, boolean valueAdjusting, MTRemoteChangeHandler errorHandler) Deprecated.This method is deprecated since this interface will be replaced in later versions with listener methods that allow more fine-grained control of the changes made to the model.booleansupportsModel(ModelType modelType) Returns true if this listener is interested in changes in models of a given type.
-
Method Details
-
supportsModel
Returns true if this listener is interested in changes in models of a given type.- Parameters:
modelType- The model type.- Returns:
- true to listen for changes in the given model type.
-
modelChanged
@Deprecated void modelChanged(MTCompleteModel model, boolean valueAdjusting, MTRemoteChangeHandler errorHandler) Deprecated.This method is deprecated since this interface will be replaced in later versions with listener methods that allow more fine-grained control of the changes made to the model.Gets notified when changes are made to a model.- Parameters:
model- The model that has been changed.valueAdjusting- Returns true for operations that are ongoing, such as moving/resizing vertices. Listener implementations might want to hold of on reacting to the changes until this returns false.errorHandler- The editor's error handler. This can be used when making changes and saving vertices/edges in the model.- Throws:
IllegalArgumentException- If called with a model where supportsModel(model.getType()) == false.
-