notes107 - CS 251 Notes Feb 4, 6 ,8 Lab 2 Undo Boilerdraw...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 2 Undo Boilerdraw Graphic Editor BoilerDrawMain ---> BoilerDrawUndoListener ---> BoilerDraw Frontend Filter Graphics Editor Generates mouseDragged(x,y) Events mousePressed(x,y) Mouse mouseReleased(x,y) Keyboard menuOption(option) Pull down menu openFile(filename) SaveFile(filename) AddText(text) BoilerDrawUndoListener currently prints a message and calls the equivalent function every time one of the functions above is called. How are you going to implement Undo -add code to BoilerDrawUndoListener to -store the method invocation in a double linked list ->mouse X->menu option->mouse X(current)->null when menuOption(“undo”) is called -don’t pass this to BoilerDraw -clear Screen call _bDraw -> menuOption(“”) -replay the calls up to one node before current -make current point to previous node ->mouse X->menu option(current)->mouse X->null Hints 1. You may use List.java + ListNode.java already provided 2. Create different subclasses of ListNode for each call that needs to be replaced
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/02/2012 for the course CS 251 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 6

notes107 - CS 251 Notes Feb 4, 6 ,8 Lab 2 Undo Boilerdraw...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online