Class RemoteTextLCD

  • All Implemented Interfaces:
    CommonLCD, TextLCD

    public class RemoteTextLCD
    extends java.lang.Object
    implements TextLCD
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bitBlt​(byte[] src, int sw, int sh, int sx, int sy, byte[] dst, int dw, int dh, int dx, int dy, int w, int h, int rop)
      Standard two input BitBlt function.
      void bitBlt​(byte[] src, int sw, int sh, int sx, int sy, int dx, int dy, int w, int h, int rop)
      Standard two input BitBlt function with the LCD display as the destination.
      void clear()
      Clear the display.
      void clear​(int y)
      Clear an LCD display row
      void clear​(int x, int y, int n)
      Clear a contiguous set of characters
      void drawChar​(char c, int x, int y)
      Draw a single char on the LCD at specified x,y co-ordinate.
      void drawInt​(int i, int x, int y)
      Display an int on the LCD at specified x,y co-ordinate.
      void drawInt​(int i, int places, int x, int y)
      Display an in on the LCD at x,y with leading spaces to occupy at least the number of characters specified by the places parameter.
      void drawString​(java.lang.String str, int x, int y)
      Display a string on the LCD at specified x,y co-ordinate.
      void drawString​(java.lang.String str, int x, int y, boolean inverted)
      Display an optionally inverted string on the LCD at specified x,y co-ordinate.
      byte[] getDisplay()
      Provide access to the LCD display frame buffer.
      Font getFont()
      Get the current font
      int getHeight()
      Return the height of the associated drawing surface.
      byte[] getHWDisplay()
      Get access to hardware LCD display.
      int getTextHeight()
      Get the height of the screen in characters
      int getTextWidth()
      Get the width of the screen in characters
      int getWidth()
      Return the width of the associated drawing surface.
      void refresh()
      Refresh the display.
      void scroll()
      Scrolls the screen up one text line
      void setAutoRefresh​(boolean on)
      Turn on/off the automatic refresh of the LCD display.
      int setAutoRefreshPeriod​(int period)
      Set the period used to perform automatic refreshing of the display.
      void setContrast​(int contrast)
      Set the LCD contrast.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RemoteTextLCD

        public RemoteTextLCD​(RMITextLCD lcd)
    • Method Detail

      • refresh

        public void refresh()
        Description copied from interface: CommonLCD
        Refresh the display. If auto refresh is off, this method will wait until the display refresh has completed. If auto refresh is on it will return immediately.
        Specified by:
        refresh in interface CommonLCD
      • clear

        public void clear()
        Description copied from interface: CommonLCD
        Clear the display.
        Specified by:
        clear in interface CommonLCD
      • getWidth

        public int getWidth()
        Description copied from interface: CommonLCD
        Return the width of the associated drawing surface.
        Note: This is a non standard method.
        Specified by:
        getWidth in interface CommonLCD
        Returns:
        width of the surface
      • getHeight

        public int getHeight()
        Description copied from interface: CommonLCD
        Return the height of the associated drawing surface.
        Note: This is a non standard method.
        Specified by:
        getHeight in interface CommonLCD
        Returns:
        height of the surface.
      • getDisplay

        public byte[] getDisplay()
        Description copied from interface: CommonLCD
        Provide access to the LCD display frame buffer.
        Specified by:
        getDisplay in interface CommonLCD
        Returns:
        byte array that is the frame buffer.
      • getHWDisplay

        public byte[] getHWDisplay()
        Description copied from interface: CommonLCD
        Get access to hardware LCD display.
        Specified by:
        getHWDisplay in interface CommonLCD
        Returns:
        byte array that is the frame buffer
      • setContrast

        public void setContrast​(int contrast)
        Description copied from interface: CommonLCD
        Set the LCD contrast.
        Specified by:
        setContrast in interface CommonLCD
        Parameters:
        contrast - 0 blank 0x60 full on
      • bitBlt

        public void bitBlt​(byte[] src,
                           int sw,
                           int sh,
                           int sx,
                           int sy,
                           int dx,
                           int dy,
                           int w,
                           int h,
                           int rop)
        Description copied from interface: CommonLCD
        Standard two input BitBlt function with the LCD display as the destination. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.
        Specified by:
        bitBlt in interface CommonLCD
        Parameters:
        src - byte array containing the source image
        sw - Width of the source image
        sh - Height of the source image
        sx - X position to start the copy from
        sy - Y Position to start the copy from
        dx - X destination
        dy - Y destination
        w - width of the area to copy
        h - height of the area to copy
        rop - raster operation.
      • bitBlt

        public void bitBlt​(byte[] src,
                           int sw,
                           int sh,
                           int sx,
                           int sy,
                           byte[] dst,
                           int dw,
                           int dh,
                           int dx,
                           int dy,
                           int w,
                           int h,
                           int rop)
        Description copied from interface: CommonLCD
        Standard two input BitBlt function. Supports standard raster ops and overlapping images. Images are held in native leJOS/Lego format.
        Specified by:
        bitBlt in interface CommonLCD
        Parameters:
        src - byte array containing the source image
        sw - Width of the source image
        sh - Height of the source image
        sx - X position to start the copy from
        sy - Y Position to start the copy from
        dst - byte array containing the destination image
        dw - Width of the destination image
        dh - Height of the destination image
        dx - X destination
        dy - Y destination
        w - width of the area to copy
        h - height of the area to copy
        rop - raster operation.
      • setAutoRefresh

        public void setAutoRefresh​(boolean on)
        Description copied from interface: CommonLCD
        Turn on/off the automatic refresh of the LCD display. At system startup auto refresh is on.
        Specified by:
        setAutoRefresh in interface CommonLCD
        Parameters:
        on - true to enable, false to disable
      • setAutoRefreshPeriod

        public int setAutoRefreshPeriod​(int period)
        Description copied from interface: CommonLCD
        Set the period used to perform automatic refreshing of the display. A period of 0 disables the refresh.
        Specified by:
        setAutoRefreshPeriod in interface CommonLCD
        Parameters:
        period - time in ms
        Returns:
        the previous refresh period.
      • drawChar

        public void drawChar​(char c,
                             int x,
                             int y)
        Description copied from interface: TextLCD
        Draw a single char on the LCD at specified x,y co-ordinate.
        Specified by:
        drawChar in interface TextLCD
        Parameters:
        c - Character to display
        x - X location
        y - Y location
      • drawString

        public void drawString​(java.lang.String str,
                               int x,
                               int y,
                               boolean inverted)
        Description copied from interface: TextLCD
        Display an optionally inverted string on the LCD at specified x,y co-ordinate.
        Specified by:
        drawString in interface TextLCD
        Parameters:
        str - The string to be displayed
        x - The x character co-ordinate to display at.
        y - The y character co-ordinate to display at.
        inverted - if true the string is displayed inverted.
      • drawString

        public void drawString​(java.lang.String str,
                               int x,
                               int y)
        Description copied from interface: TextLCD
        Display a string on the LCD at specified x,y co-ordinate.
        Specified by:
        drawString in interface TextLCD
        Parameters:
        str - The string to be displayed
        x - The x character co-ordinate to display at.
        y - The y character co-ordinate to display at.
      • drawInt

        public void drawInt​(int i,
                            int x,
                            int y)
        Description copied from interface: TextLCD
        Display an int on the LCD at specified x,y co-ordinate.
        Specified by:
        drawInt in interface TextLCD
        Parameters:
        i - The value to display.
        x - The x character co-ordinate to display at.
        y - The y character co-ordinate to display at.
      • drawInt

        public void drawInt​(int i,
                            int places,
                            int x,
                            int y)
        Description copied from interface: TextLCD
        Display an in on the LCD at x,y with leading spaces to occupy at least the number of characters specified by the places parameter.
        Specified by:
        drawInt in interface TextLCD
        Parameters:
        i - The value to display
        places - number of places to use to display the value
        x - The x character co-ordinate to display at.
        y - The y character co-ordinate to display at.
      • clear

        public void clear​(int x,
                          int y,
                          int n)
        Description copied from interface: TextLCD
        Clear a contiguous set of characters
        Specified by:
        clear in interface TextLCD
        Parameters:
        x - the x character coordinate
        y - the y character coordinate
        n - the number of characters
      • clear

        public void clear​(int y)
        Description copied from interface: TextLCD
        Clear an LCD display row
        Specified by:
        clear in interface TextLCD
        Parameters:
        y - the row to clear
      • scroll

        public void scroll()
        Description copied from interface: TextLCD
        Scrolls the screen up one text line
        Specified by:
        scroll in interface TextLCD
      • getFont

        public Font getFont()
        Description copied from interface: TextLCD
        Get the current font
        Specified by:
        getFont in interface TextLCD
      • getTextWidth

        public int getTextWidth()
        Description copied from interface: TextLCD
        Get the width of the screen in characters
        Specified by:
        getTextWidth in interface TextLCD
      • getTextHeight

        public int getTextHeight()
        Description copied from interface: TextLCD
        Get the height of the screen in characters
        Specified by:
        getTextHeight in interface TextLCD