Class Region

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Region()
      Protected constructor, construct children instead.
      protected Region​(int number, boolean acceptTouch, boolean decode, boolean visible, boolean inUse, boolean hasFrame, boolean outputToHost, boolean reserved1, int reserved2, int x1, int x2, int y1, int y2, byte fAlpha, byte fRed, byte fGreen, byte fBlue, byte bAlpha, byte bRed, byte bGreen, byte bBlue)
      Protected constructor, used by children to create new regions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptsTouch()
      Whether or not this region accepts touches.
      boolean equals​(java.lang.Object o)  
      java.awt.Color getColorBackground()
      Gets the background color.
      java.awt.Color getColorForeground()
      Gets the foreground color.
      int getNumber()
      Gets the region number.
      boolean getOutputToHost()
      Gets whether this region will output information to the host or not.
      int getReserved2()
      Gets reserved, reserved for later use.
      int getX1()
      Gets the leftmost side.
      int getX2()
      Gets the rightmost side.
      int getY1()
      Gets the topmost side.
      int getY2()
      Gets the bottommost side.
      boolean hasFrame()
      Whether or not a one pixel border will be drawn around this region.
      int hashCode()  
      boolean isDecode()
      Gets whether or not this region will generate coordinate events (true) or if its parent will (false).
      boolean isInUse()
      Gets whether or not this region is currently in use.
      boolean isReserved1()
      Gets reserved, reserved for later use.
      boolean isVisible()
      Gets whether or not this region will be visible on screen.
      void setAcceptTouch​(boolean acceptTouch)
      Sets whether or not this region accepts touches.
      void setColorBackground​(java.awt.Color colorBackground)
      Sets the background color.
      void setColorForeground​(java.awt.Color colorForeground)
      Sets the foreground color.
      void setDecode​(boolean decode)
      Sets whether or not this region will generate coordinate events (true) or if its parent will (false).
      void setHasFrame​(boolean hasFrame)
      Sets whether or not a one pixel border will be drawn around this region.
      void setInUse​(boolean inUse)
      Sets whether or not this region is currently in use.
      void setNumber​(int number)
      Sets the region number.
      void setOutputToHost​(boolean outputToHost)
      Sets whether this region will output information to the host or not.
      void setReserved1​(boolean reserved1)
      Sets reserved, reserved for later use.
      void setReserved2​(int reserved2)
      Sets reserved, reserved for later use.
      void setVisible​(boolean visible)
      Sets whether or not this region will be visible on screen.
      void setX1​(int x1)
      Sets the leftmost side.
      void setX2​(int x2)
      Sets the rightmost side.
      void setY1​(int y1)
      Sets the topmost side.
      void setY2​(int y2)
      Sets the bottommost side.
      java.lang.String toString()
      Prints this object as a human readable string.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Region

        protected Region()
        Protected constructor, construct children instead.
      • Region

        protected Region​(int number,
                         boolean acceptTouch,
                         boolean decode,
                         boolean visible,
                         boolean inUse,
                         boolean hasFrame,
                         boolean outputToHost,
                         boolean reserved1,
                         int reserved2,
                         int x1,
                         int x2,
                         int y1,
                         int y2,
                         byte fAlpha,
                         byte fRed,
                         byte fGreen,
                         byte fBlue,
                         byte bAlpha,
                         byte bRed,
                         byte bGreen,
                         byte bBlue)
        Protected constructor, used by children to create new regions.
        Parameters:
        number - Region number.
        acceptTouch - Whether or not this region accepts touches.
        decode - Whether or not this region will generate coordinate events (true) or if its parent will (false).
        visible - Whether or not this region will be visible on screen.
        inUse - Whether or not this region is currently in use. Read only, defaults to true.
        hasFrame - Whether or not a one pixel border will be drawn around this region.
        outputToHost - Whether or not information is broadcasted to the host computer.
        reserved1 - Reserved for later use.
        reserved2 - Reserved for later use.
        x1 - The leftmost side.
        x2 - The rightmost side.
        y1 - The topmost side.
        y2 - The bottomost side.
        fAlpha - Foreground color alpha
        fRed - Foreground color red
        fGreen - Foreground color green
        fBlue - Foreground color blue
        bAlpha - Background color alpha
        bRed - Background color red
        bGreen - Background color green
        bBlue - Background color blue
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • 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.
      • getNumber

        public int getNumber()
        Gets the region number.
        Returns:
        The region number
      • setNumber

        public void setNumber​(int number)
        Sets the region number.
        Parameters:
        number - The region number to set.
      • acceptsTouch

        public boolean acceptsTouch()
        Whether or not this region accepts touches.
        Returns:
        Whether or not this region accepts touches.
      • setAcceptTouch

        public void setAcceptTouch​(boolean acceptTouch)
        Sets whether or not this region accepts touches.
        Parameters:
        acceptTouch - Sets whether or not this region accepts touches.
      • isDecode

        public boolean isDecode()
        Gets whether or not this region will generate coordinate events (true) or if its parent will (false).
        Returns:
        Decode
      • setDecode

        public void setDecode​(boolean decode)
        Sets whether or not this region will generate coordinate events (true) or if its parent will (false).
        Parameters:
        decode - Whether or not the region will be decoded.
      • isVisible

        public boolean isVisible()
        Gets whether or not this region will be visible on screen.
        Returns:
        Whether or not this region will be visible on screen.
      • setVisible

        public void setVisible​(boolean visible)
        Sets whether or not this region will be visible on screen.
        Parameters:
        visible - Whether or not this region will be visible on screen.
      • isInUse

        public boolean isInUse()
        Gets whether or not this region is currently in use.
        Returns:
        In use.
      • setInUse

        public void setInUse​(boolean inUse)
        Sets whether or not this region is currently in use.
        Parameters:
        inUse - Sets whether or no the region is currently in use.
      • hasFrame

        public boolean hasFrame()
        Whether or not a one pixel border will be drawn around this region.
        Returns:
        Whether or not a one pixel border will be drawn around this region.
      • setHasFrame

        public void setHasFrame​(boolean hasFrame)
        Sets whether or not a one pixel border will be drawn around this region.
        Parameters:
        hasFrame - Whether or not a one pixel border will be drawn around this region.
      • getOutputToHost

        public boolean getOutputToHost()
        Gets whether this region will output information to the host or not.
        Returns:
        Whether this region will send output to the host.
      • setOutputToHost

        public void setOutputToHost​(boolean outputToHost)
        Sets whether this region will output information to the host or not.
        Parameters:
        outputToHost - Whether this region will send output to the host.
      • isReserved1

        public boolean isReserved1()
        Gets reserved, reserved for later use.
        Returns:
        Gets reserved.
      • setReserved1

        public void setReserved1​(boolean reserved1)
        Sets reserved, reserved for later use.
        Parameters:
        reserved1 - Sets reserved.
      • getReserved2

        public int getReserved2()
        Gets reserved, reserved for later use.
        Returns:
        Reserved.
      • setReserved2

        public void setReserved2​(int reserved2)
        Sets reserved, reserved for later use.
        Parameters:
        reserved2 - Sets reserved.
      • getX1

        public int getX1()
        Gets the leftmost side.
        Returns:
        The leftmost side.
      • setX1

        public void setX1​(int x1)
        Sets the leftmost side.
        Parameters:
        x1 - Sets the leftmost side.
      • getX2

        public int getX2()
        Gets the rightmost side.
        Returns:
        the x2
      • setX2

        public void setX2​(int x2)
        Sets the rightmost side.
        Parameters:
        x2 - the x2 to set
      • getY1

        public int getY1()
        Gets the topmost side.
        Returns:
        the y1
      • setY1

        public void setY1​(int y1)
        Sets the topmost side.
        Parameters:
        y1 - the y1 to set
      • getY2

        public int getY2()
        Gets the bottommost side.
        Returns:
        the y2
      • setY2

        public void setY2​(int y2)
        Sets the bottommost side.
        Parameters:
        y2 - the y2 to set
      • getColorForeground

        public java.awt.Color getColorForeground()
        Gets the foreground color.
        Returns:
        the colorForeground
      • setColorForeground

        public void setColorForeground​(java.awt.Color colorForeground)
        Sets the foreground color.
        Parameters:
        colorForeground - the colorForeground to set
      • getColorBackground

        public java.awt.Color getColorBackground()
        Gets the background color.
        Returns:
        the colorBackground
      • setColorBackground

        public void setColorBackground​(java.awt.Color colorBackground)
        Sets the background color.
        Parameters:
        colorBackground - the colorBackground to set