MODULE; IMPORT ColorName, DotsView, PaintOp, RectsVBT, Sort, View, ZeusPanel; REVEAL T = DotsView.T BRANDED OBJECT OVERRIDES setPosition := SticksSetPosition; END; PROCEDURE SticksView SticksSetPosition (<* UNUSED *> view : T; rects: RectsVBT.T; i : CARDINAL; val : Sort.Key ) = BEGIN RectsVBT.Position(rects, i, FLOAT(i) - 0.5, 0.5, FLOAT(i) + 0.5, FLOAT(val) + 0.5) END SticksSetPosition; VAR color: PaintOp.T; PROCEDURENew (): View.T = BEGIN RETURN NEW(T).init(color) END New; <* FATAL ColorName.NotFound *> BEGIN WITH rgb = ColorName.ToRGB("Blue") DO color := PaintOp.FromRGB(rgb.r, rgb.g, rgb.b) END; ZeusPanel.RegisterView (New, "Sticks", "Sort"); END SticksView.