ks.common.view
Class BackgroundCopier

java.lang.Object
  extended byks.common.view.BackgroundCopier
All Implemented Interfaces:
RectangleHierarchyVisitor

public class BackgroundCopier
extends java.lang.Object
implements RectangleHierarchyVisitor

Manages the responsibility of filling rectangles that need refreshing into a specific graphics context object using a particular color.

Default Skin for a container; simply copies a known color everywhere.


Constructor Summary
BackgroundCopier(java.awt.Graphics g, java.awt.Color c)
          BackgroundCopier constructor comment.
 
Method Summary
 void setVisible(boolean visible)
          Visitor's chance to release resources once done.
 void visit(RectangleHierarchy node)
          Copy the appropriate image as based by this node's value.
 void visit(RectangleHierarchy node, java.awt.Rectangle clip)
          Copy the appropriate image as based by this node's value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundCopier

public BackgroundCopier(java.awt.Graphics g,
                        java.awt.Color c)
BackgroundCopier constructor comment.

Parameters:
g - Graphics
c - java.awt.Color
Method Detail

setVisible

public void setVisible(boolean visible)
Visitor's chance to release resources once done.

Specified by:
setVisible in interface RectangleHierarchyVisitor
Parameters:
visible - boolean

visit

public void visit(RectangleHierarchy node)
Copy the appropriate image as based by this node's value.

Specified by:
visit in interface RectangleHierarchyVisitor
Parameters:
node - node within RectangleHierarchy being visited.

visit

public void visit(RectangleHierarchy node,
                  java.awt.Rectangle clip)
Copy the appropriate image as based by this node's value. Use clip as a truncating clipping region.

clip is unaffected by this method.

In V2.1 fixed defect with child nodes not being pass clip region.

Specified by:
visit in interface RectangleHierarchyVisitor
Parameters:
node - node within RectangleHierarchy being visited.
clip - Rectangle to which all drawing is to be clipped.