Package ch.epfl.cs107.play.window
Interface Window
- All Superinterfaces:
Attachable,Audio,Canvas,Positionable
- All Known Implementing Classes:
SwingWindow
Represents a context frame, which can act as a canvas.
Moreover, the camera can be attached to any positionable entity.
-
Method Summary
Methods inherited from interface ch.epfl.cs107.play.math.Attachable
getParent, getRelativeTransform, setParent, setRelativeTransformMethods inherited from interface ch.epfl.cs107.play.window.Audio
getSound, isSoundSupported, playSoundMethods inherited from interface ch.epfl.cs107.play.window.Canvas
convertPositionOnScreen, drawImage, drawShape, drawText, getHeight, getImage, getScaledHeight, getScaledWidth, getWidth, getXScale, getYScale, registerFontsMethods inherited from interface ch.epfl.cs107.play.math.Positionable
getPosition, getTransform, getVelocity
-
Method Details
-
getFocus
Button getFocus()- Returns:
- (Button): whether the windows is active
-
getMouse
Mouse getMouse()- Returns:
- (Mouse): associated mouse controller
-
getKeyboard
Keyboard getKeyboard()- Returns:
- (Keyboard): associated keyboard controller
-
isCloseRequested
boolean isCloseRequested()- Returns:
- (boolean): whether the user tried to close the window
-
update
void update() -
dispose
void dispose()Destroys and closes the window
-