Package codedraw

Class Screen

java.lang.Object
codedraw.Screen

public class Screen extends Object
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 Details

    • getAllScreens

      public static Screen[] getAllScreens()
      Creates a list of all attached screens of this computer.
      Returns:
      the list as an array of screens.
    • getDefaultScreen

      public static Screen getDefaultScreen()
      Returns the default screen of this computer.
      Returns:
      the default screen.
    • getName

      public String getName()
      The name of this monitor.
      Returns:
      the name of the monitor.
    • 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object