Last active
November 4, 2019 07:27
-
-
Save libliboom/cad879f657762f4f417c37e7a390bb58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GraphicEditor { | |
... | |
public void mouseDown() { | |
tool.mouseDown(this); | |
} | |
... | |
} | |
class RectangleTool { | |
... | |
public void mouseDown(GraphicEditor editor) { | |
editor.add(new RectangleTool()); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment