public class ViewUpdater extends Object
This class is used for limiting access to public methods of QuimP from external plugins. It prevents calling those methods in unchecked way.
Support bi-directional communication. Plugin can call: -# updateView() for updating view (and recalculating all plugins) -# getSnakeasXX() for current snake (only for previewing purposes).
Constructor and Description |
---|
ViewUpdater(Object ob)
Connect object to accessor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
connectSnakeObject(Snake snake)
Connect current snake (on current frame) to this object.
|
List<Point2d> |
getSnakeasPoints()
Request copy of connected snake for previewing purposes.
|
Snake |
getSnakeasSnake()
Request copy of connected snake for previewing purposes.
|
void |
updateView()
Calls updateView method from object ob.
|
public ViewUpdater(Object ob)
ob
- Objectprotected void connectSnakeObject(Snake snake)
Connected snake can be requested by plugins (always as copy)
snake
- Snake to be connected. I can be null when user e.g. deleted last objectpublic void updateView()
Also stores current plugin configuration locally in QuimP.
SnakePluginList
public List<Point2d> getSnakeasPoints()
public Snake getSnakeasSnake()
Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.