ks.common.view
Interface RectangleHierarchyVisitor

All Known Implementing Classes:
BackgroundCopier

public interface RectangleHierarchyVisitor

Employ Visitor Pattern to enable specific invocations at each Leaf in the RectangleHierarchy.

Note: Internal nodes (with children) are not involved in any drawing


Method Summary
 void setVisible(boolean visible)
          If a RectangleHierarchyVisitor performs actions of an asynchronous nature, it needs to be told to stop.
 void visit(RectangleHierarchy node)
          Visit a node in the hierarchy.
 void visit(RectangleHierarchy node, java.awt.Rectangle clip)
          Visit a node in the hierarchy.
 

Method Detail

setVisible

public void setVisible(boolean visible)
If a RectangleHierarchyVisitor performs actions of an asynchronous nature, it needs to be told to stop. The simplest way to do this, is to assume someone may want to setVisible (false) once done.

This is called by external entity who knows when the visitor will no longer be needed.


visit

public void visit(RectangleHierarchy node)
Visit a node in the hierarchy.

Parameters:
node - node withiin RectangleHierarchy.

visit

public void visit(RectangleHierarchy node,
                  java.awt.Rectangle clip)
Visit a node in the hierarchy.

All drawing must be clipped to given clip rectangle. [clip is unaffected by this invocation.]

Parameters:
node - node within RectangleHierarchy.
clip - Rectangle to which all drawing is to be clipped.