Class DisplaySettings


  • public final class DisplaySettings
    extends java.lang.Object
    This class represents dynamic display options that can be changed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SET_COMMAND_COMMIT
      Constant to be used with setCommand, tells the device to commit these settings to flash.
      static int SET_COMMAND_RESTORE_DEFAULTS
      Constant to be used with setCommand, tells the device to restore default brightness and contrast, can be used with SET_COMMAND_COMMIT.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getBlue()
      Gets the blue adjustment value.
      int getBrightness()
      Gets the current brightness level of the device back-light (if equipped).
      int getContrast()
      Get the contrast setting of the screen.
      int getGreen()
      Gets the green adjustment value.
      int getRed()
      Gets the red adjustment value.
      int getSetCommand()
      Gets the command.
      void setBlue​(int blue)
      Sets the blue adjustment value.
      void setBrightness​(int brightness)
      Sets the brightness of the back-light in the display (if equipped).
      void setContrast​(int contrast)
      Sets contrast of the display in the device (if equipped).
      void setGreen​(int green)
      Sets the green adjustment value.
      void setRed​(int red)
      Sets the red adjustment value.
      void setSetCommand​(int setCommand)
      This gives you the ability to save the display settings in flash and/or restore the default display settings.
      java.lang.String toString()
      Prints this object as a human readable string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SET_COMMAND_COMMIT

        public static final int SET_COMMAND_COMMIT
        Constant to be used with setCommand, tells the device to commit these settings to flash.
        See Also:
        Constant Field Values
      • SET_COMMAND_RESTORE_DEFAULTS

        public static final int SET_COMMAND_RESTORE_DEFAULTS
        Constant to be used with setCommand, tells the device to restore default brightness and contrast, can be used with SET_COMMAND_COMMIT.
        See Also:
        Constant Field Values
    • Method Detail

      • toString

        public java.lang.String toString()
        Prints this object as a human readable string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Human readable string.
      • getBrightness

        public int getBrightness()
        Gets the current brightness level of the device back-light (if equipped).
        Returns:
        The brightness level.
      • setBrightness

        public void setBrightness​(int brightness)
        Sets the brightness of the back-light in the display (if equipped). Valid values range from 0 (off) to 100 (full on).
        Parameters:
        brightness - the brightness to set
      • getContrast

        public int getContrast()
        Get the contrast setting of the screen.
        Returns:
        The contrast of the screen.
      • setContrast

        public void setContrast​(int contrast)
        Sets contrast of the display in the device (if equipped). Value values range from 0 (white) to 100 (black).
        Parameters:
        contrast - the contrast to set
      • getRed

        public int getRed()
        Gets the red adjustment value.
        Returns:
        red adjustment value.
      • setRed

        public void setRed​(int red)
        Sets the red adjustment value. Currently unused.
        Parameters:
        red - The red value to set.
      • getGreen

        public int getGreen()
        Gets the green adjustment value.
        Returns:
        green adjustment value.
      • setGreen

        public void setGreen​(int green)
        Sets the green adjustment value. Currently unused.
        Parameters:
        green - The green adjustment value to set.
      • getBlue

        public int getBlue()
        Gets the blue adjustment value.
        Returns:
        The blue adjustment value.
      • setBlue

        public void setBlue​(int blue)
        Sets the blue adjustment value. Currently unused.
        Parameters:
        blue - The blue adjustment value.
      • getSetCommand

        public int getSetCommand()
        Gets the command.
        Returns:
        the setCommand
      • setSetCommand

        public void setSetCommand​(int setCommand)
        This gives you the ability to save the display settings in flash and/or restore the default display settings. This is a bitmask of the SET_COMMAND_* constants.
        Parameters:
        setCommand - Bitmask of the commands to send along with this display setting report.