Created
November 14, 2012 02:44
-
-
Save windy1/4069976 to your computer and use it in GitHub Desktop.
WindowHolder
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 WindowHolder extends EntityComponent { | |
final DefaultWindow defaultWindow = new DefaultWindow(); | |
Window activeWindow = defaultWindow; | |
Window getActiveWindow() { | |
return activeWindow; | |
} | |
DefaultWindow getDefaultWindow() { | |
return defaultWindow; | |
} | |
void openWindow(Window window) { | |
activeWindow = window; | |
window.open(); | |
} | |
void closeWindow() { | |
activeWindow.close(); | |
activeWindow = defaultWindow; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment