java.lang.Object
provided.basicVisitorFW.visitors.Visitor2
- All Implemented Interfaces:
IVisitor
A visitor that sets the paint cmd in the VisitorDemoModel to a cmd that draws various shapes.
The params is assumed to be a single value, a reference to a function that takes a function that takes a Graphics object.
That is, param[0] = a Consumer<Consumer<Graphics>> object. This function will install the given Consumer<Graphics>
function into the model. The view calls to the model to use the installed command when painting.
When the host is a HostA, the installed Consumer<Graphics> draws a blue oval on the screen.
When the host is a HostB, the installed Consumer<Graphics> draws a red rectangle on the screen.
When the host is a HostC, the installed Consumer<Graphics> draws a green rounded rectangle on the screen.
Returns a string saying what it did.
- Author:
- swong
-
Field Summary
Fields inherited from interface provided.basicVisitorFW.IVisitor
NULL_VISITOR
-
Constructor Summary
Constructors -
Method Summary