Copyright (C) 2000, 2001, Geert Vernaeve. All Rights Reserved. |
This class manages a Component tree, which is the visual representation of a Formula. It receives input events from the user, and adjusts the Formula accordingly. Note that this is not only a View in the pure sense of the word, but a wrapper around a tree of Views. These views recieve "I'm modified in this and this" messages from the formula (Part objects) and adjust the Component tree accordingly. |
key: part, value: component |
If the given part has already made a view, return it from the internal hashtable. Else, create the view using p.createView() and store it in the hashtable. |
Return relative position of comp (which is supposed to be a (sub(sub...))child of this FormulaView) to this FormulaView. |
If a Component returns true on mousePressed(), it handles mouse drags all by itself. Else, the system will draw a selection rectangle. |
Is this formula view busy replace()ing? Used by former versions of Identifier.deactivate() (they tried to recognizeOp() but only when isReplacing() returns false in order to avoid recursion situations). When this method returns true, deactivate() or activate() should not touch the formula tree structure (i.e. don't add or replace elements). |
This method is very slow if the view is not implementing View. |
Component to be replaced (me ) must be
in the Component tree. |
return true if something happened return false if we cannot handle the key press. |
Components in the tree can use this method to find their containing FormulaView. |
Look if p is inside the area, then recursively look in all of its children |
Return a vector of Parts that are inside the designated rectangle |
Insert keypress to the left or right of this Part Here, special keys will be recognized and acted upon accordingly, e.g. typing '(' inserts a new Brackets part, etc |
Insert a keypress to the left of this Part |
Insert a keypress to the right of this Part |