Package codedraw
Class Screen
java.lang.Object
codedraw.Screen
Represents the monitors attached to the computer.
This class is used to select which monitor a
FullScreen instance of CodeDraw will be attached to.-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Screen[]Creates a list of all attached screens of this computer.static ScreenReturns the default screen of this computer.intThe height in pixels of this monitor.getName()The name of this monitor.intgetWidth()The width in pixels of this monitor.inthashCode()booleanTells whether this monitor is the default monitor of the computer.toString()
-
Method Details
-
getAllScreens
Creates a list of all attached screens of this computer.- Returns:
- the list as an array of screens.
-
getDefaultScreen
Returns the default screen of this computer.- Returns:
- the default screen.
-
getName
-
getWidth
public int getWidth()The width in pixels of this monitor.- Returns:
- the width of the monitor.
-
getHeight
public int getHeight()The height in pixels of this monitor.- Returns:
- the height of the monitor.
-
isDefaultScreen
public boolean isDefaultScreen()Tells whether this monitor is the default monitor of the computer.- Returns:
- true if this is the default monitor.
-
equals
-
hashCode
-
toString
-