Multivalent API

multivalent.std.lens
Class Cypher

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Behavior
          extended by multivalent.std.lens.Lens
              extended by multivalent.std.lens.Cypher
All Implemented Interfaces:
ContextListener

public class Cypher
extends Lens

(De)Greek/Cyrillic lens: translate Greek characters to Latin equivalents. (De)Cypher lens: Rot-13, Caesar, reverse, Pig Latin, alpha shift left/right, keyboard shift (McIntee cypher).

Semantic EventInDescription
rot13 this (lens handle)Rot-13
Caesar this (lens handle)letter+3, e.g., a=>d ("Rot-3")
reverse Reverse sequence of letters in word
Pig Latinthis (lens handle)Pig Latin decoding
alpha1 shift alphabet over one letter
alpha-1 shift alphabet left one letter
keyboard1key = key to right on keyboard (Mike McIntee cypher)

Version:
$Revision: 1.5 $ $Date: 2003/06/02 05:50:42 $

Field Summary
 
Fields inherited from class multivalent.std.lens.Lens
ATTR_HEIGHT, ATTR_TITLE, ATTR_WIDTH, ATTR_X, ATTR_Y, VAR_SHARED_LAYER, win_
 
Fields inherited from class multivalent.Behavior
ATTR_BEHAVIOR, name_
 
Fields inherited from class multivalent.VObject
attr_
 
Fields inherited from interface multivalent.ContextListener
LITTLE, LOT, PRIORITY_LENS, PRIORITY_MAX, PRIORITY_MIN, PRIORITY_SELECTION, PRIORITY_SPAN, PRIORITY_STRUCT, SOME
 
Constructor Summary
Cypher()
           
 
Method Summary
 boolean paintAfter(Context cx, Node node)
          Restores Graphics2D passed in paintBefore.
 boolean paintBefore(Context cx, Node node)
          Wraps Graphics2D with GraphicsCypher.
 boolean semanticEventAfter(SemanticEvent se, java.lang.String msg)
          Catch corresponding VFrame's windowClosed, windowRaised, ....
 boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
          Round robin distribution to all behaviors.
 
Methods inherited from class multivalent.std.lens.Lens
appearance, close, destroy, getContentBounds, getLensMan, getPriority, restore, save, show
 
Methods inherited from class multivalent.Behavior
buildAfter, buildBefore, checkRep, clipboardAfter, clipboardBefore, createUI, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, putPreference, redo, restoreChildren, setName, toString, undo
 
Methods inherited from class multivalent.VObject
attrEntrySetIterator, attrKeysIterator, clearAttributes, getAttr, getAttr, getAttributes, getGlobal, getValue, hasAttributes, putAttr, removeAttr, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cypher

public Cypher()
Method Detail

paintBefore

public boolean paintBefore(Context cx,
                           Node node)
Wraps Graphics2D with GraphicsCypher.

Overrides:
paintBefore in class Lens
Returns:
true to short-circuit to paintAfter at that node, bypassing painting of the subtree.
See Also:
Magnify

paintAfter

public boolean paintAfter(Context cx,
                          Node node)
Restores Graphics2D passed in paintBefore.

Overrides:
paintAfter in class Lens
Returns:
false so it composes with other lenses
See Also:
Ruler, Bounds, Cypher

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se,
                                   java.lang.String msg)
Description copied from class: Behavior
Round robin distribution to all behaviors. Message and clientData unpacked from SemanticEvent for convenience. Message is interned, so if you compare to a literal, you can use "==". Message can't be changed (it can be short-circuited out of), but client data can be mutated as it is passed along (so it's not passed as a parameter).

Overrides:
semanticEventBefore in class Behavior

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se,
                                  java.lang.String msg)
Description copied from class: Lens
Catch corresponding VFrame's windowClosed, windowRaised, ....

Overrides:
semanticEventAfter in class Lens

Multivalent API