multivalent.devel.lens

Class MyLens

public class MyLens extends Lens

Template to use in writing a new lens.

Version: $Revision: 1.3 $ $Date: 2003/06/02 05:16:32 $

Method Summary
booleanappearance(Context cx, boolean all)
Effect: Context attributes and signals.
voidclose()
Removes from LensMan.
voiddestroy()
booleaneventAfter(AWTEvent e, Point rel, Node obsn)
Lenses that warp coordinates should replicate that here.
booleanpaintAfter(Context cx, Node node)
Effect: arbitrary drawing on top.
booleanpaintBefore(Context cx, Node node)
Effect: Graphics2D transformation matrix.
voidrestore(ESISNode n, Map<String,Object> attr, Layer layer)
ESISNodesave()
booleansemanticEventAfter(SemanticEvent se, String msg)
Catch corresponding VFrame's windowClosed, windowRaised, ....

Method Detail

appearance

public boolean appearance(Context cx, boolean all)
Effect: Context attributes and signals.

Returns: false so it composes with other lenses

See Also: ContextListener SignalLens

close

public void close()
Removes from LensMan.

destroy

public void destroy()

eventAfter

public boolean eventAfter(AWTEvent e, Point rel, Node obsn)
Lenses that warp coordinates should replicate that here. Event recieved only if event coordinates fall within lens bounds.

paintAfter

public boolean paintAfter(Context cx, Node node)
Effect: arbitrary drawing on top. Can even traverse tree for special effects (that don't compose with other lenses). Warning: this type of effects don't compose as well with other lenses.

Returns: false so it composes with other lenses

See Also: Ruler Bounds Cypher

paintBefore

public boolean paintBefore(Context cx, Node node)
Effect: Graphics2D transformation matrix.

See Also: Magnify

restore

public void restore(ESISNode n, Map<String,Object> attr, Layer layer)

save

public ESISNode save()

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)
Catch corresponding VFrame's windowClosed, windowRaised, ....